Class CartStatusValidationHelper


  • public class CartStatusValidationHelper
    extends Object
    This CheckoutWorkflowActivity is responsible for validating that the cart is able to be checked out, based on its status.
    • Constructor Detail

      • CartStatusValidationHelper

        public CartStatusValidationHelper​(org.springframework.context.MessageSource messageSource)
    • Method Detail

      • validateCartStatusForCheckout

        public void validateCartStatusForCheckout​(@NonNull
                                                  @NonNull com.broadleafcommerce.cart.client.domain.Cart cart)
        Validates that the cart is in a status which is valid for checkout.
        Parameters:
        cart - The Cart that we're attempting to checkout with.
        Throws:
        CheckoutWorkflowException - if the cart status cannot be checked out
      • getValidCheckoutStatuses

        protected Set<String> getValidCheckoutStatuses()
        Retrieve the set of statuses which are considered valid to checkout.
        Returns:
        The set of statuses which are considered valid to checkout.
      • getMessageSource

        protected org.springframework.context.MessageSource getMessageSource()