Class ProjectMetadataRoleValidator

  • All Implemented Interfaces:
    javax.validation.ConstraintValidator<MetadataRoleValidate,​java.lang.Object>

    public class ProjectMetadataRoleValidator
    extends java.lang.Object
    implements javax.validation.ConstraintValidator<MetadataRoleValidate,​java.lang.Object>
    Hibernate validator to validate if a user/usegroup is a manager on a project then their metadata role should be set to the highest level. Otherwise if a user/usergroup is a collaborator on a project then their metadata role can be any of the levels (must not be null).
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isValid​(java.lang.Object value, javax.validation.ConstraintValidatorContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.validation.ConstraintValidator

        initialize
    • Constructor Detail

      • ProjectMetadataRoleValidator

        public ProjectMetadataRoleValidator()
    • Method Detail

      • isValid

        public boolean isValid​(java.lang.Object value,
                               javax.validation.ConstraintValidatorContext context)
        Specified by:
        isValid in interface javax.validation.ConstraintValidator<MetadataRoleValidate,​java.lang.Object>