Class AbstractConstraintProvider

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract void addConstraints​(java.util.List<Constraint> constraints)
      Add zero or more constraints to the given list of constraints.
      protected abstract void addRemovalPredicates​(java.util.List<java.util.function.Predicate<Constraint>> removalPredicates)
      Add zero or more removal predicates to the given list of removal predicates.
      protected Constraint constraint​(java.lang.String id, java.lang.String level, java.lang.String location, java.lang.String description, java.lang.Class<? extends ConstraintValidator<?>> validationClass)
      Create a Constraint instance.
      protected Constraint constraint​(java.lang.String id, java.lang.String level, java.lang.String location, java.lang.String description, java.lang.String expression, java.lang.String source)
      Create a Constraint instance.
      protected Constraint constraint​(java.lang.String id, java.lang.String level, java.lang.String location, java.lang.String description, java.lang.String expression, java.lang.String source, java.lang.Class<? extends ConstraintValidator<?>> validatorClass)
      Create a Constraint instance.
      java.util.List<Constraint> getConstraints()
      Get the list of constraints for this constraint provider.
      java.util.List<java.util.function.Predicate<Constraint>> getRemovalPredicates()
      Get the list of removal predicates for this constraint provider.
      protected java.util.function.Predicate<Constraint> idEquals​(java.lang.String id)
      Create a predicate that matches on the given constraint id.
      protected java.util.function.Predicate<Constraint> locationEquals​(java.lang.String location)
      Create a predicate that matches on the given constraint location.
      protected java.util.function.Predicate<Constraint> sourceEquals​(java.lang.String source)
      Create a predicate that matches on the given constraint source.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractConstraintProvider

        public AbstractConstraintProvider()
    • Method Detail

      • getRemovalPredicates

        public final java.util.List<java.util.function.Predicate<Constraint>> getRemovalPredicates()
        Description copied from interface: ConstraintProvider
        Get the list of removal predicates for this constraint provider.
        Specified by:
        getRemovalPredicates in interface ConstraintProvider
        Returns:
        the list of removal predicates for this constraint provider
      • getConstraints

        public final java.util.List<Constraint> getConstraints()
        Description copied from interface: ConstraintProvider
        Get the list of constraints for this constraint provider.
        Specified by:
        getConstraints in interface ConstraintProvider
        Returns:
        the list of constraints for this constraint provider
      • addRemovalPredicates

        protected abstract void addRemovalPredicates​(java.util.List<java.util.function.Predicate<Constraint>> removalPredicates)
        Add zero or more removal predicates to the given list of removal predicates.
        Parameters:
        removalPredicates - the list of removal predicates
      • addConstraints

        protected abstract void addConstraints​(java.util.List<Constraint> constraints)
        Add zero or more constraints to the given list of constraints.
        Parameters:
        constraints - the list of constraints
      • idEquals

        protected java.util.function.Predicate<Constraint> idEquals​(java.lang.String id)
        Create a predicate that matches on the given constraint id.
        Parameters:
        id - the id
        Returns:
        a predicate that matches on the given constraint id
        See Also:
        Constraint.id()
      • locationEquals

        protected java.util.function.Predicate<Constraint> locationEquals​(java.lang.String location)
        Create a predicate that matches on the given constraint location.
        Parameters:
        location - the location
        Returns:
        a predicate that matches on the given constraint location
        See Also:
        Constraint.location()
      • sourceEquals

        protected java.util.function.Predicate<Constraint> sourceEquals​(java.lang.String source)
        Create a predicate that matches on the given constraint source.
        Parameters:
        source - the source
        Returns:
        a predicate that matches on the given constraint source
      • constraint

        protected Constraint constraint​(java.lang.String id,
                                        java.lang.String level,
                                        java.lang.String location,
                                        java.lang.String description,
                                        java.lang.Class<? extends ConstraintValidator<?>> validationClass)
        Create a Constraint instance.
        Parameters:
        id - the id
        level - the level
        location - the location
        description - the description
        validationClass - the validation class
        Returns:
        a Constraint instance
      • constraint

        protected Constraint constraint​(java.lang.String id,
                                        java.lang.String level,
                                        java.lang.String location,
                                        java.lang.String description,
                                        java.lang.String expression,
                                        java.lang.String source)
        Create a Constraint instance.
        Parameters:
        id - the id
        level - the level
        location - the location
        description - the description
        expression - the expression
        source - the source
        Returns:
        a Constraint instance
      • constraint

        protected Constraint constraint​(java.lang.String id,
                                        java.lang.String level,
                                        java.lang.String location,
                                        java.lang.String description,
                                        java.lang.String expression,
                                        java.lang.String source,
                                        java.lang.Class<? extends ConstraintValidator<?>> validatorClass)
        Create a Constraint instance.
        Parameters:
        id - the id
        level - the level
        location - the location
        description - the description
        expression - the expression
        source - the source
        validatorClass - the validator class
        Returns:
        a Constraint instance