Class PolicyIdCondition

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

public class PolicyIdCondition extends Object implements Condition
Checks if a certificate has a specific policy OID.
Objects based on this class are instantiated from trusted list or by SignedDocumentValidator for QCP and QCPPlus
See Also:
  • Constructor Details

    • PolicyIdCondition

      public PolicyIdCondition(String policyId)
      The default constructor for PolicyIdCondition.
      Parameters:
      policyId - the policy oid to check
  • Method Details

    • getPolicyOid

      public final String getPolicyOid()
      Returns the policy OID.
      Returns:
      never null
    • check

      public boolean check(CertificateToken certificateToken)
      Description copied from interface: Condition
      Returns true if the condition is evaluated to true for the given certificate.
      Specified by:
      check in interface Condition
      Parameters:
      certificateToken - CertificateToken to be checked
      Returns:
      true if the condition is filled
    • 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