public class GeneralValidatorImpl extends Object implements GeneralValidatorCDI
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GeneralValidatorImpl.LocaleSpecificMessageInterpolator |
protected static class |
GeneralValidatorImpl.SimpleMethodFilter
A filter implementation filtering methods matching given methods.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
SUPPRESS_VIOLATION_PATH |
| Constructor and Description |
|---|
GeneralValidatorImpl(javax.validation.ValidatorFactory validatorFactory,
boolean isExecutableValidationEnabled,
Set<javax.validation.executable.ExecutableType> defaultValidatedExecutableTypes) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkForConstraintViolations(HttpRequest request,
Exception e) |
void |
checkViolations(HttpRequest request) |
void |
checkViolationsfromCDI(HttpRequest request) |
protected static String |
convertArrayToString(Object o) |
protected static javax.validation.executable.ExecutableType[] |
getExecutableTypesOnMethod(Method method) |
protected List<javax.validation.executable.ExecutableType[]> |
getExecutableTypesOnMethodInHierarchy(Method method) |
protected List<javax.validation.executable.ExecutableType[]> |
getExecutableTypesOnMethodInInterfaces(Class<?> clazz,
Method method) |
protected Method |
getSuperMethod(Method method,
Class<?> clazz)
Returns a super method, if any, of a method in a class.
|
protected javax.validation.Validator |
getValidator(HttpRequest request) |
protected SimpleViolationsContainer |
getViolationsContainer(HttpRequest request,
Object target) |
protected static boolean |
isGetter(Method m) |
boolean |
isMethodValidatable(Method m) |
boolean |
isValidatable(Class<?> clazz) |
boolean |
isValidatable(Class<?> clazz,
InjectorFactory injectorFactory) |
boolean |
isValidatableFromCDI(Class<?> clazz) |
protected boolean |
overrides(Method subTypeMethod,
Method superTypeMethod)
Checks, whether
subTypeMethod overrides superTypeMethod. |
protected boolean |
parametersResolveToSameTypes(Method subTypeMethod,
Method superTypeMethod)
Taken from Hibernate Validator
|
void |
validate(HttpRequest request,
Object object,
Class<?>... groups) |
void |
validateAllParameters(HttpRequest request,
Object object,
Method method,
Object[] parameterValues,
Class<?>... groups) |
void |
validateReturnValue(HttpRequest request,
Object object,
Method method,
Object returnValue,
Class<?>... groups) |
public static final String SUPPRESS_VIOLATION_PATH
public GeneralValidatorImpl(javax.validation.ValidatorFactory validatorFactory,
boolean isExecutableValidationEnabled,
Set<javax.validation.executable.ExecutableType> defaultValidatedExecutableTypes)
public void validate(HttpRequest request, Object object, Class<?>... groups)
validate in interface GeneralValidatorpublic void checkViolations(HttpRequest request)
checkViolations in interface GeneralValidatorpublic void checkViolationsfromCDI(HttpRequest request)
checkViolationsfromCDI in interface GeneralValidatorCDIpublic void validateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups)
validateAllParameters in interface GeneralValidatorpublic void validateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups)
validateReturnValue in interface GeneralValidatorpublic boolean isValidatable(Class<?> clazz)
isValidatable in interface GeneralValidatorpublic boolean isValidatable(Class<?> clazz, InjectorFactory injectorFactory)
isValidatable in interface GeneralValidatorCDIpublic boolean isValidatableFromCDI(Class<?> clazz)
isValidatableFromCDI in interface GeneralValidatorCDIpublic boolean isMethodValidatable(Method m)
isMethodValidatable in interface GeneralValidatorprotected List<javax.validation.executable.ExecutableType[]> getExecutableTypesOnMethodInHierarchy(Method method)
protected List<javax.validation.executable.ExecutableType[]> getExecutableTypesOnMethodInInterfaces(Class<?> clazz, Method method)
protected static javax.validation.executable.ExecutableType[] getExecutableTypesOnMethod(Method method)
protected static boolean isGetter(Method m)
protected Method getSuperMethod(Method method, Class<?> clazz)
protected boolean overrides(Method subTypeMethod, Method superTypeMethod)
subTypeMethod overrides superTypeMethod.
N.B. "Override" here is reflexive. I.e., a method overrides itself.subTypeMethod - The sub type method (cannot be null).superTypeMethod - The super type method (cannot be null).true if subTypeMethod overrides superTypeMethod, false otherwise.
Taken from Hibernate Validatorprotected boolean parametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod)
public void checkForConstraintViolations(HttpRequest request, Exception e)
checkForConstraintViolations in interface GeneralValidatorCDIprotected javax.validation.Validator getValidator(HttpRequest request)
protected SimpleViolationsContainer getViolationsContainer(HttpRequest request, Object target)
Copyright © 2021 JBoss by Red Hat. All rights reserved.