Class GeneralValidatorImpl
java.lang.Object
org.jboss.resteasy.plugins.validation.GeneralValidatorImpl
- All Implemented Interfaces:
GeneralValidator,GeneralValidatorCDI
- Version:
- $Revision: 1.1 $ Copyright May 23, 2013
- Author:
- Ron Sigal
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static classA filter implementation filtering methods matching given methods. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGeneralValidatorImpl(jakarta.validation.ValidatorFactory validatorFactory, boolean isExecutableValidationEnabled, Set<jakarta.validation.executable.ExecutableType> defaultValidatedExecutableTypes) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckForConstraintViolations(HttpRequest request, Exception e) voidcheckViolations(HttpRequest request) voidcheckViolationsfromCDI(HttpRequest request) protected static Stringprotected static jakarta.validation.executable.ExecutableType[]getExecutableTypesOnMethod(Method method) protected List<jakarta.validation.executable.ExecutableType[]>protected List<jakarta.validation.executable.ExecutableType[]>getExecutableTypesOnMethodInInterfaces(Class<?> clazz, Method method) protected MethodgetSuperMethod(Method method, Class<?> clazz) Returns a super method, if any, of a method in a class.protected jakarta.validation.ValidatorgetValidator(HttpRequest request) protected SimpleViolationsContainergetViolationsContainer(HttpRequest request, Object target) protected static booleanbooleanbooleanisValidatable(Class<?> clazz) booleanisValidatable(Class<?> clazz, InjectorFactory injectorFactory) booleanisValidatableFromCDI(Class<?> clazz) protected booleanChecks, whethersubTypeMethodoverridessuperTypeMethod.protected booleanparametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod) Taken from Hibernate Validatorvoidvalidate(HttpRequest request, Object object, Class<?>... groups) voidvalidateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups) voidvalidateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups)
-
Field Details
-
SUPPRESS_VIOLATION_PATH
- See Also:
-
-
Constructor Details
-
GeneralValidatorImpl
public GeneralValidatorImpl(jakarta.validation.ValidatorFactory validatorFactory, boolean isExecutableValidationEnabled, Set<jakarta.validation.executable.ExecutableType> defaultValidatedExecutableTypes)
-
-
Method Details
-
validate
- Specified by:
validatein interfaceGeneralValidator
-
checkViolations
- Specified by:
checkViolationsin interfaceGeneralValidator
-
checkViolationsfromCDI
- Specified by:
checkViolationsfromCDIin interfaceGeneralValidatorCDI
-
validateAllParameters
public void validateAllParameters(HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups) - Specified by:
validateAllParametersin interfaceGeneralValidator
-
validateReturnValue
public void validateReturnValue(HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups) - Specified by:
validateReturnValuein interfaceGeneralValidator
-
isValidatable
- Specified by:
isValidatablein interfaceGeneralValidator
-
isValidatable
- Specified by:
isValidatablein interfaceGeneralValidatorCDI
-
isValidatableFromCDI
- Specified by:
isValidatableFromCDIin interfaceGeneralValidatorCDI
-
isMethodValidatable
- Specified by:
isMethodValidatablein interfaceGeneralValidator
-
getExecutableTypesOnMethodInHierarchy
-
getExecutableTypesOnMethodInInterfaces
-
getExecutableTypesOnMethod
protected static jakarta.validation.executable.ExecutableType[] getExecutableTypesOnMethod(Method method) -
isGetter
-
convertArrayToString
-
getSuperMethod
Returns a super method, if any, of a method in a class. Here, the "super" relationship is reflexive. That is, a method is a super method of itself. -
overrides
Checks, whethersubTypeMethodoverridessuperTypeMethod. N.B. "Override" here is reflexive. I.e., a method overrides itself.- Parameters:
subTypeMethod- The sub type method (cannot benull).superTypeMethod- The super type method (cannot benull).- Returns:
- Returns
trueifsubTypeMethodoverridessuperTypeMethod,falseotherwise. Taken from Hibernate Validator
-
parametersResolveToSameTypes
Taken from Hibernate Validator -
checkForConstraintViolations
- Specified by:
checkForConstraintViolationsin interfaceGeneralValidatorCDI
-
getValidator
-
getViolationsContainer
-