Interface CampaignConnector
-
- All Known Subinterfaces:
GenericCampaignConnector
public interface CampaignConnector
A service that is used to access a remote Adobe Campaign instance.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CallResults
callFunction(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> fctParams, CampaignCredentials credentials)
Calls a remote function on the campaign instance.Configuration
getWebserviceConfig(Resource resource)
Determines the webservice config to be used.CallResults
postFunction(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> data, CampaignCredentials credentials)
Posts data to a remote function on the campaign instance.CampaignCredentials
retrieveCredentials(Configuration config)
Retrieves the credentials from the specified webservice config.
-
-
-
Method Detail
-
getWebserviceConfig
Configuration getWebserviceConfig(Resource resource) throws ACConnectorException
Determines the webservice config to be used. This method respects inheritance.- Parameters:
resource
- The resource to get the webservice config for- Returns:
- The webservice config
- Throws:
ACConnectorException
- if the webservice configuration is not present or invalid
-
retrieveCredentials
CampaignCredentials retrieveCredentials(Configuration config) throws ACConnectorException
Retrieves the credentials from the specified webservice config.
- Parameters:
config
- The webservice config- Returns:
- The credentials
- Throws:
ACConnectorException
- if there are no credentials present or the credentials could not be decrypted
-
callFunction
CallResults callFunction(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> fctParams, CampaignCredentials credentials) throws ACConnectorException
Calls 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.The remote function needs to reside in the default namespace (/jssp/nms/). To call remote functions in a generic namespace, use
GenericCampaignConnector.callGeneric(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.day.cq.mcm.campaign.CampaignCredentials)
instead.- Parameters:
name
- The name of the function to be called (in /jssp/nms/; the value must not include /jssp/nms/)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
-
postFunction
CallResults postFunction(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> data, CampaignCredentials credentials) throws ACConnectorException
Posts 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.The remote function needs to reside in the default namespace (/jssp/nms/). To call remote functions in a generic namespace, use
GenericCampaignConnector.postGeneric(java.lang.String, java.util.Map<java.lang.String, java.lang.String>, com.day.cq.mcm.campaign.CampaignCredentials)
instead.- Parameters:
name
- The name of the function to be called (in /jssp/nms/; the value must not include /jssp/nms/)data
- 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
-
-