Class CartOfferValidationActivity

    • Method Detail

      • execute

        public CheckoutProcessDto execute​(@NonNull
                                          @NonNull CheckoutProcessDto processDto,
                                          @Nullable
                                          com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Description copied from interface: CheckoutWorkflowActivity
        Method responsible for executing some work against the cart that is required for checkout. This may include, but is not limited to, cart validation checks, inventory reservations, or payment authorizations.
        Specified by:
        execute in interface CheckoutWorkflowActivity
        Parameters:
        processDto - The CheckoutProcessDto that we're attempting to checkout with.
        contextInfo - Context information around sandbox and multitenant state.
        Returns:
        The final state of the CheckoutProcessDto following the execution of the activity.
      • validateOfferAndOfferCodeUsages

        protected void validateOfferAndOfferCodeUsages​(@NonNull
                                                       @NonNull CheckoutProcessDto processDto,
                                                       @Nullable
                                                       com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Validate that the offers and offer codes used in the specified cart are still valid upon checkout.
        Parameters:
        processDto - the CheckoutProcessDto that we're attempting to checkout with.
        contextInfo - context surrounding sandboxing and multitenant state
      • validateCampaignCodeUsages

        @Deprecated
        protected void validateCampaignCodeUsages​(@NonNull
                                                  @NonNull CheckoutProcessDto processDto,
                                                  @Nullable
                                                  com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
        Deprecated.
        Deprecated as of 1.8, if using OfferService 2.0, this method is not used
        Validate that the campaign codes used in the specified cart are still valid upon checkout.
        Parameters:
        processDto - the CheckoutProcessDto that we're attempting to checkout with.
        contextInfo - context surrounding sandboxing and multitenant state
      • getCampaignProvider

        @Nullable
        protected CampaignProvider getCampaignProvider()
      • getMessageSource

        protected org.springframework.context.MessageSource getMessageSource()