Interface RequestValidator
- All Known Subinterfaces:
CartVersionRequestValidator
- All Known Implementing Classes:
CartItemModifyingRequestValidator
,CartModifyingRequestValidator
,ShareItemListRequestValidator
public interface RequestValidator
Validates a Request Body.
- Author:
- Jacob Mitash
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether this validator supports the given type.default void
Validates the given request body.void
Validates the given request body.
-
Method Details
-
supports
Tells whether this validator supports the given type.- 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
Validates the given request body.- Parameters:
requestBody
- the request body to validate- Throws:
com.broadleafcommerce.common.error.validation.ValidationException
- if the request body is invalid
-
validate
Validates the given request body.- Parameters:
requestBody
- the request body to validateerrors
- the errors to contribute to when validation errors occur
-