Class CartModifyingRequestValidator
java.lang.Object
com.broadleafcommerce.cartoperation.web.validator.CartModifyingRequestValidator
- All Implemented Interfaces:
CartVersionRequestValidator
,RequestValidator
Validates cart requests that will modify the cart.
- Author:
- Jacob Mitash
-
Constructor Summary
ConstructorDescriptionCartModifyingRequestValidator
(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder) -
Method Summary
Modifier and TypeMethodDescriptionprotected CartHolder<com.broadleafcommerce.cart.client.domain.Cart>
boolean
Tells whether this validator supports the given type.void
Validates the given request body.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.cartoperation.web.validator.RequestValidator
validate
-
Constructor Details
-
CartModifyingRequestValidator
public CartModifyingRequestValidator(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder)
-
-
Method Details
-
supports
Description copied from interface:RequestValidator
Tells whether this validator supports the given type.- Specified by:
supports
in 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:RequestValidator
Validates the given request body.- Specified by:
validate
in interfaceRequestValidator
- Parameters:
rawRequestBody
- the request body to validateerrors
- the errors to contribute to when validation errors occur
-
getRequestCartHolder
-