public interface GeneralValidator
| Modifier and Type | Method and Description |
|---|---|
void |
checkViolations(HttpRequest request)
Throws a ResteasyViolationException if any validation violations have been detected.
|
boolean |
isMethodValidatable(java.lang.reflect.Method method)
Indicates if validation is turned on for a method.
|
boolean |
isValidatable(java.lang.Class<?> clazz)
Indicates if validation is turned on for a class.
|
void |
validate(HttpRequest request,
java.lang.Object object,
java.lang.Class<?>... groups)
Validates all constraints on
object. |
void |
validateAllParameters(HttpRequest request,
java.lang.Object object,
java.lang.reflect.Method method,
java.lang.Object[] parameterValues,
java.lang.Class<?>... groups)
Validates all constraints placed on the parameters of the given method.
|
void |
validateReturnValue(HttpRequest request,
java.lang.Object object,
java.lang.reflect.Method method,
java.lang.Object returnValue,
java.lang.Class<?>... groups)
Validates all return value constraints of the given method.
|
void validate(HttpRequest request, java.lang.Object object, java.lang.Class<?>... groups)
object.object - object to validategroups - the group or list of groups targeted for validation (defaults to
Default)java.lang.IllegalArgumentException - if object is null
or if null is passed to the varargs groupsValidationException - if a non recoverable error happens
during the validation processvoid validateAllParameters(HttpRequest request, java.lang.Object object, java.lang.reflect.Method method, java.lang.Object[] parameterValues, java.lang.Class<?>... groups)
T - the type hosting the method to validateobject - 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 to
Default)java.lang.IllegalArgumentException - if null is passed for any of the parameters
or if parameters don't match with each otherValidationException - if a non recoverable error happens during the
validation processvoid validateReturnValue(HttpRequest request, java.lang.Object object, java.lang.reflect.Method method, java.lang.Object returnValue, java.lang.Class<?>... groups)
T - the type hosting the method to validateobject - 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 to
Default)java.lang.IllegalArgumentException - if null is passed for any of the object,
method or groups parameters or if parameters don't match with each otherValidationException - if a non recoverable error happens during the
validation processboolean isValidatable(java.lang.Class<?> clazz)
clazz - Class to be examinedboolean isMethodValidatable(java.lang.reflect.Method method)
method - method to be examinedvoid checkViolations(HttpRequest request)
request -