Class AbstractConstraintProvider

    • Constructor Detail

      • AbstractConstraintProvider

        public AbstractConstraintProvider()
    • Method Detail

      • addRemovalPredicates

        protected abstract void addRemovalPredicates​(List<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​(List<Constraint> constraints)
        Add zero or more constraints to the given list of constraints.
        Parameters:
        constraints - the list of constraints
      • idEquals

        protected Predicate<Constraint> idEquals​(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 Predicate<Constraint> locationEquals​(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 Predicate<Constraint> sourceEquals​(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​(String id,
                                        String level,
                                        String location,
                                        String description,
                                        String expression,
                                        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​(String id,
                                        String level,
                                        String location,
                                        String description,
                                        String expression,
                                        String source,
                                        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