Class ClassificationNotBlankValidator

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

    public class ClassificationNotBlankValidator
    extends java.lang.Object
    implements javax.validation.ConstraintValidator<ClassificationNotBlank,​java.lang.Object>
    Validates that if the given ProductModel has a certain category then the assigned classification attribute must not be empty or null. The product's category and classification combination to be checked is stored in the constraint definition ClassificationNotBlankConstraint.
    • Constructor Detail

      • ClassificationNotBlankValidator

        public ClassificationNotBlankValidator()
    • Method Detail

      • isValid

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