org.labkey.remoteapi.domain.GetDomainDetailsCommand 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 java.util.HashMap;
import java.util.Map;
public class GetDomainDetailsCommand extends Command
{
private String _schemaName;
private String _queryName;
private Long _domainId;
public GetDomainDetailsCommand(String schemaName, String queryName)
{
super("property", "getDomainDetails");
_schemaName = schemaName;
_queryName = queryName;
}
public GetDomainDetailsCommand(Long domainId)
{
super("property", "getDomainDetails");
_domainId = domainId;
}
@Override
public Map getParameters()
{
Map params = new HashMap<>();
if (_schemaName != null && _queryName != null)
{
params.put("schemaName", _schemaName);
params.put("queryName", _queryName);
}
else if (_domainId != null)
{
params.put("domainId", _domainId);
}
return params;
}
@Override
protected DomainDetailsResponse createResponse(String text, int status, String contentType, JSONObject json)
{
return new DomainDetailsResponse(text, status, contentType, json, this);
}
public String getSchemaName()
{
return _schemaName;
}
public void setSchemaName(String schemaName)
{
_schemaName = schemaName;
}
public String getQueryName()
{
return _queryName;
}
public void setQueryName(String queryName)
{
_queryName = queryName;
}
public Long getDomainId()
{
return _domainId;
}
public void setDomainId(Long domainId)
{
_domainId = domainId;
}
}