Class AssayListCommand

java.lang.Object
org.labkey.remoteapi.Command<ResponseType,org.apache.hc.client5.http.classic.methods.HttpPost>
org.labkey.remoteapi.PostCommand<AssayListResponse>
org.labkey.remoteapi.assay.AssayListCommand
All Implemented Interfaces:
HasRequiredVersion

public class AssayListCommand extends PostCommand<AssayListResponse>
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.

  • Constructor Details

    • AssayListCommand

      public AssayListCommand()
      Constructs a new AssayListCommand object.
  • Method Details

    • getName

      public String getName()
      Returns the assay name filter upon (if any)
      Returns:
      The current assay name filter, or null if not filter has been set.
    • setName

      public void setName(String name)
      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

      public String getType()
      Returns the current assay type filter (if any).
      Returns:
      The current assay type filter or null if not filter has been set.
    • setType

      public void setType(String type)
      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

      public Integer getId()
      Returns the current assay id filter (if any).
      Returns:
      The current assay id filter, or null if none has been set.
    • setId

      public void setId(Integer id)
      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 class Command<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 class PostCommand<AssayListResponse>
      Returns:
      The JSON object to post.
    • createParameterMap

      protected Map<String,Object> 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 class Command<AssayListResponse,org.apache.hc.client5.http.classic.methods.HttpPost>
      Returns:
      The parameter map to use when building the URL.