Class CompoundValidator<T>

java.lang.Object
com.atlassian.crowd.embedded.validator.impl.CompoundValidator<T>
Type Parameters:
T - Entity type to be validated
All Implemented Interfaces:
Validator<T>

public class CompoundValidator<T> extends Object implements Validator<T>
Represents combination of the multiple validator instance, giving an AND behaviour
  • Constructor Details

    • CompoundValidator

      public CompoundValidator(List<Validator<T>> validators)
  • Method Details

    • validate

      public List<ValidationError> validate(T entity)
      Description copied from interface: Validator
      Will validate the given entity and return List generated during validation
      Specified by:
      validate in interface Validator<T>
      Parameters:
      entity - Entity to be validated
      Returns:
      a List containing the errors or empty list if no error were generated
    • getValidators

      public List<Validator<T>> getValidators()