Interface GenericCampaignConnector
- All Superinterfaces:
CampaignConnector
-
Method Summary
Modifier and TypeMethodDescriptioncallGeneric(String name, Map<String, String> fctParams, CampaignCredentials credentials) Calls a remote JSSP on the campaign instance.callGenericWithBasicAuth(String path, String queryString, CampaignCredentials credentials) Gets data from a given URL with the credentials passed as Basic Authentication headers.postGeneric(String name, Map<String, String> data, CampaignCredentials credentials) Posts data to a remote function on the campaign instance.Methods inherited from interface com.day.cq.mcm.campaign.CampaignConnector
callFunction, getWebserviceConfig, postFunction, retrieveCredentials
-
Method Details
-
callGeneric
CallResults callGeneric(String name, Map<String, String> fctParams, CampaignCredentials credentials) throws ACConnectorExceptionCalls a remote JSSP on the campaign instance.
Note that the caller is required to use
CallResults.destroy()after processing the result of the remote function call.This method supports generic namespaces, hence the namespace must be included in the name of the function (parameter
name).- Parameters:
name- The name of the function to be called (including the namespace)fctParams- The parameters of the function call (name/value parameters)credentials- The credentials to be used for the call- Returns:
- The result of the function call
- Throws:
ACConnectorException- If the remote function could not be called or returned an unexpected status
-
postGeneric
CallResults postGeneric(String name, Map<String, String> data, CampaignCredentials credentials) throws ACConnectorExceptionPosts data to a remote function on the campaign instance.
Note that the caller is required to use
CallResults.destroy()after processing the result of the remote function call.This method supports generic namespaces, hence the namespace must be included in the name of the function (parameter
name).- Parameters:
name- The name of the function to be calleddata- The data to post (name/value)credentials- The credentials to be used for the call- Returns:
- The result of the function call
- Throws:
ACConnectorException- If the remote function could not be called or returned an unexpected status
-
callGenericWithBasicAuth
CallResults callGenericWithBasicAuth(String path, String queryString, CampaignCredentials credentials) throws ACConnectorException Gets data from a given URL with the credentials passed as Basic Authentication headers.
Note that the caller is required to use
CallResults.destroy()after processing the result of the remote function call.This is (for example) the counterpart for Campaign .next's query retrieval.
- Parameters:
path- The (absolute) path to callqueryString- The query string (without leading '?')credentials- The credentials- Returns:
- The result of the function call
- Throws:
ACConnectorException- If the remote function could not be called or returned an unexpected status
-