Interface Validator

All Known Implementing Classes:
AbstractValidator, ValidatorImpl

public interface Validator
Basic validation interface which defines the contract for event based validation. Event values are defined in LifeCycleEvent.
  • Method Details

    • validate

      <T> ValidationException validate(T arg0, int event)
      Validates a given instance
      Type Parameters:
      T - The instance to validate
      Parameters:
      arg0 - The class, of type T to validate
      event - The event id
      Returns:
      ValidationException if the validator produces one or more constraint violations.
    • validateProperty

      <T> ValidationException validateProperty(T arg0, String property, int event)
      Validates a property of a given instance
      Type Parameters:
      T - The instance to validate
      Parameters:
      arg0 - The class, of type T to validate
      property - The property to validate
      event - The event id
      Returns:
      ValidationException if the validator produces one or more constraint violations.
    • validateValue

      <T> ValidationException validateValue(Class<T> arg0, String arg1, Object arg2, int event)
      Validates a value based upon the constraints applied to a given class attribute.
      Type Parameters:
      T - The instance type to base validation upon
      Parameters:
      arg0 - The class of type T to validate
      arg1 - The property to validate
      arg2 - The property value to validate
      event - The event id
      Returns:
      ValidationException if the validator produces one or more constraint violations.
    • validating

      <T> boolean validating(T arg0, int event)
      Method for determining whether validation is active for the given type and event.
      Type Parameters:
      T -
      Parameters:
      arg0 - Type being validated
      event - event type
      Returns:
      true if validation is active for the specified event