Interface ConfiguredValidator
- All Superinterfaces:
javax.validation.Validator
Configured validator for Jersey validation purposes.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidateResourceAndInputParams(Object resource, Invocable resourceMethod, Object[] args) Validates resource class instance and input parameters of themethod.voidvalidateResult(Object resource, Invocable resourceMethod, Object result) Validates response instance / response entity of themethod.Methods inherited from interface javax.validation.Validator
forExecutables, getConstraintsForClass, unwrap, validate, validateProperty, validateValue
-
Method Details
-
validateResourceAndInputParams
void validateResourceAndInputParams(Object resource, Invocable resourceMethod, Object[] args) throws javax.validation.ConstraintViolationException Validates resource class instance and input parameters of themethod.ConstraintViolationExceptionraised from this method should be mapped to HTTP 400 status.- Parameters:
resource- resource class instance.resourceMethod- invocable containing handling and validation methods.args- input method parameters.- Throws:
javax.validation.ConstraintViolationException- ifConstraintViolationoccurs (should be mapped to HTTP 400 status).
-
validateResult
void validateResult(Object resource, Invocable resourceMethod, Object result) throws javax.validation.ConstraintViolationException Validates response instance / response entity of themethod.ConstraintViolationExceptionraised from this method should be mapped to HTTP 500 status.- Parameters:
resource- resource class instance.resourceMethod- invocable containing handling and validation methods.result- response entity.- Throws:
javax.validation.ConstraintViolationException- ifConstraintViolationoccurs (should be mapped to HTTP 500 status).
-