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
  • Field Details

  • Constructor Details

    • GeneralValidatorImpl

      public GeneralValidatorImpl(jakarta.validation.ValidatorFactory validatorFactory, boolean isExecutableValidationEnabled, Set<jakarta.validation.executable.ExecutableType> defaultValidatedExecutableTypes)
  • Method Details

    • validate

      public void validate(org.jboss.resteasy.spi.HttpRequest request, Object object, Class<?>... groups)
      Specified by:
      validate in interface org.jboss.resteasy.spi.validation.GeneralValidator
    • checkViolations

      public void checkViolations(org.jboss.resteasy.spi.HttpRequest request)
      Specified by:
      checkViolations in interface org.jboss.resteasy.spi.validation.GeneralValidator
    • checkViolationsfromCDI

      public void checkViolationsfromCDI(org.jboss.resteasy.spi.HttpRequest request)
      Specified by:
      checkViolationsfromCDI in interface org.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:
      validateAllParameters in interface org.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:
      validateReturnValue in interface org.jboss.resteasy.spi.validation.GeneralValidator
    • isValidatable

      public boolean isValidatable(Class<?> clazz)
      Specified by:
      isValidatable in interface org.jboss.resteasy.spi.validation.GeneralValidator
    • isValidatable

      public boolean isValidatable(Class<?> clazz, org.jboss.resteasy.spi.InjectorFactory injectorFactory)
      Specified by:
      isValidatable in interface org.jboss.resteasy.spi.validation.GeneralValidatorCDI
    • isValidatableFromCDI

      public boolean isValidatableFromCDI(Class<?> clazz)
      Specified by:
      isValidatableFromCDI in interface org.jboss.resteasy.spi.validation.GeneralValidatorCDI
    • isMethodValidatable

      public boolean isMethodValidatable(Method m)
      Specified by:
      isMethodValidatable in interface org.jboss.resteasy.spi.validation.GeneralValidator
    • getExecutableTypesOnMethodInHierarchy

      protected List<jakarta.validation.executable.ExecutableType[]> getExecutableTypesOnMethodInHierarchy(Method method)
    • getExecutableTypesOnMethodInInterfaces

      protected List<jakarta.validation.executable.ExecutableType[]> getExecutableTypesOnMethodInInterfaces(Class<?> clazz, Method method)
    • getExecutableTypesOnMethod

      protected static jakarta.validation.executable.ExecutableType[] getExecutableTypesOnMethod(Method method)
    • isGetter

      protected static boolean isGetter(Method m)
    • convertArrayToString

      protected static String convertArrayToString(Object o)
    • getSuperMethod

      protected Method getSuperMethod(Method method, Class<?> clazz)
      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

      protected boolean overrides(Method subTypeMethod, Method superTypeMethod)
      Checks, whether subTypeMethod overrides superTypeMethod. N.B. "Override" here is reflexive. I.e., a method overrides itself.
      Parameters:
      subTypeMethod - The sub type method (cannot be null).
      superTypeMethod - The super type method (cannot be null).
      Returns:
      Returns true if subTypeMethod overrides superTypeMethod, false otherwise. Taken from Hibernate Validator
    • parametersResolveToSameTypes

      protected boolean parametersResolveToSameTypes(Method subTypeMethod, Method superTypeMethod)
      Taken from Hibernate Validator
    • checkForConstraintViolations

      public void checkForConstraintViolations(org.jboss.resteasy.spi.HttpRequest request, Exception e)
      Specified by:
      checkForConstraintViolations in interface org.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)