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

org.labkey.remoteapi.domain.DomainDetailsResponse 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.domain;

import org.json.JSONObject;
import org.labkey.remoteapi.Command;
import org.labkey.remoteapi.CommandResponse;
import org.labkey.remoteapi.internal.ResponseUtils;

import java.util.Map;

public class DomainDetailsResponse extends CommandResponse
{
    private final Domain _domain;
    private final String _kind;
    private final Map _options;

    public DomainDetailsResponse(String text, int statusCode, String contentType, JSONObject json, Command sourceCommand)
    {
        super(text, statusCode, contentType, json, sourceCommand);
        _domain = new Domain(json.getJSONObject("domainDesign"));
        _kind = json.optString("domainKindName", null);
        _options = ResponseUtils.deepUnmodifiableMap(json.optJSONObject("options"));
    }

    /**
     * Get the Domain deserialized from the server's response
     * @return Domain definition
     */
    public Domain getDomain()
    {
        return _domain;
    }

    /**
     * @return domain kind name returned from the server
     */
    public String getKind()
    {
        return _kind;
    }

    /**
     * @return Domain options returned from the server
     */
    public Map getOptions()
    {
        return _options;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy