Class SimpleReport

java.lang.Object
eu.europa.esig.dss.simplereport.SimpleReport

public class SimpleReport extends Object
A SimpleReport holder to fetch values from a JAXB SimpleReport.
  • Constructor Details

  • Method Details

    • getValidationTime

      public Date getValidationTime()
      This method returns the validation time.
      Returns:
      the validation time
    • getIndication

      public Indication getIndication(String tokenId)
      This method returns the indication obtained after the validation of a token.
      Parameters:
      tokenId - DSS unique identifier of the token
      Returns:
      the indication for the given token Id
    • getSubIndication

      public SubIndication getSubIndication(String tokenId)
      This method returns the sub-indication obtained after the validation of the token.
      Parameters:
      tokenId - DSS unique identifier of the token
      Returns:
      the sub-indication for the given token Id
    • isValid

      public boolean isValid(String tokenId)
      This method checks if a signature is valid (TOTAL_PASSED) or timestamp validation PASSED
      Parameters:
      tokenId - a token id to get a result for
      Returns:
      true if the signature Indication element is equals to Indication.TOTAL_PASSED or the timestamp Indication element is Equals to Indication.PASSED
    • getSignatureIdList

      public List<String> getSignatureIdList()
      This method retrieves the signature ids
      Returns:
      the List of signature id(s) contained in the simpleReport
    • getTimestampIdList

      public List<String> getTimestampIdList()
      This method retrieves the timestamp ids
      Returns:
      the List of timestamp id(s) contained in the simpleReport
    • getFirstSignatureId

      public String getFirstSignatureId()
      This method returns the first signature id.
      Returns:
      the first signature id
    • getFirstTimestampId

      public String getFirstTimestampId()
      This method returns the first timestamp id.
      Returns:
      the first timestamp id
    • getDocumentFilename

      public String getDocumentFilename()
      Returns a file name for the validated document
      Returns:
      String document file name
    • getTokenFilename

      public String getTokenFilename(String tokenId)
      Returns a file name for a given tokenId
      Parameters:
      tokenId - String id of a token to get its original filename
      Returns:
      String file name
    • getCertificateChain

      public XmlCertificateChain getCertificateChain(String tokenId)
      Returns a certificate chain a given tokenId
      Parameters:
      tokenId - String id of a token to get its certificate chain
      Returns:
      XmlCertificateChain for the token
    • getAdESValidationErrors

      public List<Message> getAdESValidationErrors(String tokenId)
      This method retrieve the ETSI EN 319 102-1 AdES validation errors for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked errors
    • getAdESValidationWarnings

      public List<Message> getAdESValidationWarnings(String tokenId)
      This method retrieve the ETSI EN 319 102-1 AdES validation warnings for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked warnings
    • getAdESValidationInfo

      public List<Message> getAdESValidationInfo(String tokenId)
      This method retrieve the ETSI EN 319 102-1 AdES validation information for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked information
    • getQualificationErrors

      public List<Message> getQualificationErrors(String tokenId)
      This method retrieve the qualification process's errors for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked errors
    • getQualificationWarnings

      public List<Message> getQualificationWarnings(String tokenId)
      This method retrieve the qualification process's warnings for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked warnings
    • getQualificationInfo

      public List<Message> getQualificationInfo(String tokenId)
      This method retrieves the qualification process's information for a given token by id
      Parameters:
      tokenId - the token id
      Returns:
      the linked information
    • getSignatureQualification

      public SignatureQualification getSignatureQualification(String signatureId)
      Returns the signature type: QES, AdES, AdESqc, NA
      Parameters:
      signatureId - the signature id to test
      Returns:
      the SignatureQualification of the given signature
    • getSignatureFormat

      public SignatureLevel getSignatureFormat(String signatureId)
      This method returns the signature format (XAdES_BASELINE_B...)
      Parameters:
      signatureId - the signature id
      Returns:
      the linked signature format
    • getBestSignatureTime

      public Date getBestSignatureTime(String signatureId)
      This method returns the best-signature-time
      Parameters:
      signatureId - the signature id
      Returns:
      the best signing time
    • getSigningTime

      public Date getSigningTime(String signatureId)
      This method returns the signature time
      Parameters:
      signatureId - the signature id
      Returns:
      the signing time
    • getSignatureExtensionPeriodMin

      public Date getSignatureExtensionPeriodMin(String signatureId)
      If the signature validation is TOTAL_PASSED, the result date is the date from when a signature extension is possible to ensure the revocation freshness (all certificates can be covered by a usable revocation data). When certificate chain(s) do not require fresh revocation data (e.g. if signature contains all necessary revocation data), NULL is returned.
      Parameters:
      signatureId - the signature id
      Returns:
      the minimal useful date for a signature extension (or null)
    • getSignatureExtensionPeriodMax

      public Date getSignatureExtensionPeriodMax(String signatureId)
      If the signature validation is TOTAL_PASSED, the result date is the maximum possible date to extend the signature (before the expiration of the signing certificate or the latest timestamping certificate).
      Parameters:
      signatureId - the signature id
      Returns:
      the maximum useful date for a signature extension (or null)
    • getSignedBy

      public String getSignedBy(String signatureId)
      This method returns the signature's signer name
      Parameters:
      signatureId - the signature id
      Returns:
      the signatory
    • getSignaturesCount

      public int getSignaturesCount()
      This method returns the number of signatures
      Returns:
      the number of signatures
    • getValidSignaturesCount

      public int getValidSignaturesCount()
      This method returns the number of valid signatures
      Returns:
      the number of valid signatures
    • getProductionTime

      public Date getProductionTime(String timestampId)
      This method returns the timestamp production time
      Parameters:
      timestampId - the timestamp id
      Returns:
      the production time
    • getProducedBy

      public String getProducedBy(String timestampId)
      This method returns the timestamp's producer name
      Parameters:
      timestampId - the timestamp id
      Returns:
      a name of the timestamp's producer
    • getTimestampQualification

      public TimestampQualification getTimestampQualification(String timestampId)
      This method returns the timestamp's qualification
      Parameters:
      timestampId - the timestamp id
      Returns:
      TimestampQualification for a given timestamp
    • getSignatureTimestamps

      public List<XmlTimestamp> getSignatureTimestamps(String signatureId)
      This method returns a list of timestamps for a signature with the given id
      Parameters:
      signatureId - the signature id
      Returns:
      list if timestamp wrappers
    • getSignatureScopes

      public List<XmlSignatureScope> getSignatureScopes(String tokenId)
      This method returns a list of XmlSignatureScopes for the token (signature or timestamp) with a given Id
      Parameters:
      tokenId - String id of a token to get XmlSignatureScopes for
      Returns:
      a list of XmlSignatureScopes
    • getContainerType

      public ASiCContainerType getContainerType()
      Returns a container type, when applicable (i.e. ASiC validation)
      Returns:
      ASiCContainerType
    • getPDFAProfile

      public String getPDFAProfile()
      Returns a PDF/A Profile name
      Returns:
      String
    • isPDFACompliant

      public boolean isPDFACompliant()
      Returns whether the PDF document is compliant to PDF/A specification. Returns FALSE for all non-PDF documents.
      Returns:
      if the document is compliant to the determined PDF/A profile
    • getJaxbModel

      public XmlSimpleReport getJaxbModel()
      This method returns the jaxb model of the simple report
      Returns:
      the jaxb model