Package org.labkey.remoteapi.assay
Class SaveAssayBatchCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
org.labkey.remoteapi.PostCommand<SaveAssayBatchResponse>
org.labkey.remoteapi.assay.SaveAssayBatchCommand
- All Implemented Interfaces:
HasRequiredVersion
Saves an assay batch on the server. If no batch or run ids are specified, new ones will be inserted. If they are
specified, existing ones will be updated.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.labkey.remoteapi.Command
Command.CommonParameters, Command.Response
-
Field Summary
FieldsFields inherited from class org.labkey.remoteapi.Command
CONTENT_TYPE_JSON
-
Constructor Summary
ConstructorsConstructorDescriptionSaveAssayBatchCommand
(int assayId) SaveAssayBatchCommand
(int assayId, Batch batch) SaveAssayBatchCommand
(String protocolName, Batch batch) -
Method Summary
Modifier and TypeMethodDescriptionprotected SaveAssayBatchResponse
createResponse
(String text, int status, String contentType, org.json.JSONObject json) Creates an instance of the response class, initialized with the response text, the HTTP status code, and parsed JSONObject.org.json.JSONObject
Returns the JSON object to post or null for no JSON.Methods inherited from class org.labkey.remoteapi.PostCommand
createRequest
Methods inherited from class org.labkey.remoteapi.Command
_execute, createParameterMap, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Field Details
-
SAMPLE_DERIVATION_PROTOCOL
- See Also:
-
-
Constructor Details
-
SaveAssayBatchCommand
public SaveAssayBatchCommand(int assayId) - Parameters:
assayId
- the id of the assay definition on the web server
-
SaveAssayBatchCommand
- Parameters:
assayId
- the id of the assay definition on the web serverbatch
- the batch object to be saved
-
SaveAssayBatchCommand
- Parameters:
protocolName
- the name of the protocol to use for non-assay backed runsbatch
- the batch object to be saved
-
-
Method Details
-
getJsonObject
public org.json.JSONObject getJsonObject()Description copied from class:PostCommand
Returns the JSON object to post or null for no JSON. Override this method to provide parameters as JSON.- Overrides:
getJsonObject
in classPostCommand<SaveAssayBatchResponse>
- Returns:
- The JSON object to post.
-
createResponse
protected SaveAssayBatchResponse createResponse(String text, int status, String contentType, org.json.JSONObject json) Description copied from class:Command
Creates an instance of the response class, initialized with the response text, the HTTP status code, and parsed JSONObject.Override this method to create an instance of a different class that extends CommandResponse
- Overrides:
createResponse
in classCommand<SaveAssayBatchResponse,
org.apache.hc.client5.http.classic.methods.HttpPost> - Parameters:
text
- The response text from the server.status
- The HTTP status code.contentType
- The Content-Type header value.json
- The parsed JSONObject (or null if no JSON was returned).- Returns:
- An instance of the response object.
-