public class CartModifyingRequestValidator extends Object implements CartVersionRequestValidator
Constructor and Description |
---|
CartModifyingRequestValidator(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder) |
Modifier and Type | Method and Description |
---|---|
protected CartHolder<com.broadleafcommerce.cart.client.domain.Cart> |
getRequestCartHolder() |
boolean |
supports(Class<?> clazz)
Tells whether this validator supports the given type.
|
void |
validate(Object rawRequestBody,
org.springframework.validation.Errors errors)
Validates the given request body.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
public CartModifyingRequestValidator(CartHolder<com.broadleafcommerce.cart.client.domain.Cart> requestCartHolder)
public boolean supports(Class<?> clazz)
RequestValidator
supports
in interface RequestValidator
clazz
- the class of the instance that will be tested/validatedpublic void validate(Object rawRequestBody, org.springframework.validation.Errors errors)
RequestValidator
validate
in interface RequestValidator
rawRequestBody
- the request body to validateerrors
- the errors to contribute to when validation errors occurprotected CartHolder<com.broadleafcommerce.cart.client.domain.Cart> getRequestCartHolder()
Copyright © 2021. All rights reserved.