com.veriplace.client
Class ClientConfiguration

java.lang.Object
  extended by com.veriplace.client.ClientConfiguration

public class ClientConfiguration
extends java.lang.Object

Encapsulates the various properties that can be configured for a Veriplace Client.

Since:
2.1

Field Summary
static Revision DEFAULT_PROTOCOL
          The default OAuth protocol version.
static java.lang.String DEFAULT_SERVER_URI
          The default baseUrl to use for Veriplace APIs: "http://veriplace.com"
static java.lang.String JSON_CONTENT_TYPE
          MIME type constant for requesting JSON-encoded responses from the server: "application/json"
static java.lang.String XML_CONTENT_TYPE
          MIME type constant for requesting XML-encoded responses from the server: "text/xml"
 
Constructor Summary
ClientConfiguration()
          Default constructor that initializes no properties.
ClientConfiguration(java.lang.String consumerKey, java.lang.String consumerSecret)
          Shortcut constructor for initializing only the required consumer key and consumer secret.
ClientConfiguration(java.lang.String consumerKey, java.lang.String consumerSecret, Revision protocol, Token applicationToken, java.lang.String serverUri, CallbackFactory callbackFactory, TokenStore requestTokenStore, LocationOptions locationOptions)
          Constructor for initializing most of the optional properties.
ClientConfiguration(java.lang.String consumerKey, java.lang.String consumerSecret, Revision protocol, Token applicationToken, java.lang.String serverUri, CallbackFactory callbackFactory, TokenStore requestTokenStore, java.lang.String defaultLocationMode, LocationFilter locationFilter)
          Constructor for initializing most of the optional properties.
 
Method Summary
 Token getApplicationToken()
          See setApplicationToken(Token).
 java.lang.String[] getCallbackExcludeParameters()
          See setCallbackExcludeParameters(String[]).
 CallbackFactory getCallbackFactory()
          See setCallbackFactory(CallbackFactory).
 java.lang.String[] getCallbackIncludeParameters()
          See setCallbackIncludeParameters(String[]).
 java.lang.String getCallbackPath()
          See setCallbackPath(String).
 java.lang.String getCallbackServerName()
          See setCallbackServerName(String).
 java.lang.Integer getCallbackServerPort()
          See setCallbackServerPort(Integer).
 java.lang.String getConsumerKey()
          See setConsumerKey(String).
 java.lang.String getConsumerSecret()
          See setConsumerSecret(String).
 java.lang.String getDefaultLocationMode()
          Deprecated. Use getLocationOptions().
 LocationFilter getLocationFilter()
          Deprecated. Use getLocationOptions().
 LocationOptions getLocationOptions()
          See setLocationOptions(LocationOptions).
 java.lang.String getPreferredEncoding()
          See setPreferredEncoding(String).
 Revision getProtocol()
          See setProtocol(Revision).
 java.lang.String getServerUri()
          See setServerUri(String).
 TokenStore getTokenStore()
          See setTokenStore(TokenStore).
 void setApplicationToken(Token applicationToken)
          Specifies the application-specific access token issued for this application.
 void setCallbackExcludeParameters(java.lang.String[] callbackExcludeParameters)
           
 void setCallbackFactory(CallbackFactory callbackFactory)
           
 void setCallbackIncludeParameters(java.lang.String[] callbackIncludeParameters)
           
 void setCallbackPath(java.lang.String callbackPath)
           
 void setCallbackServerName(java.lang.String callbackServerName)
           
 void setCallbackServerPort(java.lang.Integer callbackServerPort)
           
 void setConsumerKey(java.lang.String consumerKey)
           
 void setConsumerSecret(java.lang.String consumerSecret)
           
 void setDefaultLocationMode(java.lang.String defaultLocationMode)
          Deprecated. Use setLocationOptions(LocationOptions).
 void setLocationFilter(LocationFilter locationFilter)
          Deprecated. Use setLocationOptions(LocationOptions).
 void setLocationOptions(LocationOptions locationOptions)
          Specifies a LocationOptions object whose properties will be used for all location requests by default.
 void setPreferredEncoding(java.lang.String preferredEncoding)
          Specifies the MIME type to request for all server responses.
 void setProtocol(Revision protocol)
           
 void setServerUri(java.lang.String serverUri)
          Specifies the base URI of the Veriplace server.
 void setTokenStore(TokenStore tokenStore)
          Specifies an object that can store request tokens between operations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SERVER_URI

public static final java.lang.String DEFAULT_SERVER_URI
The default baseUrl to use for Veriplace APIs: "http://veriplace.com"

See Also:
Constant Field Values

DEFAULT_PROTOCOL

public static final Revision DEFAULT_PROTOCOL
The default OAuth protocol version.


JSON_CONTENT_TYPE

public static final java.lang.String JSON_CONTENT_TYPE
MIME type constant for requesting JSON-encoded responses from the server: "application/json"

See Also:
setPreferredEncoding(String)., Constant Field Values

XML_CONTENT_TYPE

public static final java.lang.String XML_CONTENT_TYPE
MIME type constant for requesting XML-encoded responses from the server: "text/xml"

See Also:
setPreferredEncoding(String)., Constant Field Values
Constructor Detail

