Class CartItemModifyingRequestValidator
java.lang.Object
com.broadleafcommerce.cartoperation.web.validator.CartItemModifyingRequestValidator
- All Implemented Interfaces:
CartVersionRequestValidator,RequestValidator
public class CartItemModifyingRequestValidator
extends Object
implements CartVersionRequestValidator
Validates cart item requests that will modify the cart.
- Author:
- Jacob Mitash
-
Constructor Summary
ConstructorsConstructorDescriptionCartItemModifyingRequestValidator(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder) -
Method Summary
Modifier and TypeMethodDescriptionprotected CartHolder<com.broadleafcommerce.cart.client.domain.Cart>booleanTells whether this validator supports the given type.voidValidates the given request body.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.cartoperation.web.validator.RequestValidator
validate
-
Constructor Details
-
CartItemModifyingRequestValidator
public CartItemModifyingRequestValidator(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder)
-
-
Method Details
-
supports
Description copied from interface:RequestValidatorTells whether this validator supports the given type.- Specified by:
supportsin interfaceRequestValidator- Parameters:
clazz- the class of the instance that will be tested/validated- Returns:
- true if this validator can support the given type, false otherwise
-
validate
Description copied from interface:RequestValidatorValidates the given request body.- Specified by:
validatein interfaceRequestValidator- Parameters:
rawRequestBody- the request body to validateerrors- the errors to contribute to when validation errors occur
-
getRequestCartHolder
-