Interface GeneralValidator
- 
- All Known Subinterfaces:
 GeneralValidatorCDI
- All Known Implementing Classes:
 GeneralValidatorImpl
public interface GeneralValidator- Version:
 - $Revision: 1.1 $ Javadoc adapted from javax.validation.Validator and javax.validation.executable.ExecutableValidator:
 - Author:
 - Ron Sigal, Emmanuel Bernard, Hardy Ferentschik, Gunnar Morling
 
 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcheckViolations(HttpRequest request)Throws a ResteasyViolationException if any validation violations have been detected.booleanisMethodValidatable(Method method)Indicates if validation is turned on for a method.booleanisValidatable(Class<?> clazz)Indicates if validation is turned on for a class.voidvalidate(HttpRequest request, Object object, Class<?>... groups)Validates all constraints onobject.voidvalidateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups)Validates all constraints placed on the parameters of the given method.voidvalidateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups)Validates all return value constraints of the given method. 
 - 
 
- 
- 
Method Detail
- 
validate
void validate(HttpRequest request, Object object, Class<?>... groups)
Validates all constraints onobject.- Parameters:
 request- http requestobject- object to validategroups- the group or list of groups targeted for validation (defaults toDefault)- Throws:
 IllegalArgumentException- if object isnullor ifnullis passed to the varargs groupsjavax.validation.ValidationException- if a non recoverable error happens during the validation process
 
- 
validateAllParameters
void validateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups)
Validates all constraints placed on the parameters of the given method.- Parameters:
 request- http requestobject- the object on which the method to validate is invokedmethod- the method for which the parameter constraints is validatedparameterValues- the values provided by the caller for the given method's parametersgroups- the group or list of groups targeted for validation (defaults toDefault)- Throws:
 IllegalArgumentException- ifnullis passed for any of the parameters or if parameters don't match with each otherjavax.validation.ValidationException- if a non recoverable error happens during the validation process
 
- 
validateReturnValue
void validateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups)
Validates all return value constraints of the given method.- Parameters:
 request- http requestobject- the object on which the method to validate is invokedmethod- the method for which the return value constraints is validatedreturnValue- the value returned by the given methodgroups- the group or list of groups targeted for validation (defaults toDefault)- Throws:
 IllegalArgumentException- ifnullis passed for any of the object, method or groups parameters or if parameters don't match with each otherjavax.validation.ValidationException- if a non recoverable error happens during the validation process
 
- 
isValidatable
boolean isValidatable(Class<?> clazz)
Indicates if validation is turned on for a class.- Parameters:
 clazz- Class to be examined- Returns:
 - true if and only if validation is turned on for clazz
 
 
- 
isMethodValidatable
boolean isMethodValidatable(Method method)
Indicates if validation is turned on for a method.- Parameters:
 method- method to be examined- Returns:
 - true if and only if validation is turned on for method
 
 
- 
checkViolations
void checkViolations(HttpRequest request)
Throws a ResteasyViolationException if any validation violations have been detected.- Parameters:
 request- http request
 
 - 
 
 -