Package org.labkey.remoteapi.assay
Class AssayListCommand
java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
- All Implemented Interfaces:
HasRequiredVersion
Command for obtaining information about the current assay definitions
in a particular folder.
By default, this command returns information about all assays, but you may use the various setters to filter this list to assays of a given name, type or id.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a new, mutable parameter map.protected AssayListResponse
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.getId()
Returns the current assay id filter (if any).org.json.JSONObject
Returns the JSON object to post or null for no JSON.getName()
Returns the assay name filter upon (if any)getType()
Returns the current assay type filter (if any).void
Sets the current assay id filter.void
Sets the assay name to filter upon.void
Sets the assay type filter.Methods inherited from class org.labkey.remoteapi.PostCommand
createRequest
Methods inherited from class org.labkey.remoteapi.Command
_execute, execute, getActionName, getControllerName, getHttpRequest, getParameters, getParamValueAsString, getRequiredVersion, getTimeout, setRequiredVersion, setTimeout
-
Constructor Details
-
AssayListCommand
public AssayListCommand()Constructs a new AssayListCommand object.
-
-
Method Details
-
getName
Returns the assay name filter upon (if any)- Returns:
- The current assay name filter, or null if not filter has been set.
-
setName
Sets the assay name to filter upon. Use this to get information about a particular assay identified by the supplied name.- Parameters:
name
- The assay name.
-
getType
Returns the current assay type filter (if any).- Returns:
- The current assay type filter or null if not filter has been set.
-
setType
Sets the assay type filter. For example, to get information on Luminex assays only, set this to 'Luminex'.- Parameters:
type
- The type to filter upon.
-
getId
Returns the current assay id filter (if any).- Returns:
- The current assay id filter, or null if none has been set.
-
setId
Sets the current assay id filter. Set this to a valid id to get information about that assay only, or null to get information about all assays.- Parameters:
id
- The assay id.
-
createResponse
protected AssayListResponse 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<AssayListResponse,
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.
-
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<AssayListResponse>
- Returns:
- The JSON object to post.
-
createParameterMap
Description copied from class:Command
Returns a new, mutable parameter map. Derived classes will typically override this method to put values passed to specialized setter methods into the map.- Overrides:
createParameterMap
in classCommand<AssayListResponse,
org.apache.hc.client5.http.classic.methods.HttpPost> - Returns:
- The parameter map to use when building the URL.
-