All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.labkey.remoteapi.assay.LoadAssayBatchCommand Maven / Gradle / Ivy

Go to download

The client-side library for Java developers is a separate JAR from the LabKey Server code base. It can be used by any Java program, including another Java web application.

There is a newer version: 6.2.0
Show newest version
package org.labkey.remoteapi.assay;

import org.json.JSONObject;
import org.labkey.remoteapi.PostCommand;

/**
 * Command for obtaining information about the current batch in a particular folder.
 */
public class LoadAssayBatchCommand extends PostCommand
{

    private String _protocolName;
    private int _batchId;
    private Batch _batch;

    public Batch getBatch()
    {
        return _batch;
    }

    public void setBatch(Batch batch)
    {
        _batch = batch;
    }

    public LoadAssayBatchCommand(String protocolName, int batchId)
    {
        super("assay", "getAssayBatch");
        _protocolName = protocolName;
        _batchId = batchId;
    }

    public String getProtocolName()
    {
        return _protocolName;
    }

    public void setProtocolName(String protocolName)
    {
        _protocolName = protocolName;
    }

    public int getBatchId()
    {
        return _batchId;
    }

    public void setBatchId(int batchId)
    {
        _batchId = batchId;
    }

    @Override
    public JSONObject getJsonObject()
    {
        JSONObject result = new JSONObject();
        result.put("protocolName", getProtocolName());
        result.put("batchId", getBatchId());
        result.put("batch", getBatch());
        return result;
    }

    @Override
    protected LoadAssayBatchResponse createResponse(String text, int status, String contentType, JSONObject json)
    {
        return new LoadAssayBatchResponse(text, status, contentType, json);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy