Interface TestandtargetService
-
@ProviderType @Deprecated public interface TestandtargetService
Deprecated.This service will be removed in future versions. No replacement will be provided.TheTestandtargetServiceis the entry point for all the operations which interact with the Adobe Target APIThis service is able to perform operations on both Adobe Target entry points - XML and REST. While care has been taken to make the API backend transparent, to the caller, there are some methods where there are small differences, usually due the XML API providing less information than the REST API. These limitations are clearly documented in the method-level javadocs.
As such, clients of this service are encouraged to use the REST API rather than XML API. This setting is a property on the cloud service configuration and is properly saved by the cloud configuration UI.
- See Also:
TestandtargetCampaignMediator
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCAMPAIGN_STATE_APPROVEDDeprecated.static java.lang.StringCAMPAIGN_STATE_DEACTIVATEDDeprecated.static java.lang.StringOPERATION_CAMPAIGN_LISTDeprecated.campaign list operationstatic java.lang.StringOPERATION_DELETEDeprecated.Widget offer deletion operationstatic java.lang.StringOPERATION_FOLDER_LISTDeprecated.folder list operationstatic java.lang.StringOPERATION_GET_HTML_OFFERDeprecated.HTML offer get operationstatic java.lang.StringOPERATION_HTML_OFFER_LISTDeprecated.HTML offer list operationstatic java.lang.StringOPERATION_REPORTDeprecated.static java.lang.StringOPERATION_SAVEDeprecated.Widget offer save operationstatic java.lang.StringOPERATION_SAVE_CAMPAIGNDeprecated.Campaign create operationstatic java.lang.StringOPERATION_SAVE_HTML_OFFERDeprecated.HTML offer save operationstatic java.lang.StringOPERATION_SET_CAMPAIGN_STATEDeprecated.save operationstatic java.lang.StringPN_AUTHENTICATIONDeprecated.Property name authenticationstatic java.lang.StringPN_CLIENTCODEDeprecated.Property name client codestatic java.lang.StringPN_EMAILDeprecated.Property name E-Mailstatic java.lang.StringPN_PASSWORDDeprecated.Property name passwordstatic java.lang.StringPN_TENANTIDDeprecated.Property name tenant id
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidcheckCredentials(java.lang.String clientcode, java.lang.String email, java.lang.String password)Deprecated.longcreateHTMLOffer(Configuration configuration, SaveOfferRequest request)Deprecated.Creates a HTML offervoidcreateHTMLOffer(Configuration configuration, java.lang.String offerName, java.lang.String folderId, java.lang.String content)Deprecated.Creates an HTML offer.java.lang.StringcreateWidgetOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id)Deprecated.CampaigngetCampaignById(Configuration configuration, long campaignId, CampaignType campaignType)Deprecated.CampaigngetCampaignByThirdPartyId(Configuration configuration, java.lang.String thirdPartyId, CampaignType campaignType)Deprecated.Retrieves a campaign from Target using the thirdPartyId propertyHTMLOffergetHTMLOffer(Configuration configuration, java.lang.String offerName)Deprecated.Retrieves a HTML offer from Adobe Targetjava.util.List<java.lang.String>getMboxActivityCollisions(Configuration configuration, java.lang.String mboxName, java.lang.String mboxUrl)Deprecated.PerformanceReportgetPerformanceReport(Configuration configuration, PerformanceReportRequest request)Deprecated.Retrieves the performance report data for a specific campaignReportsgetPerformanceReport(Configuration configuration, ReportType reportType, java.lang.String thirdPartyCampaignId, java.lang.String campaignId, java.util.Date start, java.util.Date end, Resolution resolution)Deprecated.Retrieves the performance report data for a specific campaignViewOfferResponsegetReusableOffer(Configuration configuration, ViewOfferRequest request)Deprecated.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)Deprecated.FolderlistFolders(Configuration configuration)Deprecated.Returns a tree of folders available in Adobe Target.java.util.List<java.lang.String>listMboxNames(Configuration configuration)Deprecated.Get the mboxes list for a given configurationjava.util.Collection<ViewOfferResponse>listOffers(Configuration configuration, ListOffersRequest request)Deprecated.Returns a list of offers currently registered in Targetjava.util.Collection<Offer>listOffers(Configuration configuration, java.lang.String folderId)Deprecated.java.util.List<Segment>listSegments(Configuration configuration, ListSegmentsRequest request)Deprecated.Retrieves a list of segments for the specifiedconfigurationjava.lang.StringpublishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id)Deprecated.booleansetCampaignState(Configuration configuration, java.lang.String campaignState, java.lang.String testAndTargetCampaignId, java.lang.String thirdPartyCampaignId)Deprecated.Updates the state of the campaign in Adobe Target.java.lang.StringunpublishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id)Deprecated.Deletes a widget offer on Adobe Target.
-
-
-
Field Detail
-
OPERATION_FOLDER_LIST
static final java.lang.String OPERATION_FOLDER_LIST
Deprecated.folder list operation- See Also:
- Constant Field Values
-
OPERATION_CAMPAIGN_LIST
static final java.lang.String OPERATION_CAMPAIGN_LIST
Deprecated.campaign list operation- See Also:
- Constant Field Values
-
OPERATION_SAVE_HTML_OFFER
static final java.lang.String OPERATION_SAVE_HTML_OFFER
Deprecated.HTML offer save operation- See Also:
- Constant Field Values
-
OPERATION_GET_HTML_OFFER
static final java.lang.String OPERATION_GET_HTML_OFFER
Deprecated.HTML offer get operation- See Also:
- Constant Field Values
-
OPERATION_HTML_OFFER_LIST
static final java.lang.String OPERATION_HTML_OFFER_LIST
Deprecated.HTML offer list operation- See Also:
- Constant Field Values
-
OPERATION_DELETE
static final java.lang.String OPERATION_DELETE
Deprecated.Widget offer deletion operation- See Also:
- Constant Field Values
-
OPERATION_SAVE
static final java.lang.String OPERATION_SAVE
Deprecated.Widget offer save operation- See Also:
- Constant Field Values
-
OPERATION_SET_CAMPAIGN_STATE
static final java.lang.String OPERATION_SET_CAMPAIGN_STATE
Deprecated.save operation- See Also:
- Constant Field Values
-
OPERATION_SAVE_CAMPAIGN
static final java.lang.String OPERATION_SAVE_CAMPAIGN
Deprecated.Campaign create operation- See Also:
- Constant Field Values
-
OPERATION_REPORT
static final java.lang.String OPERATION_REPORT
Deprecated.- See Also:
- Constant Field Values
-
PN_EMAIL
static final java.lang.String PN_EMAIL
Deprecated.Property name E-Mail- See Also:
- Constant Field Values
-
PN_PASSWORD
static final java.lang.String PN_PASSWORD
Deprecated.Property name password- See Also:
- Constant Field Values
-
CAMPAIGN_STATE_APPROVED
static final java.lang.String CAMPAIGN_STATE_APPROVED
Deprecated.- See Also:
- Constant Field Values
-
CAMPAIGN_STATE_DEACTIVATED
static final java.lang.String CAMPAIGN_STATE_DEACTIVATED
Deprecated.- See Also:
- Constant Field Values
-
PN_CLIENTCODE
static final java.lang.String PN_CLIENTCODE
Deprecated.Property name client code- See Also:
- Constant Field Values
-
PN_TENANTID
static final java.lang.String PN_TENANTID
Deprecated.Property name tenant id- See Also:
- Constant Field Values
-
PN_AUTHENTICATION
static final java.lang.String PN_AUTHENTICATION
Deprecated.Property name authentication- See Also:
- Constant Field Values
-
-
Method Detail
-
listFolders
Folder listFolders(Configuration configuration) throws TestandtargetException
Deprecated.Returns a tree of folders available in Adobe Target. Folders are not supported when using REST API.- Parameters:
configuration- ServiceConfiguration- Returns:
- The tree of folders available in Adobe Target. This method returns <code>null</code> when using Adobe Target REST API
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
publishOffer
@Deprecated java.lang.String publishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
Deprecated.Creates a widget offer on Adobe Target.- Parameters:
configuration- ServiceConfigurationname- 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 offer- Returns:
- A string representation of the third-party id
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
unpublishOffer
java.lang.String unpublishOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
Deprecated.Deletes a widget offer on Adobe Target.- Parameters:
configuration- ServiceConfigurationname- 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 offer- Returns:
- A string representation of the third-party id
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
createWidgetOffer
@Deprecated java.lang.String createWidgetOffer(Configuration configuration, java.lang.String name, java.lang.String url, java.lang.String id) throws TestandtargetException
Deprecated.Creates a widget offer.- Parameters:
configuration- ServiceConfigurationname- 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 offer- Returns:
- A string representation of the third-party id
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
createHTMLOffer
void createHTMLOffer(Configuration configuration, java.lang.String offerName, java.lang.String folderId, java.lang.String content) throws TestandtargetException
Deprecated.Creates an HTML offer.- Parameters:
configuration- ServiceConfigurationofferName- Name of the offerfolderId- Folder idcontent- Offer content as plain HTML.- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
createHTMLOffer
long createHTMLOffer(Configuration configuration, SaveOfferRequest request) throws TestandtargetException
Deprecated.Creates a HTML offer- Parameters:
configuration- the cloud-service configurationrequest- aSaveOfferRequestobject containing the operation's details, such as the offer data. This object may be incomplete, i.e. just contain the essential data for creating an offer - name and content- Returns:
- the offer id, as set by Adobe Target. If the XML API is used this method return -1
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
getHTMLOffer
HTMLOffer getHTMLOffer(Configuration configuration, java.lang.String offerName) throws TestandtargetException
Deprecated.Retrieves a HTML offer from Adobe Target- Parameters:
configuration- ServiceConfigurationofferName- Name of the offer- Returns:
- An HTMLOffer
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
getReusableOffer
@Deprecated ViewOfferResponse getReusableOffer(Configuration configuration, ViewOfferRequest request) throws TestandtargetException
Deprecated.Retrieves an offer from Adobe Target- Parameters:
configuration- the cloud services configuration for the Adobe Target accountrequest- aViewOfferRequestobject containing the request data- Returns:
- a
ViewOfferResponseobject containing the offer's data - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
listOffers
@Deprecated java.util.Collection<Offer> listOffers(Configuration configuration, java.lang.String folderId) throws TestandtargetException
Deprecated.Returns a JSON representation of offers.- Parameters:
configuration- ServiceConfigurationfolderId- Folder id- Returns:
- An
CollectionofOfferobjects - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
listOffers
java.util.Collection<ViewOfferResponse> listOffers(Configuration configuration, ListOffersRequest request) throws TestandtargetException
Deprecated.Returns a list of offers currently registered in Target- Parameters:
configuration- a reference to the serviceConfigurationrequest- aListOffersRequestobject containing the request details- Returns:
- a collection of
ViewOfferResponseobjects. - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
listCampaigns
@Deprecated 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) throws TestandtargetException
Deprecated.Returns aMapwith campaigns. The Map key contains the campaign ID and the Map value the campaign name.- Parameters:
configuration- ServiceConfigurationbefore- 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.- Returns:
- Map of campaigns
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
setCampaignState
boolean setCampaignState(Configuration configuration, java.lang.String campaignState, java.lang.String testAndTargetCampaignId, java.lang.String thirdPartyCampaignId) throws TestandtargetException
Deprecated.Updates the state of the campaign in Adobe Target.- Parameters:
configuration- ServiceConfigurationcampaignState- The campaign state , one ofCAMPAIGN_STATE_APPROVEDorCAMPAIGN_STATE_DEACTIVATEDtestAndTargetCampaignId- The campaign identifier. You must provide either testAndTargetCampaignId or thirdPartyCampaignIdthirdPartyCampaignId- The third-party campaign identifier. You must provide either testAndTargetCampaignId or thirdPartyCampaignId- Returns:
- true if the operation succeeded
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
checkCredentials
void checkCredentials(java.lang.String clientcode, java.lang.String email, java.lang.String password) throws TestandtargetExceptionDeprecated.- Throws:
TestandtargetException
-
getPerformanceReport
Reports 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
Deprecated.Retrieves the performance report data for a specific campaignAll parameters are mandatory, except for
campaignIdandthirdPartyId, out of which exactly one must be specified.- Parameters:
configuration- the cloud services configuration associated with the Adobe Target accountreportType- aReportTypeobject representing the type of reportcampaignId- the id of the campaign, as defined in Adobe TargetthirdPartyCampaignId- the third party id of the campaignstart- the start date of the campaign (used as report filter)end- the end date of the campaign (used as a report filter)resolution- the campaign's resolution (hour, day etc.)- Returns:
- performance report data for a specific campaign
- Throws:
TestandtargetException-TestandtargetExceptionon all errors- See Also:
- Adobe Target performance report API
-
getPerformanceReport
PerformanceReport getPerformanceReport(Configuration configuration, PerformanceReportRequest request) throws TestandtargetException
Deprecated.Retrieves the performance report data for a specific campaignThe data returned by this method always returns visits for the
PerformanceReportItem.getEntryCount()methodNote that it is recommended that the
requestis configured with a campaign id rather than a third party id. The reason is that when using the REST API an additional call is performed to map the third party id to a campaign id.- Parameters:
configuration- the cloud services configuration associated with the Adobe Target accountrequest- the request object holding all data needed to retrieve the performance data- Returns:
- the performance report data, never
null - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
listSegments
java.util.List<Segment> listSegments(Configuration configuration, ListSegmentsRequest request) throws TestandtargetException
Deprecated.Retrieves a list of segments for the specifiedconfigurationOptional filtering parameters may be set in the
requestparameter.- Parameters:
configuration- ServiceConfigurationrequest- optional request parameters. May be null.- Returns:
- a list of segments, possibly empty, never
null - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
getMboxActivityCollisions
@Deprecated java.util.List<java.lang.String> getMboxActivityCollisions(Configuration configuration, java.lang.String mboxName, java.lang.String mboxUrl) throws TestandtargetException
Deprecated.Detects the usage of an mbox in multiple activities- Parameters:
configuration- a reference to the Cloud Service configurationmboxName- the name of the mboxmboxUrl- the URL of the mbox. "http://localhost" is accepted- Returns:
- a list of campaign names which reference the specified mbox. The return value can be empty, which signals that there are no collisions. It can also be
null, which signals that there is no information about collisions - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
listMboxNames
java.util.List<java.lang.String> listMboxNames(Configuration configuration) throws TestandtargetException
Deprecated.Get the mboxes list for a given configuration- Parameters:
configuration- a reference to the Cloud Service configuration- Returns:
- a list of mbox names. The list can be empty if no mboxes are available for the received configuration
- Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
getCampaignByThirdPartyId
Campaign getCampaignByThirdPartyId(Configuration configuration, java.lang.String thirdPartyId, CampaignType campaignType) throws TestandtargetException
Deprecated.Retrieves a campaign from Target using the thirdPartyId property- Parameters:
configuration- theConfigurationassociated with the Target accountthirdPartyId- the thirdPartyId of the campaigncampaignType- the type of the campaign -landingPageorab- Returns:
- a
Campaignobject ornullif the campaign cannot be found in Target - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
getCampaignById
@Deprecated Campaign getCampaignById(Configuration configuration, long campaignId, CampaignType campaignType) throws TestandtargetException
Deprecated.Retrieves a campaign from Target using the id property- Parameters:
configuration- theConfigurationassociated with the Target accountcampaignId- the id of the campaign, as received from Target during a previous updatecampaignType- the type of the campaign -landingPageorab- Returns:
- a
Campaignornullif the campaign cannot be found in Target - Throws:
TestandtargetException-TestandtargetExceptionon all errors
-
-