Interface ValidationHandler


  • public interface ValidationHandler
    Contains helper methods for validating objects
    • Method Detail

      • addValidatedKey

        void addValidatedKey​(Bean bean,
                             String validatedKey)
        Adds the given key to the validated keys in the given bean
      • clearAlreadyValidated

        @Deprecated
        void clearAlreadyValidated​(Bean bean)
        Deprecated.
        This is no more necessary, instead use ValidationHandler#validate(Validator, Object, String) with a different validation key
        Removes the already validated attribute
      • isAlreadyValidated

        @Deprecated
        boolean isAlreadyValidated​(Bean bean)
        Deprecated.
        Instead use ValidationHandler#isAlreadyValidated(Bean, String)
        Indicates whether the given bean was already validated
      • isAlreadyValidated

        boolean isAlreadyValidated​(Bean bean,
                                   String validationKey)
        Indicates whether the given bean was already validated for the given validation key.
      • setAlreadyValidated

        @Deprecated
        void setAlreadyValidated​(Bean bean,
                                 boolean validated)
        Deprecated.
        Instead use ValidationHandler#addValidatedKey(Bean, String)
        Marks the given bean as already validated.
      • validate

        @Deprecated
        void validate​(Validator validator,
                      Object object)
               throws com.google.api.pathtemplate.ValidationException
        Deprecated.
        Instead use ValidationHandler#validate(Validator, Object, String) with a custom validation key
        Validates the given object. Skips if the object is a Bean which was already validated
        Throws:
        com.google.api.pathtemplate.ValidationException
      • validate

        void validate​(Validator validator,
                      Object object,
                      String validationKey)
               throws com.google.api.pathtemplate.ValidationException
        Validates the given object. Skips if the object is a Bean which was already validated for the given validation key.
        Throws:
        com.google.api.pathtemplate.ValidationException