Package wt.util
Class CustomIntegrationHelper
java.lang.Object
wt.util.CustomIntegrationHelper
Helper class to retrieve configured connection information for external HTTP/HTTPs
endpoints.
Example Usage:
Supported API: true
Extendable: false
CustomIntegrationHelper customIntegrationHelper = new CustomIntegrationHelper("erp-dev");
// get absolute url associated with "materialapi" URL fragment for erp-dev system
customIntegrationHelper.getNamedEndpoint("materialapi");
// get a map of saved secret pairs for erp-dev system
customIntegrationHelper.getSecretsMap();
// get an SSLContent object required for establishing HTTPS connections with erp-dev system
customIntegrationHelper.getSSLContext();
Supported API: true
Extendable: false
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the base URI for the specified connection name
Supported API: trueGets an initialized SSLContext object required for establishing HTTPS connectiongetNamedEndpointURI(String endpointName) Gets the String representation of URI for the specified connection nameReturns a map of unencrypted key value pairs of stored secrets for this endpoint
-
Constructor Details
-
CustomIntegrationHelper
Constructor for this class Accepts the connection name as a parameter for which we need to fetch the configured connection information
Supported API: true- Parameters:
connectionName- the name of connection/endpoint for which we need to fetch the configured connection information.
-
-
Method Details
-
getBaseURI
Gets the base URI for the specified connection name
Supported API: true- Parameters:
endpointName- the endpoint name for which we want to get the base URI- Returns:
- the base URI for the endpoint associated with this endpoint name
-
getNamedEndpointURI
Gets the String representation of URI for the specified connection name If the baseurl is provided, the return value will be automatically prefixed with the baseurl. Example: If the baseurl provided ishttps://www.dummy.comand URL fragments provided are:- /material
- /inventory
getNamedEndpointURI("material")will returnhttps://www.dummy.com/materialand
getNamedEndpointURI("inventory")will returnhttps://www.dummy.com/inventory
Supported API: true- Parameters:
endpointName- the endpoint name for which we want to get the String URI- Returns:
- the String URI for the endpoint associated with this endpoint name
-
getSecretsMap
Returns a map of unencrypted key value pairs of stored secrets for this endpoint
Supported API: true- Returns:
- A map of unencrypted key value pairs of secrets
-
getInitializedSSLContext
Gets an initialized SSLContext object required for establishing HTTPS connection The SSLContext will be already initialized using KeyManagerFactories and TrustManagerFactories based on client certificate and/or server certificate provided to PTC.
Supported API: true- Returns:
- Initialized SSLContext object which can be used to make HTTPS connections to this endpoint
- Throws:
NoSuchAlgorithmException
-