Class DefaultGuestCartTokenValidator
java.lang.Object
com.broadleafcommerce.cartoperation.web.validator.DefaultGuestCartTokenValidator
- All Implemented Interfaces:
 GuestCartTokenValidator
- Author:
 - Nick Crum (ncrum)
 
- 
Constructor Summary
ConstructorsConstructorDescriptionDefaultGuestCartTokenValidator(GuestCartProtectionService guestCartProtectionService, CartValidationProperties cartValidationProperties)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected CartValidationPropertiesprotected GuestCartProtectionServiceprotected StringguestTokenRequiredMessage(String cartId) voidvalidateGuestTokenForCheckout(String cartId, String guestToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validates the provided guest token string for the given cart ID during checkout.voidvalidateGuestTokenForOperation(String cartId, String guestToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Validates the provided guest token string for the given cart ID during a cart operation. 
- 
Constructor Details
- 
DefaultGuestCartTokenValidator
public DefaultGuestCartTokenValidator(GuestCartProtectionService guestCartProtectionService, CartValidationProperties cartValidationProperties)  
 - 
 - 
Method Details
- 
validateGuestTokenForCheckout
public void validateGuestTokenForCheckout(String cartId, @Nullable String guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Description copied from interface:GuestCartTokenValidatorValidates 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:
 validateGuestTokenForCheckoutin interfaceGuestCartTokenValidator- Parameters:
 cartId- the cart IDguestToken- the guest tokencontextInfo- 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:GuestCartTokenValidatorValidates 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:
 validateGuestTokenForOperationin interfaceGuestCartTokenValidator- Parameters:
 cartId- the cart IDguestToken- the guest tokencontextInfo- the context info
 - 
guestTokenRequiredMessage
 - 
getGuestCartProtectionService
 - 
getCartValidationProperties
 
 -