Interface TestandtargetCommandService


  • @ProviderType
    public interface TestandtargetCommandService
    The TestandtargetCommandService 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 Detail

      • 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 configuration
        offerName - the name of the offer
        content - 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 configuration
        segmentName - The name of the offer
        segmentJson - the request body for the creation of the segment
        isReusable - Boolean true if the audience is to be reused
        modifiedByUser - 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 configuration
        campaignName - 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
      • 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 configuration
        campaignId - The id of the campaign to be updated
        campaignJson - 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 configuration
        campaignId - 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 configuration
        campaignId - campaign ID of the campaign
        Returns:
        current report for the campaign ID
        Throws:
        TestandtargetException - TestandtargetException on all errors