Class GroupValidator

  • All Implemented Interfaces:
    EntityValidator<org.jboss.errai.security.shared.api.Group>

    public abstract class GroupValidator
    extends Object
    implements EntityValidator<org.jboss.errai.security.shared.api.Group>

    The base validator class for a Group entity based on JSR303 Bean Validations.

    Current validations:

    • Group name is mandatory

    This provides validation logic for both backend and client sides, but you have to provide an instantiable class that provides the error message descriptions for each validation error supported.

    Since:
    0.8.0
    • Constructor Detail

      • GroupValidator

        public GroupValidator()
    • Method Detail

      • validate

        public Set<javax.validation.ConstraintViolation<org.jboss.errai.security.shared.api.Group>> validate​(org.jboss.errai.security.shared.api.Group entity)
        Description copied from interface: EntityValidator

        Validates the given entity.

        Specified by:
        validate in interface EntityValidator<org.jboss.errai.security.shared.api.Group>
        Parameters:
        entity - The entity instance to validate.
        Returns:
        The validation constraints collection produced.
      • getMessage

        public abstract String getMessage​(String key)