class HasTransitionsValidator implements ConstraintValidator<HasTransitions, SetPagesTransitionParameters> {

    @Override
    public boolean isValid(SetPagesTransitionParameters value, ConstraintValidatorContext context) {
        if (value != null) {
            return value.getDefaultTransition() != null || !value.getTransitions().isEmpty();
        }
        return true;
    }

}