Class CompositeCondition

  • All Implemented Interfaces:
    Serializable

    public class CompositeCondition
    extends Condition
    Condition resulting of the matchingCriteriaIndicator of other Conditions
    See Also:
    Serialized Form
    • Constructor Detail

      • CompositeCondition

        public CompositeCondition()
        The default constructor for CriteriaListCondition. All conditions must match
      • CompositeCondition

        public CompositeCondition​(Assert matchingCriteriaIndicator)
        Constructor for CriteriaListCondition.
        Parameters:
        matchingCriteriaIndicator - matching criteria indicator: atLeastOne, all, none
    • Method Detail

      • getChildren

        public final List<Condition> getChildren()
        Returns the list of child conditions.
        Returns:
        an unmodifiable list, possibly empty; never null
      • addChild

        public void addChild​(Condition condition)
        This method adds a child condition. This allows to handle embedded conditions.
        Parameters:
        condition - the condition to add in the composite
      • getMatchingCriteriaIndicator

        public Assert getMatchingCriteriaIndicator()
        Returns the matching criteria indicator
        Returns:
        matching criteria indicator: atLeastOne, all, none
      • check

        public boolean check​(CertificateToken certificateToken)
        Execute the composite condition of the given certificate
        Specified by:
        check in class Condition
        Parameters:
        certificateToken - certificate to be checked
        Returns:
        true if the condition matches
      • toString

        public String toString​(String indent)
        Description copied from class: Condition
        Returns a string representation of the condition
        Specified by:
        toString in class Condition
        Parameters:
        indent - the indentation to be used
        Returns:
        a human readable condition