Class DefaultOfferUsageValidator
- java.lang.Object
-
- com.broadleafcommerce.promotion.offer.service.validation.DefaultOfferUsageValidator
-
- All Implemented Interfaces:
OfferUsageValidator
public class DefaultOfferUsageValidator extends Object implements OfferUsageValidator
-
-
Constructor Summary
Constructors Constructor Description DefaultOfferUsageValidator(OfferAuditDetailService<? extends OfferAuditDetail> auditService, OfferService<? extends Offer> offerService, OfferUserService offerUserService, com.broadleafcommerce.common.extension.TypeFactory offerFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected OfferAuditDetailService<? extends OfferAuditDetail>getAuditService()protected com.broadleafcommerce.common.extension.TypeFactorygetOfferFactory()protected OfferService<? extends Offer>getOfferService()protected OfferUserServicegetOfferUserService()com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResultvalidateOfferUsages(List<String> offerIds, com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)With the provided offer ids andCustomerContext, determine which offers are no longer usable in a given context.
-
-
-
Constructor Detail
-
DefaultOfferUsageValidator
public DefaultOfferUsageValidator(OfferAuditDetailService<? extends OfferAuditDetail> auditService, OfferService<? extends Offer> offerService, OfferUserService offerUserService, com.broadleafcommerce.common.extension.TypeFactory offerFactory)
-
-
Method Detail
-
validateOfferUsages
public com.broadleafcommerce.promotion.offer.client.web.context.OfferAndOfferCodeUsageValidationResult validateOfferUsages(@NonNull List<String> offerIds, @NonNull com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)Description copied from interface:OfferUsageValidatorWith the provided offer ids andCustomerContext, determine which offers are no longer usable in a given context.- Specified by:
validateOfferUsagesin interfaceOfferUsageValidator- Parameters:
offerIds- The ids of the offers to check for usability.customerContext- The context of the customer the offers are for.context- Context information around sandbox and multitenant state.- Returns:
- A DTO holding the validation results on the offers.
-
getAuditService
protected OfferAuditDetailService<? extends OfferAuditDetail> getAuditService()
-
getOfferService
protected OfferService<? extends Offer> getOfferService()
-
getOfferUserService
protected OfferUserService getOfferUserService()
-
getOfferFactory
protected com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()
-
-