Class DefaultOfferUsageValidator

    • 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: OfferUsageValidator
        With the provided offer ids and CustomerContext, determine which offers are no longer usable in a given context.
        Specified by:
        validateOfferUsages in interface OfferUsageValidator
        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.
      • getOfferFactory

        protected com.broadleafcommerce.common.extension.TypeFactory getOfferFactory()