|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.force.sdk.connector.ForceConnectorUtils
public final class ForceConnectorUtils
Shared utilities for Force.com connectors.
Method Summary | |
---|---|
static String |
buildForceApiEndpoint(String endpoint)
Builds a valid Force.com API endpoint. |
static Map<ForceConnectionProperty,String> |
loadConnectorPropsFromName(String connectionName)
Loads Force.com connection properties from a connection name. |
static Map<ForceConnectionProperty,String> |
loadConnectorPropsFromUrl(String connectionUrl)
Loads Force.com connection properties from a Force.com connection url |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String buildForceApiEndpoint(String endpoint)
This method will pass through fully qualified, versioned Force.com API endpoints. If the endpoint parameter is found not to be a fully qualified Force.com API endpoint, then one will be constructed using the API version bound to the Force.com SDK.
All built endpoints will be forced to use the https:// protocol unless
the host is localhost
or contains the keyword "internal".
endpoint
- a non null
, non empty String
representation
of a Force.com endpoint
public static Map<ForceConnectionProperty,String> loadConnectorPropsFromName(String connectionName) throws IOException
A connection name can represent connection properties in several locations (and different formats). Connection properties will be searched for in the following order:
connectionName
- a name which represents one of the locations above
Map
which maps ForceConnectionProperty
enum values to connection property values
IOException
- if an attempt to interact with a classpath properties file or the CLIForce connection
file results in a thrown IOException
ForceConnectionProperty
public static Map<ForceConnectionProperty,String> loadConnectorPropsFromUrl(String connectionUrl)
A Force.com connection url must start with the force:// protocol followed
by a non empty endpoint string. Connection properties are specified with
key=value pairs and delimited by a semi-colon (';') after the endpoint.
Any connection property keys not recognized (i.e. that are not in the
ForceConnectionProperty
enum) are ignored.
connectionUrl
- a well qualified Force.com connection URL
Map
which maps ForceConnectionProperty
enum values to connection property values
IllegalArgumentException
- if connectionUrl is null
IllegalArgumentException
- if connectionUrl does not start with force://
IllegalArgumentException
- if the endpoint within connectionUrl is empty
IllegalArgumentException
- if the endpoint within connectionUrl is not validForceConnectionProperty
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |