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 String
CAMPAIGN_CLIENT_ID
Deprecated.-
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 CodeGenerationResult
generateCodesForVouchers(VoucherCodeGenerationRequest voucherCodeGenerationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
GeneratesCampaignCodes
for voucher offers based on the givenVoucherCodeGenerationRequest
.protected ExternalCampaignProperties
getProperties()
protected String
getServiceClient()
-
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:CampaignProvider
GeneratesCampaignCodes
for voucher offers based on the givenVoucherCodeGenerationRequest
.This method will generate and return the
CampaignCodes
in the same request, therefore it's meant for small batch of code generation only.- Specified by:
generateCodesForVouchers
in interfaceCampaignProvider
- Parameters:
voucherCodeGenerationRequest
- theVoucherCodeGenerationRequest
to generate the voucherCampaignCodes
withcontextInfo
- context information surrounding sandboxing and multitenant state- Returns:
- the
CodeGenerationResult
containing the generated voucherCampaignCodes
based on the givenVoucherCodeGenerationRequest
-
getServiceClient
protected String getServiceClient()
-
getProperties
protected ExternalCampaignProperties getProperties()
-
-