ClientConfiguration

public ClientConfiguration()
Default constructor that initializes no properties.


ClientConfiguration

public ClientConfiguration(java.lang.String consumerKey,
                           java.lang.String consumerSecret)
Shortcut constructor for initializing only the required consumer key and consumer secret.


ClientConfiguration

public ClientConfiguration(java.lang.String consumerKey,
                           java.lang.String consumerSecret,
                           Revision protocol,
                           Token applicationToken,
                           java.lang.String serverUri,
                           CallbackFactory callbackFactory,
                           TokenStore requestTokenStore,
                           LocationOptions locationOptions)
Constructor for initializing most of the optional properties.

Since:
2.7

ClientConfiguration

public ClientConfiguration(java.lang.String consumerKey,
                           java.lang.String consumerSecret,
                           Revision protocol,
                           Token applicationToken,
                           java.lang.String serverUri,
                           CallbackFactory callbackFactory,
                           TokenStore requestTokenStore,
                           java.lang.String defaultLocationMode,
                           LocationFilter locationFilter)
Constructor for initializing most of the optional properties.

Method Detail

getConsumerKey

public java.lang.String getConsumerKey()
See setConsumerKey(String).


setConsumerKey

public void setConsumerKey(java.lang.String consumerKey)

getConsumerSecret

public java.lang.String getConsumerSecret()
See setConsumerSecret(String).


setConsumerSecret

public void setConsumerSecret(java.lang.String consumerSecret)

getServerUri

public java.lang.String getServerUri()
See setServerUri(String).


setServerUri

public void setServerUri(java.lang.String serverUri)
Specifies the base URI of the Veriplace server. If not specified, this defaults to DEFAULT_SERVER_URI. This property is mainly useful for internal WaveMarket testing.

Note that the URI scheme (http: or https:) only affects user authorization redirects; for direct communication with the Veriplace server, the client will always use SSL unless the server is a local test installation.


getProtocol

public Revision getProtocol()
See setProtocol(Revision).


setProtocol

public void setProtocol(Revision protocol)

getApplicationToken

public Token getApplicationToken()
See setApplicationToken(Token).


setApplicationToken

public void setApplicationToken(Token applicationToken)
Specifies the application-specific access token issued for this application. This token is only required for some interfaces.


getCallbackFactory

public CallbackFactory getCallbackFactory()
See setCallbackFactory(CallbackFactory).


setCallbackFactory

public void setCallbackFactory(CallbackFactory callbackFactory)

getCallbackServerName

public java.lang.String getCallbackServerName()
See setCallbackServerName(String).


setCallbackServerName

public void setCallbackServerName(java.lang.String callbackServerName)

getCallbackServerPort

public java.lang.Integer getCallbackServerPort()
See setCallbackServerPort(Integer).


setCallbackServerPort

public void setCallbackServerPort(java.lang.Integer callbackServerPort)

getCallbackPath

public java.lang.String getCallbackPath()
See setCallbackPath(String).


setCallbackPath

public void setCallbackPath(java.lang.String callbackPath)

getCallbackIncludeParameters

public java.lang.String[] getCallbackIncludeParameters()
See setCallbackIncludeParameters(String[]).


setCallbackIncludeParameters

public void setCallbackIncludeParameters(java.lang.String[] callbackIncludeParameters)

getCallbackExcludeParameters

public java.lang.String[] getCallbackExcludeParameters()
See setCallbackExcludeParameters(String[]).


setCallbackExcludeParameters

public void setCallbackExcludeParameters(java.lang.String[] callbackExcludeParameters)

getPreferredEncoding

public java.lang.String getPreferredEncoding()
See setPreferredEncoding(String).

Since:
2.7

setPreferredEncoding

public void setPreferredEncoding(java.lang.String preferredEncoding)
Specifies the MIME type to request for all server responses. This must be equal to either XML_CONTENT_TYPE or JSON_CONTENT_TYPE; the default is XML.

The client can decode responses equally well either way, so you won't normally need to be concerned with this unless you are monitoring network traffic and find a particular encoding easier to read.

Since:
2.7

getLocationOptions

public LocationOptions getLocationOptions()
See setLocationOptions(LocationOptions).

Since:
2.7

setLocationOptions

public void setLocationOptions(LocationOptions locationOptions)
Specifies a LocationOptions object whose properties will be used for all location requests by default. These properties include the location mode and filter. They can all be overridden on a per-request basis.

Since:
2.7

getDefaultLocationMode

public java.lang.String getDefaultLocationMode()
Deprecated. Use getLocationOptions().


setDefaultLocationMode

public void setDefaultLocationMode(java.lang.String defaultLocationMode)
Deprecated. Use setLocationOptions(LocationOptions).


getLocationFilter

public LocationFilter getLocationFilter()
Deprecated. Use getLocationOptions().


setLocationFilter

public void setLocationFilter(LocationFilter locationFilter)
Deprecated. Use setLocationOptions(LocationOptions).


getTokenStore

public TokenStore getTokenStore()
See setTokenStore(TokenStore).


setTokenStore

public void setTokenStore(TokenStore tokenStore)
Specifies an object that can store request tokens between operations. The default is an instance of FileTokenStore.