Class ExternalCampaignProvider
- java.lang.Object
 - 
- com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
 - 
- com.broadleafcommerce.orderoperation.service.provider.external.ExternalCampaignProvider
 
 
 
- 
- All Implemented Interfaces:
 CampaignProvider
public class ExternalCampaignProvider extends AbstractExternalProvider implements CampaignProvider
- Author:
 - Sunny Yu
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static StringCAMPAIGN_CLIENT_IDDeprecated.- 
Fields inherited from class com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
RSQL_FILTER_PARAM 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ExternalCampaignProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCampaignProperties properties) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CodeGenerationResultgenerateCodesForVouchers(VoucherCodeGenerationRequest voucherCodeGenerationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)GeneratesCampaignCodesfor voucher offers based on the givenVoucherCodeGenerationRequest.protected ExternalCampaignPropertiesgetProperties()protected StringgetServiceClient()- 
Methods inherited from class com.broadleafcommerce.orderoperation.service.provider.external.AbstractExternalProvider
executeRequest, getHeaders, getObjectMapper, getTypeFactory, getWebClient, pageableToParams 
 - 
 
 - 
 
- 
- 
Field Detail
- 
CAMPAIGN_CLIENT_ID
@Deprecated protected static final String CAMPAIGN_CLIENT_ID
Deprecated.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ExternalCampaignProvider
public ExternalCampaignProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory, ExternalCampaignProperties properties) 
 - 
 
- 
Method Detail
- 
generateCodesForVouchers
public CodeGenerationResult generateCodesForVouchers(VoucherCodeGenerationRequest voucherCodeGenerationRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:CampaignProviderGeneratesCampaignCodesfor voucher offers based on the givenVoucherCodeGenerationRequest.This method will generate and return the
CampaignCodesin the same request, therefore it's meant for small batch of code generation only.- Specified by:
 generateCodesForVouchersin interfaceCampaignProvider- Parameters:
 voucherCodeGenerationRequest- theVoucherCodeGenerationRequestto generate the voucherCampaignCodeswithcontextInfo- context information surrounding sandboxing and multitenant state- Returns:
 - the 
CodeGenerationResultcontaining the generated voucherCampaignCodesbased on the givenVoucherCodeGenerationRequest 
 
- 
getServiceClient
protected String getServiceClient()
 
- 
getProperties
protected ExternalCampaignProperties getProperties()
 
 - 
 
 -