Class GeneralValidatorImpl
java.lang.Object
org.jboss.resteasy.plugins.validation.GeneralValidatorImpl
- All Implemented Interfaces:
org.jboss.resteasy.spi.validation.GeneralValidator,org.jboss.resteasy.spi.validation.GeneralValidatorCDI
public class GeneralValidatorImpl
extends Object
implements org.jboss.resteasy.spi.validation.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(org.jboss.resteasy.spi.HttpRequest request, Exception e) voidcheckViolations(org.jboss.resteasy.spi.HttpRequest request) voidcheckViolationsfromCDI(org.jboss.resteasy.spi.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(org.jboss.resteasy.spi.HttpRequest request) protected SimpleViolationsContainergetViolationsContainer(org.jboss.resteasy.spi.HttpRequest request, Object target) protected static booleanbooleanbooleanisValidatable(Class<?> clazz) booleanisValidatable(Class<?> clazz, org.jboss.resteasy.spi.InjectorFactory injectorFactory) booleanisValidatableFromCDI(Class<?> clazz) protected booleanChecks, whethersubTypeMethodoverridessuperTypeMethod.protected booleanparametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod) Taken from Hibernate ValidatorvoidvoidvalidateAllParameters(org.jboss.resteasy.spi.HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups) voidvalidateReturnValue(org.jboss.resteasy.spi.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 interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
checkViolations
public void checkViolations(org.jboss.resteasy.spi.HttpRequest request) - Specified by:
checkViolationsin interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
checkViolationsfromCDI
public void checkViolationsfromCDI(org.jboss.resteasy.spi.HttpRequest request) - Specified by:
checkViolationsfromCDIin interfaceorg.jboss.resteasy.spi.validation.GeneralValidatorCDI
-
validateAllParameters
public void validateAllParameters(org.jboss.resteasy.spi.HttpRequest request, Object object, Method method, Object[] parameterValues, Class<?>... groups) - Specified by:
validateAllParametersin interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
validateReturnValue
public void validateReturnValue(org.jboss.resteasy.spi.HttpRequest request, Object object, Method method, Object returnValue, Class<?>... groups) - Specified by:
validateReturnValuein interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
isValidatable
- Specified by:
isValidatablein interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
isValidatable
public boolean isValidatable(Class<?> clazz, org.jboss.resteasy.spi.InjectorFactory injectorFactory) - Specified by:
isValidatablein interfaceorg.jboss.resteasy.spi.validation.GeneralValidatorCDI
-
isValidatableFromCDI
- Specified by:
isValidatableFromCDIin interfaceorg.jboss.resteasy.spi.validation.GeneralValidatorCDI
-
isMethodValidatable
- Specified by:
isMethodValidatablein interfaceorg.jboss.resteasy.spi.validation.GeneralValidator
-
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 interfaceorg.jboss.resteasy.spi.validation.GeneralValidatorCDI
-
getValidator
protected jakarta.validation.Validator getValidator(org.jboss.resteasy.spi.HttpRequest request) -
getViolationsContainer
protected SimpleViolationsContainer getViolationsContainer(org.jboss.resteasy.spi.HttpRequest request, Object target)
-