Class QcStatementUtils

java.lang.Object
eu.europa.esig.dss.spi.QcStatementUtils

public class QcStatementUtils extends Object
A utils class to retrieve qc-statement from a certificate token
  • Method Details

    • getQcStatements

      public static QcStatements getQcStatements(CertificateToken certToken)
      Extracts the QCStatements from a certificate token
      Parameters:
      certToken - CertificateToken
      Returns:
      QcStatements
    • getQcStatements

      public static QcStatements getQcStatements(org.bouncycastle.asn1.ASN1Sequence qcStatementsSeq)
      Extracts the QCStatements from a qcStatementsSeq. NOTE: does not check if the extension is critical. Use #getQcStatements(CertificateToken certToken) if you need to know whether the certificate extension is critical.
      Parameters:
      qcStatementsSeq - ASN1Sequence
      Returns:
      QcStatements
    • isQcCompliance

      public static boolean isQcCompliance(String oid)
      This method verifies of the given OID is a QcCompliance statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcCompliance, FALSE otherwise
    • isQcLimitValue

      public static boolean isQcLimitValue(String oid)
      This method verifies of the given OID is a QcLimitValue statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcLimitValue, FALSE otherwise
    • isQcRetentionPeriod

      public static boolean isQcRetentionPeriod(String oid)
      This method verifies of the given OID is a QcRetentionPeriod statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcRetentionPeriod, FALSE otherwise
    • isQcSSCD

      public static boolean isQcSSCD(String oid)
      This method verifies of the given OID is a QcSSCD statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcSSCD, FALSE otherwise
    • isQcPds

      public static boolean isQcPds(String oid)
      This method verifies of the given OID is a QcPds statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcPds, FALSE otherwise
    • isQcType

      public static boolean isQcType(String oid)
      This method verifies of the given OID is a QcType statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcType, FALSE otherwise
    • isQcCClegislation

      public static boolean isQcCClegislation(String oid)
      This method verifies of the given OID is a QcCClegislation statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcCClegislation, FALSE otherwise
    • isQcSemanticsIdentifier

      public static boolean isQcSemanticsIdentifier(String oid)
      This method verifies of the given OID is a QcSemanticsIdentifier statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if QcSemanticsIdentifier, FALSE otherwise
    • isPsd2QcType

      public static boolean isPsd2QcType(String oid)
      This method verifies of the given OID is a Psd2QcType statement
      Parameters:
      oid - String to check
      Returns:
      TRUE if Psd2QcType, FALSE otherwise
    • getQcTypes

      public static List<QCType> getQcTypes(List<String> oids)
      This method returns a list of QCTypes from a list of given QcType OIDs
      Parameters:
      oids - a list of Strings representing QcType OIDs
      Returns:
      a list of QCTypes
    • isQcStatementPresent

      public static boolean isQcStatementPresent(QcStatements qcStatements, String qcStatementOid)
      This method verifies whether the given qcStatementOid is present within the QcStatements
      Parameters:
      qcStatements - QcStatements to be verified
      qcStatementOid - String representing OID of a QCStatement to be checked
      Returns:
      TRUE if a QCStatement with the given OID is present, FALSE otherwise
    • isQcTypePresent

      public static boolean isQcTypePresent(QcStatements qcStatements, String qcTypeOid)
      This method verifies whether a QCType with a given qcTypeOid is present within provided QcStatements
      Parameters:
      qcStatements - QcStatements to check QCTypes from
      qcTypeOid - String representing a QCType OID to be verified
      Returns:
      TRUE of the QCType with a given OID is present, FALSE otherwise
    • isQcLegislationPresent

      public static boolean isQcLegislationPresent(QcStatements qcStatements, String qcLegislation)
      This method verifies whether a QCLegislation code is present within provided QcStatements
      Parameters:
      qcStatements - QcStatements to check QCLegislation from
      qcLegislation - String representing a QCLegislation country code to be verified
      Returns:
      TRUE of the QCLegislation is present, FALSE otherwise