public interface TestandtargetService
TestandtargetCampaignMediator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CAMPAIGN_STATE_APPROVED |
static java.lang.String |
CAMPAIGN_STATE_DEACTIVATED |
static java.lang.String |
OPERATION_CAMPAIGN_LIST
campaign list operation
|
static java.lang.String |
OPERATION_DELETE
Widget offer deletion operation
|
static java.lang.String |
OPERATION_FOLDER_LIST
folder list operation
|
static java.lang.String |
OPERATION_GET_HTML_OFFER
HTML offer get operation
|
static java.lang.String |
OPERATION_HTML_OFFER_LIST
HTML offer list operation
|
static java.lang.String |
OPERATION_REPORT |
static java.lang.String |
OPERATION_SAVE
Widget offer save operation
|
static java.lang.String |
OPERATION_SAVE_CAMPAIGN
Campaign create operation
|
static java.lang.String |
OPERATION_SAVE_HTML_OFFER
HTML offer save operation
|
static java.lang.String |
OPERATION_SET_CAMPAIGN_STATE
save operation
|
static java.lang.String |
PN_CLIENTCODE
Property name client code
|
static java.lang.String |
PN_EMAIL
Property name E-Mail
|
static java.lang.String |
PN_PASSWORD
Property name password
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkCredentials(java.lang.String clientcode,
java.lang.String email,
java.lang.String password)
Checks the provided
email, password and
clientcode by issuing an API call on the method campaignList
with a dummy search string. |
void |
createHTMLOffer(Configuration configuration,
java.lang.String offerName,
java.lang.String folderId,
java.lang.String content)
Creates an HTML offer.
|
java.lang.String |
createWidgetOffer(Configuration configuration,
java.lang.String name,
java.lang.String url,
java.lang.String id)
Creates a widget offer.
|
HTMLOffer |
getHTMLOffer(Configuration configuration,
java.lang.String offerName)
Gets a HTML offer.
|
Reports |
getPerformanceReport(Configuration configuration,
ReportType reportType,
java.lang.String thirdPartyCampaignId,
java.lang.String campaignId,
java.util.Date start,
java.util.Date end,
Resolution resolution)
Retrieves the performance report data for a specific campaign
|
java.util.Map<java.lang.Integer,java.lang.String> |
listCampaigns(Configuration configuration,
java.util.Date before,
java.util.Date after,
java.lang.String environment,
java.lang.String name,
java.lang.String state,
java.lang.String label)
Returns a
Map with campaigns. |
Folder |
listFolders(Configuration configuration)
Returns a
Tree of the available folders on Test&Target. |
java.util.Collection<Offer> |
listOffers(Configuration configuration,
java.lang.String folderId)
Returns a JSON representation of offers.
|
java.lang.String |
publishOffer(Configuration configuration,
java.lang.String name,
java.lang.String url,
java.lang.String id)
Deprecated.
|
void |
saveCampaign(Configuration configuration,
java.lang.String thirdPartyId,
com.day.cq.analytics.testandtarget.impl.TestandtargetCampaign campaign)
Creates or updates a campaign
|
boolean |
setCampaignState(Configuration configuration,
java.lang.String campaignState,
java.lang.String testAndTargetCampaignId,
java.lang.String thirdPartyCampaignId)
Set the state of a campaign.
|
java.lang.String |
unpublishOffer(Configuration configuration,
java.lang.String name,
java.lang.String url,
java.lang.String id)
Deprecated.
|
static final java.lang.String OPERATION_FOLDER_LIST
static final java.lang.String OPERATION_CAMPAIGN_LIST
static final java.lang.String OPERATION_SAVE_HTML_OFFER
static final java.lang.String OPERATION_GET_HTML_OFFER
static final java.lang.String OPERATION_HTML_OFFER_LIST
static final java.lang.String OPERATION_DELETE
static final java.lang.String OPERATION_SAVE
static final java.lang.String OPERATION_SET_CAMPAIGN_STATE
static final java.lang.String OPERATION_SAVE_CAMPAIGN
static final java.lang.String OPERATION_REPORT
static final java.lang.String PN_CLIENTCODE
static final java.lang.String PN_EMAIL
static final java.lang.String PN_PASSWORD
static final java.lang.String CAMPAIGN_STATE_APPROVED
static final java.lang.String CAMPAIGN_STATE_DEACTIVATED
Folder listFolders(Configuration configuration) throws TestandtargetException
Tree of the available folders on Test&Target.configuration - Service ConfigurationTree of available foldersTestandtargetException@Deprecated java.lang.String publishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
configuration - Service Configurationname - Name of the widget offerurl - The encoded URL of the third-party server that hosts the
dynamically generated responseid - The third-party ID of the widget offerTestandtargetException@Deprecated java.lang.String unpublishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
configuration - Service Configurationname - Name of the widget offerurl - The encoded URL of the third-party server that hosts the
dynamically generated responseid - The third-party ID of the widget offerTestandtargetExceptionvoid saveCampaign(Configuration configuration, java.lang.String thirdPartyId, com.day.cq.analytics.testandtarget.impl.TestandtargetCampaign campaign) throws TestandtargetException
configuration - Service ConfigurationthirdPartyId - The campaign third party id, used for tracking updatescampaign - TODOTestandtargetExceptionjava.lang.String createWidgetOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
configuration - Service Configurationname - Name of the widget offerurl - The encoded URL of the third-party server that hosts the
dynamically generated responseid - The third-party ID of the widget offerTestandtargetExceptionvoid createHTMLOffer(Configuration configuration, java.lang.String offerName, java.lang.String folderId, java.lang.String content) throws TestandtargetException
configuration - Service ConfigurationofferName - Name of the offerfolderId - Folder idcontent - Offer content as plain HTML.TestandtargetExceptionHTMLOffer getHTMLOffer(Configuration configuration, java.lang.String offerName) throws TestandtargetException
configuration - Service ConfigurationofferName - Name of the offerfolderId - Folder idTestandtargetExceptionjava.util.Collection<Offer> listOffers(Configuration configuration, java.lang.String folderId) throws TestandtargetException
configuration - Service ConfigurationfolderId - Folder idCollection of OffersTestandtargetExceptionjava.util.Map<java.lang.Integer,java.lang.String> listCampaigns(Configuration configuration, java.util.Date before, java.util.Date after, java.lang.String environment, java.lang.String name, java.lang.String state, java.lang.String label) throws TestandtargetException
Map with campaigns. The Map key contains the campaign
ID and the Map value the campaign name.configuration - Service Configurationbefore - A date value. Includes campaigns that were active at least
once before the specified date. By default, the before
parameter is 2100-01-01T00:00.after - A date value. Includes campaigns that were active at least
once after the specified date. By default, the after parameter
is 1969-00-00T00:00.environment - A URL-encoded host group name, as defined in the T&T Tool. By
default, the environment value is Production.name - The campaign name, or portion of the campaign name, that you
want to match.state - Comma-separated list of states to match. Supported values
include: saved, activated, library. By default, the filtered
results include all states.label - Comma-separated list of labels to match. By default, the
filtered results include all labels.TestandtargetExceptionboolean setCampaignState(Configuration configuration, java.lang.String campaignState, java.lang.String testAndTargetCampaignId, java.lang.String thirdPartyCampaignId) throws TestandtargetException
configuration - Service Configurationstate - The campaign state , one of CAMPAIGN_STATE_APPROVED or CAMPAIGN_STATE_DEACTIVATEDtestAndTargetCampaignId - The campaign identifier. You must provide either testAndTargetCampaignId or thirdPartyCampaignIdthirdPartyCampaignId - The third-party campaign identifier. You must provide either testAndTargetCampaignId or thirdPartyCampaignIdTestandtargetExceptionvoid checkCredentials(java.lang.String clientcode,
java.lang.String email,
java.lang.String password)
throws TestandtargetException
email, password and
clientcode by issuing an API call on the method campaignList
with a dummy search string.email - password - clientcode - TestandtargetExceptionReports getPerformanceReport(Configuration configuration, ReportType reportType, java.lang.String thirdPartyCampaignId, java.lang.String campaignId, java.util.Date start, java.util.Date end, Resolution resolution) throws TestandtargetException
All parameters are mandatory, except for campaignId and thirdPartyId , out of which exactly one must be specified.
configuration - reportType - campaignId - thirdPartyCampaignId - start - end - resolution - TestandtargetException