Interface GuestCartTokenValidator
- All Known Implementing Classes:
DefaultGuestCartTokenValidator
public interface GuestCartTokenValidator
Validator interface used for validating a guest token for a
Cart
.- Author:
- Nick Crum (ncrum)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateGuestTokenForCheckout
(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.void
validateGuestTokenForOperation
(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.
-
Method Details
-
validateGuestTokenForCheckout
void validateGuestTokenForCheckout(String cartId, @Nullable String guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 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.- Parameters:
cartId
- the cart IDguestToken
- the guest tokencontextInfo
- the context info
-
validateGuestTokenForOperation
void validateGuestTokenForOperation(String cartId, @Nullable String guestToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) 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.- Parameters:
cartId
- the cart IDguestToken
- the guest tokencontextInfo
- the context info
-