public class Service extends AnaplanApiClientObject implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
static int |
MAJOR_VERSION
The Major version of the API.
|
static int |
MINOR_VERSION
The Minor version of the API.
|
static java.net.URI |
PRODUCTION_API_ROOT
The base URI of Anaplan's Production API service.
|
static java.lang.String |
RELEASE_VERSION
The Release version of the API.
|
static int |
REVISION_VERSION
The Revision version of the API.
|
static java.net.URI |
UAT_API_ROOT
The base URI of Anaplan's UAT Sandbox API service.
|
Constructor and Description |
---|
Service()
Create a new service client for Anaplan's Production API Service.
|
Service(java.net.URI serviceLocation)
Create a new service client with the specified endpoint.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
buildUserAgentIdentifier()
Generate a suitable value for a User-Agent header.
|
protected void |
checkInitialized()
Check that the Service object is ready for use.
|
void |
close()
Release any system resources associated with this instance.
|
Workspace |
getWorkspace(java.lang.String workspaceId)
Retrieve a reference to a workspace from its workspaceId.
|
java.util.List<Workspace> |
getWorkspaces()
Retrieves the list of available workspaces.
|
void |
setDebugLevel(int debugLevel)
Override the debug level.
|
void |
setProxyCredentials(Credentials proxyCredentials)
Set the user credentials for proxy authentication.
|
void |
setProxyLocation(java.net.URI proxyLocation)
Set the location of a proxy.
|
void |
setSerializationHandler(SerializationHandler serializationHandler)
Override the serialization handler to be used.
|
void |
setServiceCredentials(Credentials serviceCredentials)
Set the user credentials for service authentication.
|
void |
setTransportProvider(TransportProvider transportProvider)
Override the transport provider to be used.
|
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
public static final int REVISION_VERSION
public static final java.lang.String RELEASE_VERSION
public static final java.net.URI PRODUCTION_API_ROOT
public static final java.net.URI UAT_API_ROOT
public Service(java.net.URI serviceLocation)
serviceLocation
- The base URI of the service to which the client will connectpublic Service()
public void setProxyLocation(java.net.URI proxyLocation) throws AnaplanAPIException
proxyLocation
- The URI of the proxy via which the service will be accessedAnaplanAPIException
public void setServiceCredentials(Credentials serviceCredentials) throws AnaplanAPIException
serviceCredentials
- The credentials to authenticate withAnaplanAPIException
public void setProxyCredentials(Credentials proxyCredentials) throws AnaplanAPIException
proxyCredentials
- The credentials to authenticate withAnaplanAPIException
public void setSerializationHandler(SerializationHandler serializationHandler)
public void setTransportProvider(TransportProvider transportProvider)
public void setDebugLevel(int debugLevel)
debugLevel
- the debug levelprotected java.lang.String buildUserAgentIdentifier() throws AnaplanAPIException
AnaplanAPIException
protected void checkInitialized()
java.lang.IllegalStateException
- the service has been closed, or no credentials have been
provided.public java.util.List<Workspace> getWorkspaces() throws AnaplanAPIException
AnaplanAPIException
- an error occurred.public Workspace getWorkspace(java.lang.String workspaceId) throws AnaplanAPIException
workspaceId
- The workspace ID or name of the workspace.AnaplanAPIException
- an error occurred.public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable