|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.veriplace.client.factory.DefaultClientFactory
public class DefaultClientFactory
Factory for constructing Client instances from Properties.
The minimal properties file must contain:
veriplace.application.consumer.key=<your consumer key> veriplace.application.consumer.secret=<your consumer secret>
It is also common to include:
veriplace.application.token.value=<your application token> veriplace.application.token.secret=<your application token secret>
Other configuration properties are documented below and additional properties specific to your application can be added as needed. If you are unsure how to specify any of the above properties, consult the Veriplace Developer Portal.
| Field Summary | |
|---|---|
static java.lang.String |
APPLICATION_TOKEN_SECRET
The property key for the application-specific Access Token secret<: "veriplace.application.token.secret". |
static java.lang.String |
APPLICATION_TOKEN_SECRET_PROPERTY
Deprecated. Obsolete; use APPLICATION_TOKEN_SECRET. |
static java.lang.String |
APPLICATION_TOKEN_VALUE
The property key for the application-specific Access Token value, if any: "veriplace.application.token.value". |
static java.lang.String |
APPLICATION_TOKEN_VALUE_PROPERTY
Deprecated. Obsolete; use APPLICATION_TOKEN_VALUE. |
static java.lang.String |
CALLBACK_EXCLUDE_PARAMETERS
The property key for specifying the names of request parameters not to be copied to the callback URL, if you don't want all parameters to be copied: "veriplace.application.callback.exclude-params". |
static java.lang.String |
CALLBACK_EXCLUDE_PARAMETERS_PROPERTY
Deprecated. Obsolete; use CALLBACK_EXCLUDE_PARAMETERS. |
static java.lang.String |
CALLBACK_HOST
The property key for specifying the hostname for callback URLs, if it can't be detected automatically due to your network configuration: "veriplace.application.callback.host". |
static java.lang.String |
CALLBACK_INCLUDE_PARAMETERS
The property key for specifying the names of request parameters to be copied to the callback URL, if you don't want all parameters to be copied: "veriplace.application.callback.include-params". |
static java.lang.String |
CALLBACK_INCLUDE_PARAMETERS_PROPERTY
Deprecated. Obsolete; use CALLBACK_INCLUDE_PARAMETERS. |
static java.lang.String |
CALLBACK_PATH
The property key for specifying an exact subpath for callback URLs, if it can't be detected automatically due to your network configuration: "veriplace.callback.path". |
static java.lang.String |
CALLBACK_PATH_PROPERTY
Deprecated. Obsolete; use CALLBACK_PATH. |
static java.lang.String |
CALLBACK_PORT
The property key for specifying the port for callback URLs, if it can't be detected automatically due to your network configuration: "veriplace.application.callback.port". |
static java.lang.String |
CALLBACK_PORT_PROPERTY
Deprecated. Obsolete; use CALLBACK_PORT. |
static java.lang.String |
CALLBACK_SERVER_NAME_PROPERTY
Deprecated. Obsolete; use CALLBACK_HOST. |
protected ClientConfiguration |
clientConfiguration
|
static java.lang.String |
CONSUMER_KEY
The property key for the OAuth consumer key: "veriplace.application.consumer.key". |
static java.lang.String |
CONSUMER_KEY_PROPERTY
Deprecated. Obsolete; use CONSUMER_KEY. |
static java.lang.String |
CONSUMER_SECRET
The property key for the OAuth consumer secret: "veriplace.application.consumer.secret". |
static java.lang.String |
CONSUMER_SECRET_PROPERTY
Deprecated. Obsolete; use CONSUMER_SECRET. |
static java.lang.String |
DEFAULT_LOCATION_MODE
The property key for specifying the default location mode for the GetLocation API, if any: "veriplace.application.location.mode". |
static java.lang.String |
DEFAULT_LOCATION_MODE_PROPERTY
Deprecated. Obsolete; use DEFAULT_LOCATION_MODE. |
static java.lang.String |
PREFERRED_ENCODING
The property key for specifying the desired API response encoding: "veriplace.client.encoding". |
protected java.util.Properties |
properties
|
static java.lang.String |
PROTOCOL
The property key for the protocol version to use: "veriplace.server.protocol". |
static java.lang.String |
REQUEST_TOKEN_STORE_DIRECTORY_PROPERTY
Deprecated. Obsolete; use REQUEST_TOKEN_STORE_PATH. |
static java.lang.String |
REQUEST_TOKEN_STORE_PATH
The property key for specifying the root directory of the request token store, if using type "file". |
static java.lang.String |
REQUEST_TOKEN_STORE_PROPERTY
Deprecated. Obsolete; use REQUEST_TOKEN_STORE_TYPE. |
static java.lang.String |
REQUEST_TOKEN_STORE_TYPE
The property key for specifying the type of the request token store. |
static java.lang.String |
REV_A_PROPERTY
Deprecated. Obsolete; specify protocol name with PROTOCOL. |
static java.lang.String |
SERVER_URI
The property key for the Veriplace server URI: "veriplace.url". |
static java.lang.String |
USE_LAST_KNOWN_LOCATION
The property key for specifying a DefaultLocationFilter that can suppress location
errors if there is a last known location: "veriplace.application.location.use-last-known". |
static java.lang.String |
VERIPLACE_URL_PROPERTY
Deprecated. Obsolete; use SERVER_URI. |
| Constructor Summary | |
|---|---|
DefaultClientFactory(java.util.Properties properties)
Create a new factory from a Properties object. |
|
DefaultClientFactory(java.util.Properties properties,
TokenStore requestTokenStore)
Deprecated. Use getClientConfiguration().setTokenStore(). |
|
| Method Summary | |
|---|---|
Client |
getClient()
|
ClientConfiguration |
getClientConfiguration()
Returns the ClientConfiguration object that will be used to construct a client. |
java.util.Properties |
getProperties()
|
TokenStore |
getRequestTokenStore()
Deprecated. Use getClientConfiguration().getTokenStore(). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONSUMER_KEY
ClientConfiguration.setConsumerKey(String),
Constant Field Values@Deprecated public static final java.lang.String CONSUMER_KEY_PROPERTY
CONSUMER_KEY.public static final java.lang.String CONSUMER_SECRET
ClientConfiguration.setConsumerSecret(String),
Constant Field Values@Deprecated public static final java.lang.String CONSUMER_SECRET_PROPERTY
CONSUMER_SECRET.public static final java.lang.String PROTOCOL
Revision. If not
specified, defaults to ClientConfiguration.DEFAULT_PROTOCOL.
ClientConfiguration.setProtocol(Revision),
Constant Field Values@Deprecated public static final java.lang.String REV_A_PROPERTY
PROTOCOL.public static final java.lang.String APPLICATION_TOKEN_VALUE
ClientConfiguration.setApplicationToken(Token),
Constant Field Values@Deprecated public static final java.lang.String APPLICATION_TOKEN_VALUE_PROPERTY
APPLICATION_TOKEN_VALUE.public static final java.lang.String APPLICATION_TOKEN_SECRET
ClientConfiguration.setApplicationToken(Token),
Constant Field Values@Deprecated public static final java.lang.String APPLICATION_TOKEN_SECRET_PROPERTY
APPLICATION_TOKEN_SECRET.public static final java.lang.String CALLBACK_HOST
ClientConfiguration.setCallbackServerName(String),
Constant Field Values@Deprecated public static final java.lang.String CALLBACK_SERVER_NAME_PROPERTY
CALLBACK_HOST.public static final java.lang.String CALLBACK_PORT
ClientConfiguration.setCallbackServerPort(Integer),
Constant Field Values@Deprecated public static final java.lang.String CALLBACK_PORT_PROPERTY
CALLBACK_PORT.public static final java.lang.String CALLBACK_PATH
ClientConfiguration.setCallbackPath(String),
Constant Field Values@Deprecated public static final java.lang.String CALLBACK_PATH_PROPERTY
CALLBACK_PATH.public static final java.lang.String CALLBACK_INCLUDE_PARAMETERS
ClientConfiguration.setCallbackIncludeParameters(String[]),
Constant Field Values@Deprecated public static final java.lang.String CALLBACK_INCLUDE_PARAMETERS_PROPERTY
CALLBACK_INCLUDE_PARAMETERS.public static final java.lang.String CALLBACK_EXCLUDE_PARAMETERS
ClientConfiguration.setCallbackExcludeParameters(String[]),
Constant Field Values@Deprecated public static final java.lang.String CALLBACK_EXCLUDE_PARAMETERS_PROPERTY
CALLBACK_EXCLUDE_PARAMETERS.public static final java.lang.String SERVER_URI
ClientConfiguration.DEFAULT_SERVER_URI.
ClientConfiguration.setServerUri(String),
Constant Field Values@Deprecated public static final java.lang.String VERIPLACE_URL_PROPERTY
SERVER_URI.public static final java.lang.String REQUEST_TOKEN_STORE_TYPE
ClientConfiguration.setTokenStore(TokenStore),
Constant Field Valuespublic static final java.lang.String REQUEST_TOKEN_STORE_PROPERTY
REQUEST_TOKEN_STORE_TYPE.public static final java.lang.String REQUEST_TOKEN_STORE_PATH
ClientConfiguration.setTokenStore(TokenStore),
Constant Field Valuespublic static final java.lang.String REQUEST_TOKEN_STORE_DIRECTORY_PROPERTY
REQUEST_TOKEN_STORE_PATH.public static final java.lang.String DEFAULT_LOCATION_MODE
ClientConfiguration.setLocationOptions(com.veriplace.client.LocationOptions),
Constant Field Values@Deprecated public static final java.lang.String DEFAULT_LOCATION_MODE_PROPERTY
DEFAULT_LOCATION_MODE.public static final java.lang.String PREFERRED_ENCODING
ClientConfiguration.setPreferredEncoding(String),
Constant Field Valuespublic static final java.lang.String USE_LAST_KNOWN_LOCATION
DefaultLocationFilter that can suppress location
errors if there is a last known location: "veriplace.application.location.use-last-known".
Value is "true" or "false"; default is false.
protected final java.util.Properties properties
protected final ClientConfiguration clientConfiguration
| Constructor Detail |
|---|
public DefaultClientFactory(java.util.Properties properties)
throws ConfigurationException
Properties object.
The following properties are required:
The following properties are optional:
SERVER_URIAPPLICATION_TOKEN_VALUEAPPLICATION_TOKEN_SECRETCALLBACK_HOSTCALLBACK_PORTCALLBACK_PATHCALLBACK_INCLUDE_PARAMETERSCALLBACK_EXCLUDE_PARAMETERSDEFAULT_LOCATION_MODEUSE_LAST_KNOWN_LOCATIONPREFERRED_ENCODING
ConfigurationException
@Deprecated
public DefaultClientFactory(java.util.Properties properties,
TokenStore requestTokenStore)
throws ConfigurationException
ConfigurationException| Method Detail |
|---|
public java.util.Properties getProperties()
public ClientConfiguration getClientConfiguration()
ClientConfiguration object that will be used to construct a client.
You can change properties of this object before creating the client.
@Deprecated public TokenStore getRequestTokenStore()
public Client getClient()
throws ConfigurationException
getClient in interface ClientFactoryConfigurationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||