class NotAllowedValidator implements ConstraintValidator<NotAllowed, PredefinedSetOfPages> {

    @Override
    public boolean isValid(PredefinedSetOfPages value, ConstraintValidatorContext context) {
        if (value != null && disallow != null) {
            return !Arrays.asList(disallow).contains(value);
        }
        return true;
    }

}