org.labkey.remoteapi.domain.AbstractDomainUpdateCommand 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.domain;
import org.json.simple.JSONObject;
import org.labkey.remoteapi.PostCommand;
public abstract class AbstractDomainUpdateCommand extends PostCommand
{
private Domain _design = new Domain();
public AbstractDomainUpdateCommand(String controllerName, String actionName)
{
super(controllerName, actionName);
}
@Override
protected DomainResponse createResponse(String text, int status, String contentType, JSONObject json)
{
return new DomainResponse(text, status, contentType, json, this);
}
@Override
public JSONObject getJsonObject()
{
JSONObject result = new JSONObject();
result.put("domainDesign", _design.toJSONObject());
return result;
}
public Domain getDomainDesign()
{
return _design;
}
public void setDomainDesign(Domain design)
{
_design = design;
}
}