org.labkey.remoteapi.assay.SaveProtocolCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of labkey-client-api Show documentation
Show all versions of labkey-client-api Show documentation
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.
package org.labkey.remoteapi.assay;
import org.json.JSONObject;
import org.labkey.remoteapi.PostCommand;
public class SaveProtocolCommand extends PostCommand
{
private final Protocol _protocol;
public SaveProtocolCommand(Protocol protocol)
{
super("assay", "saveProtocol");
_protocol = protocol;
}
@Override
protected ProtocolResponse createResponse(String text, int status, String contentType, JSONObject json)
{
return new ProtocolResponse(text, status, contentType, json);
}
@Override
public JSONObject getJsonObject()
{
return _protocol.toJSONObject();
}
@Override
public double getRequiredVersion()
{
return -1;
}
}