public class GeneralValidatorImpl extends Object implements GeneralValidator
| Constructor and Description |
|---|
GeneralValidatorImpl(javax.validation.Validator validator,
MethodValidator methodValidator) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkViolations(HttpRequest request) |
protected ViolationsContainer<Object> |
getViolationsContainer(HttpRequest request) |
boolean |
isMethodValidatable(Method m)
Indicates if validation is turned on for a method.
|
boolean |
isValidatable(Class<?> clazz)
Indicates if validation is turned on for a class.
|
void |
validate(HttpRequest request,
Object object,
Class<?>... groups)
Validates all constraints on
object. |
void |
validateAllParameters(HttpRequest request,
Object object,
Method method,
Object[] parameterValues,
Class<?>... groups)
Validates all constraints placed on the parameters of the given method.
|
void |
validateReturnValue(HttpRequest request,
Object object,
Method method,
Object returnValue,
Class<?>... groups)
Validates all return value constraints of the given method.
|
public GeneralValidatorImpl(javax.validation.Validator validator,
MethodValidator methodValidator)
protected ViolationsContainer<Object> getViolationsContainer(HttpRequest request)
public void checkViolations(HttpRequest request)
checkViolations in interface GeneralValidatorpublic void validate(HttpRequest request, Object object, Class<?>... groups)
GeneralValidatorobject.validate in interface GeneralValidatorobject - object to validategroups - the group or list of groups targeted for validation (defaults to
Default)public void validateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups)
GeneralValidatorvalidateAllParameters in interface GeneralValidatorobject - 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)public void validateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups)
GeneralValidatorvalidateReturnValue in interface GeneralValidatorobject - 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)public boolean isValidatable(Class<?> clazz)
GeneralValidatorisValidatable in interface GeneralValidatorclazz - Class to be examinedpublic boolean isMethodValidatable(Method m)
GeneralValidatorisMethodValidatable in interface GeneralValidatorm - method to be examinedCopyright © 2013. All Rights Reserved.