Class DefaultGuestCartTokenValidator

java.lang.Object
com.broadleafcommerce.cartoperation.web.validator.DefaultGuestCartTokenValidator
All Implemented Interfaces:
GuestCartTokenValidator

public class DefaultGuestCartTokenValidator extends Object implements GuestCartTokenValidator
Author:
Nick Crum (ncrum)
  • Constructor Details

  • Method Details

    • validateGuestTokenForCheckout

      public void validateGuestTokenForCheckout(String cartId, @Nullable String guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: GuestCartTokenValidator
      Validates the provided guest token string for the given cart ID during checkout. This method will throw a runtime exception if the guest token is found to be invalid. Typically, this method will require the guest token to be non-null and valid.
      Specified by:
      validateGuestTokenForCheckout in interface GuestCartTokenValidator
      Parameters:
      cartId - the cart ID
      guestToken - the guest token
      contextInfo - the context info
    • validateGuestTokenForOperation

      public void validateGuestTokenForOperation(String cartId, @Nullable String guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: GuestCartTokenValidator
      Validates the provided guest token string for the given cart ID during a cart operation. This method will throw a runtime exception if the guest token is found to be invalid. Typically, this method will treat a null guest token as valid.
      Specified by:
      validateGuestTokenForOperation in interface GuestCartTokenValidator
      Parameters:
      cartId - the cart ID
      guestToken - the guest token
      contextInfo - the context info
    • guestTokenRequiredMessage

      protected String guestTokenRequiredMessage(String cartId)
    • getGuestCartProtectionService

      protected GuestCartProtectionService getGuestCartProtectionService()
    • getCartValidationProperties

      protected CartValidationProperties getCartValidationProperties()