Package org.labkey.remoteapi.assay
Class ImportRunCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
- All Implemented Interfaces:
HasRequiredVersion
Import a new assay run. If no batch is specified, a new batch will be inserted.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.labkey.remoteapi.Command
Command.CommonParameters, Command.Response
-
Field Summary
Fields inherited from class org.labkey.remoteapi.Command
CONTENT_TYPE_JSON
-
Constructor Summary
ConstructorsConstructorDescriptionImportRunCommand
(int assayId) ImportRunCommand
(int assayId, File file) ImportRunCommand
(int assayId, List<Map<String, Object>> dataRows) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.hc.client5.http.classic.methods.HttpPost
createRequest
(URI uri) Creates theHttpPost
instance used for the request.protected ImportRunResponse
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.void
setAuditUserComment
(String auditUserComment) void
setBatchId
(int batchId) void
setBatchProperties
(Map<String, Object> batchProperties) void
setComment
(String comment) void
void
void
setPlateMetadata
(org.json.JSONObject plateMetadata) void
setProperties
(Map<String, Object> properties) void
setRunFilePath
(String runFilePath) Absolute or relative path to assay data file to be imported.void
setUseJson
(boolean useJson) Methods inherited from class org.labkey.remoteapi.PostCommand
getJsonObject
Methods inherited from class org.labkey.remoteapi.Command
_execute, createParameterMap, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Constructor Details
-
ImportRunCommand
public ImportRunCommand(int assayId) -
ImportRunCommand
-
ImportRunCommand
-
-
Method Details
-
setUseJson
public void setUseJson(boolean useJson) -
setName
-
setComment
-
setFile
-
setRunFilePath
Absolute or relative path to assay data file to be imported. The file must exist under the file or pipeline root of the container.- Parameters:
runFilePath
- the data file path
-
setProperties
-
setBatchId
public void setBatchId(int batchId) -
setBatchProperties
-
setPlateMetadata
public void setPlateMetadata(org.json.JSONObject plateMetadata) -
setAuditUserComment
-
createResponse
protected ImportRunResponse 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<ImportRunResponse,
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.
-
createRequest
Description copied from class:PostCommand
Creates theHttpPost
instance used for the request. Override to modify the HttpPost object before use or to send something other than JSON in the post body. In your override, create the HttpPost and set the request entity appropriately.- Overrides:
createRequest
in classPostCommand<ImportRunResponse>
- Parameters:
uri
- the uri to convert- Returns:
- The PostMethod object.
-