org.labkey.remoteapi.domain.DomainResponse 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.JSONObject;
import org.labkey.remoteapi.Command;
import org.labkey.remoteapi.CommandResponse;
/**
* Response object for commands that expect the server to return a serialized domain.
*/
public class DomainResponse extends CommandResponse
{
private final Domain _domain;
public DomainResponse(String text, int statusCode, String contentType, JSONObject json, Command extends DomainResponse> sourceCommand)
{
super(text, statusCode, contentType, json, sourceCommand);
_domain = new Domain(json);
}
/**
* Get the Domain deserialized from the server's response
* @return Domain definition
*/
public Domain getDomain()
{
return _domain;
}
}