Class CompositeCondition

java.lang.Object
eu.europa.esig.dss.tsl.dto.condition.CompositeCondition
All Implemented Interfaces:
Condition, Serializable

public class CompositeCondition extends Object implements Condition
Condition resulting of the matchingCriteriaIndicator of other Conditions
See Also:
  • Constructor Details

    • 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 Details

    • 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 interface Condition
      Parameters:
      certificateToken - certificate to be checked
      Returns:
      true if the condition matches
    • toString

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

      public String toString()
      Overrides:
      toString in class Object