public class ExternalCampaignProvider extends AbstractExternalProvider implements CampaignProvider
Constructor and Description |
---|
ExternalCampaignProvider(org.springframework.web.reactive.function.client.WebClient webClient,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
com.broadleafcommerce.common.extension.TypeFactory typeFactory,
ExternalCampaignProperties properties) |
Modifier and Type | Method and 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.
|
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams, uriVars
public ExternalCampaignProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCampaignProperties properties)
public Optional<String> retrieveTrackingIdForUsableCode(String code, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CampaignProvider
retrieveTrackingIdForUsableCode
in interface CampaignProvider
code
- The provided code from which to retrieve a tracking id.contextInfo
- Context information around sandbox and multitenant state.public 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)
CampaignProvider
validateCampaignCodeUsages
in interface CampaignProvider
cart
- The cart against which to validate code uses.campaignCodes
- The codes to check for validity.contextInfo
- Context information around sandbox and multitenant state.Copyright © 2021. All rights reserved.