Interface TestandtargetCommandService
-
@ProviderType public interface TestandtargetCommandService
TheTestandtargetCommandService
is the entry point for all the operations which require to relay the commands to Adobe Target server without any interpretation.This service is able to perform operations on Adobe Target entry points via REST only. This service doesn't interpret the commands at all, it simply acts like a proxy. The onus of creating the correct body of the request lies with the caller. Similarly, wherever mentioned, this command doesn't interpret the data returned by Target server and simply returns it to the caller.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
createCampaign(Configuration configuration, java.lang.String campaignName, java.lang.String campaignJson)
Creates the campaign from the requestBody provided by the caller.java.lang.String
createSegment(Configuration configuration, java.lang.String segmentName, java.lang.String segmentJson, boolean isReusable, java.lang.String modifiedByUser)
Creates the segment from the requestBody provided by the callerjava.lang.String
createVisualOffer(Configuration configuration, java.lang.String offerName, java.lang.String content)
Creates the visual offervoid
deleteCampaign(Configuration configuration, long campaignID)
Deletes the campaign and the offers it is referring to.void
deleteOffer(Configuration configuration, long offerId)
Deletes the offervoid
deleteSegment(Configuration configuration, long segmentID)
Deletes the segmentjava.util.List<TestandtargetAudience>
getAudienceList(Configuration configuration)
Fetches the list of audiences from Target serverjava.lang.String
getCampaignDetails(Configuration configuration, long campaignId)
Fetches the details of the campaignjava.lang.String
getReportSummary(Configuration configuration, long campaignId)
Given a campaign ID, fetches the summary report from Target serverjava.lang.String
updateCampaign(Configuration configuration, long campaignId, java.lang.String campaignJson)
Updates the campaign to the new requestBody provided by the caller
-
-
-
Method Detail
-
getAudienceList
java.util.List<TestandtargetAudience> getAudienceList(Configuration configuration) throws TestandtargetException
Fetches the list of audiences from Target server- Parameters:
configuration
- a reference to the Cloud Service configuration- Returns:
- a list of TestandtargetAudience
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
deleteCampaign
void deleteCampaign(Configuration configuration, long campaignID) throws TestandtargetException
Deletes the campaign and the offers it is referring to.- Parameters:
configuration
- a reference to the Cloud Service configurationcampaignID
- campaign ID of the campaign- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
createVisualOffer
java.lang.String createVisualOffer(Configuration configuration, java.lang.String offerName, java.lang.String content) throws TestandtargetException
Creates the visual offer- Parameters:
configuration
- a reference to the Cloud Service configurationofferName
- the name of the offercontent
- The content that is to be delivered- Returns:
- the byte stream of the JSON returned by the server
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
createSegment
java.lang.String createSegment(Configuration configuration, java.lang.String segmentName, java.lang.String segmentJson, boolean isReusable, java.lang.String modifiedByUser) throws TestandtargetException
Creates the segment from the requestBody provided by the caller- Parameters:
configuration
- a reference to the Cloud Service configurationsegmentName
- The name of the offersegmentJson
- the request body for the creation of the segmentisReusable
-Boolean
true if the audience is to be reusedmodifiedByUser
- User creating the audience- Returns:
- byte stream of the JSON returned by the server
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
createCampaign
java.lang.String createCampaign(Configuration configuration, java.lang.String campaignName, java.lang.String campaignJson) throws TestandtargetException
Creates the campaign from the requestBody provided by the caller.- Parameters:
configuration
- a reference to the Cloud Service configurationcampaignName
- The name of the campaign. Target doesn't fail in case of duplicate campaign name.campaignJson
- the body of the campaign creation command- Returns:
- The byte stream of the JSON returned by the Target server
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
deleteSegment
void deleteSegment(Configuration configuration, long segmentID) throws TestandtargetException
Deletes the segment- Parameters:
configuration
- a reference to the Cloud Service configurationsegmentID
- The segment ID to be deleted- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
deleteOffer
void deleteOffer(Configuration configuration, long offerId) throws TestandtargetException
Deletes the offer- Parameters:
configuration
- a reference to the Cloud Service configurationofferId
- The offer to be deleted- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
updateCampaign
java.lang.String updateCampaign(Configuration configuration, long campaignId, java.lang.String campaignJson) throws TestandtargetException
Updates the campaign to the new requestBody provided by the caller- Parameters:
configuration
- a reference to the Cloud Service configurationcampaignId
- The id of the campaign to be updatedcampaignJson
- The updated campaign- Returns:
- The byte stream of the JSON returned by the Target server
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
getCampaignDetails
java.lang.String getCampaignDetails(Configuration configuration, long campaignId) throws TestandtargetException
Fetches the details of the campaign- Parameters:
configuration
- a reference to the Cloud Service configurationcampaignId
- The id of the campaign to be updated- Returns:
- The byte stream of the JSON returned by the Target server
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
getReportSummary
java.lang.String getReportSummary(Configuration configuration, long campaignId) throws TestandtargetException
Given a campaign ID, fetches the summary report from Target server- Parameters:
configuration
- a reference to the Cloud Service configurationcampaignId
- campaign ID of the campaign- Returns:
- current report for the campaign ID
- Throws:
TestandtargetException
-TestandtargetException
on all errors
-
-