Interface CampaignProvider

  • All Known Implementing Classes:
    ExternalCampaignProvider

    public interface CampaignProvider
    Provider for interfacing with Campaigns.
    Author:
    Chad Harchar (charchar)
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Optional<String> retrieveTrackingIdForUsableCode​(String code, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Determine a tracking id for the provided code string, or else an empty string.
      com.broadleafcommerce.promotion.campaign.client.web.context.CampaignCodeUsageValidationResult validateCampaignCodeUsages​(com.broadleafcommerce.cart.client.domain.Cart cart, List<String> campaignCodes, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieve validation information regarding the cart's usage of the provided campaign codes to determine if the usage is still valid.
    • Method Detail

      • retrieveTrackingIdForUsableCode

        Optional<String> retrieveTrackingIdForUsableCode​(String code,
                                                         @Nullable
                                                         com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Determine a tracking id for the provided code string, or else an empty string.
        Parameters:
        code - The provided code from which to retrieve a tracking id.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        A tracking id for the provided code string, or else an empty string.
      • validateCampaignCodeUsages

        com.broadleafcommerce.promotion.campaign.client.web.context.CampaignCodeUsageValidationResult validateCampaignCodeUsages​(com.broadleafcommerce.cart.client.domain.Cart cart,
                                                                                                                                 List<String> campaignCodes,
                                                                                                                                 @Nullable
                                                                                                                                 com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Retrieve validation information regarding the cart's usage of the provided campaign codes to determine if the usage is still valid.
        Parameters:
        cart - The cart against which to validate code uses.
        campaignCodes - The codes to check for validity.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        A validation result that holds information about which campaign code usages are invalid and why.