Class SignatureWrapper

java.lang.Object
eu.europa.esig.dss.diagnostic.AbstractTokenProxy
eu.europa.esig.dss.diagnostic.SignatureWrapper
All Implemented Interfaces:
TokenProxy

public class SignatureWrapper
extends AbstractTokenProxy
  • Constructor Details

    • SignatureWrapper

      public SignatureWrapper​(XmlSignature signature)
  • Method Details

    • getId

      public String getId()
    • getDAIdentifier

      public String getDAIdentifier()
    • getDigestMatchers

      public List<XmlDigestMatcher> getDigestMatchers()
      Specified by:
      getDigestMatchers in interface TokenProxy
      Overrides:
      getDigestMatchers in class AbstractTokenProxy
    • getMessageDigest

      public XmlDigestMatcher getMessageDigest()
    • getCurrentBasicSignature

      protected XmlBasicSignature getCurrentBasicSignature()
      Specified by:
      getCurrentBasicSignature in class AbstractTokenProxy
    • getCurrentCertificateChain

      protected List<XmlChainItem> getCurrentCertificateChain()
      Specified by:
      getCurrentCertificateChain in class AbstractTokenProxy
    • getCurrentSigningCertificate

      protected XmlSigningCertificate getCurrentSigningCertificate()
      Specified by:
      getCurrentSigningCertificate in class AbstractTokenProxy
    • foundCertificates

      public FoundCertificatesProxy foundCertificates()
      Returns FoundCertificatesProxy to access embedded certificates
      Specified by:
      foundCertificates in interface TokenProxy
      Overrides:
      foundCertificates in class AbstractTokenProxy
      Returns:
      FoundCertificatesProxy
    • foundRevocations

      public FoundRevocationsProxy foundRevocations()
      Returns FoundRevocationsProxy to access embedded revocation data
      Specified by:
      foundRevocations in interface TokenProxy
      Overrides:
      foundRevocations in class AbstractTokenProxy
      Returns:
      FoundRevocationsProxy
    • getSignatureFilename

      public String getSignatureFilename()
    • isStructuralValidationValid

      public boolean isStructuralValidationValid()
    • getStructuralValidationMessages

      public List<String> getStructuralValidationMessages()
    • getClaimedSigningTime

      public Date getClaimedSigningTime()
    • getContentType

      public String getContentType()
    • getMimeType

      public String getMimeType()
    • getContentHints

      public String getContentHints()
    • getContentIdentifier

      public String getContentIdentifier()
    • isCounterSignature

      public boolean isCounterSignature()
    • isSignatureDuplicated

      public boolean isSignatureDuplicated()
    • getSignatureDigestReference

      public XmlSignatureDigestReference getSignatureDigestReference()
    • getDataToBeSignedRepresentation

      public XmlDigestAlgoAndValue getDataToBeSignedRepresentation()
    • getTimestampList

      public List<TimestampWrapper> getTimestampList()
    • getTimestampListByType

      public List<TimestampWrapper> getTimestampListByType​(TimestampType timestampType)
    • isSignatureProductionPlacePresent

      public boolean isSignatureProductionPlacePresent()
    • getStreetAddress

      public String getStreetAddress()
    • getCity

      public String getCity()
    • getCountryName

      public String getCountryName()
    • getPostOfficeBoxNumber

      public String getPostOfficeBoxNumber()
    • getPostalCode

      public String getPostalCode()
    • getStateOrProvince

      public String getStateOrProvince()
    • getPostalAddress

      public List<String> getPostalAddress()
    • getSignatureFormat

      public SignatureLevel getSignatureFormat()
    • getErrorMessage

      public String getErrorMessage()
    • isSigningCertificateIdentified

      public boolean isSigningCertificateIdentified()
    • getPolicyId

      public String getPolicyId()
    • isPolicyZeroHash

      public boolean isPolicyZeroHash()
    • getPolicyDigestAlgoAndValue

      public XmlDigestAlgoAndValue getPolicyDigestAlgoAndValue()
    • isPolicyStorePresent

      public boolean isPolicyStorePresent()
      Checks if a SignaturePolicyStore unsigned property is present
      Returns:
      TRUE if SignaturePolicyStore is present, FALSE otherwise
    • getPolicyStoreId

      public String getPolicyStoreId()
    • getPolicyStoreDescription

      public String getPolicyStoreDescription()
    • getPolicyStoreDigestAlgoAndValue

      public XmlDigestAlgoAndValue getPolicyStoreDigestAlgoAndValue()
    • getPolicyStoreDocumentationReferences

      public List<String> getPolicyStoreDocumentationReferences()
    • isBLevelTechnicallyValid

      public boolean isBLevelTechnicallyValid()
    • isThereXLevel

      public boolean isThereXLevel()
    • isXLevelTechnicallyValid

      public boolean isXLevelTechnicallyValid()
    • getTimestampLevelX

      public List<TimestampWrapper> getTimestampLevelX()
    • isThereALevel

      public boolean isThereALevel()
    • isALevelTechnicallyValid

      public boolean isALevelTechnicallyValid()
    • getALevelTimestamps

      public List<TimestampWrapper> getALevelTimestamps()
    • getArchiveTimestamps

      public List<TimestampWrapper> getArchiveTimestamps()
    • isThereTLevel

      public boolean isThereTLevel()
    • isTLevelTechnicallyValid

      public boolean isTLevelTechnicallyValid()
    • getTLevelTimestamps

      public List<TimestampWrapper> getTLevelTimestamps()
    • getContentTimestamps

      public List<TimestampWrapper> getContentTimestamps()
    • getAllTimestampsProducedAfterSignatureCreation

      public List<TimestampWrapper> getAllTimestampsProducedAfterSignatureCreation()
    • getSignatureTimestamps

      public List<TimestampWrapper> getSignatureTimestamps()
    • getDocumentTimestamps

      public List<TimestampWrapper> getDocumentTimestamps()
    • getTimestampIdsList

      public List<String> getTimestampIdsList()
    • getParent

      public SignatureWrapper getParent()
    • getSignatureScopes

      public List<XmlSignatureScope> getSignatureScopes()
    • getSignerRoles

      public List<XmlSignerRole> getSignerRoles()
      Returns list of all found SignerRoles
      Returns:
      list of XmlSignerRoles
    • getClaimedRoles

      public List<XmlSignerRole> getClaimedRoles()
      Returns list of found ClaimedRoles
      Returns:
      list of XmlSignerRoles
    • getCertifiedRoles

      public List<XmlSignerRole> getCertifiedRoles()
      Returns list of found CertifiedRoles
      Returns:
      list of XmlSignerRoles
    • getSignedAssertions

      public List<XmlSignerRole> getSignedAssertions()
      Returns list of all found SignedAssertions
      Returns:
      list of XmlSignerRoles
    • getSignerRoleDetails

      public List<String> getSignerRoleDetails​(List<XmlSignerRole> listOfSignerRoles)
      Returns a list of Strings describing the role for the given listOfSignerRoles
      Parameters:
      listOfSignerRoles - - list of XmlSignerRole to get string role details from
      Returns:
      list of role details
    • getCommitmentTypeIndications

      public List<XmlCommitmentTypeIndication> getCommitmentTypeIndications()
    • isPolicyPresent

      public boolean isPolicyPresent()
      Checks if a SignaturePolicyIdentifier is present
      Returns:
      TRUE if a SignaturePolicyIdentifier is found, FALSE otherwise
    • getPolicyProcessingError

      public String getPolicyProcessingError()
      Returns an error string occurred during a SignaturePolicy proceeding, when applicable
      Returns:
      String representing a policy validation error message, empty when no errors found
    • getPolicyDescription

      public String getPolicyDescription()
      Returns XMLPolicy description if it is not empty
      Returns:
      String
    • getPolicyDocumentationReferences

      public List<String> getPolicyDocumentationReferences()
      Returns DocumentationReferences defined for the signature policy
      Returns:
      a list of Strings
    • getPolicyTransforms

      public List<String> getPolicyTransforms()
      Returns a list of Policy transformations NOTE: used only for XAdES signatures
      Returns:
      a list of Strings
    • getPolicyNotice

      public String getPolicyNotice()
    • getPolicyUrl

      public String getPolicyUrl()
    • isPolicyAsn1Processable

      public boolean isPolicyAsn1Processable()
    • isPolicyIdentified

      public boolean isPolicyIdentified()
    • isPolicyStatus

      public boolean isPolicyStatus()
    • isPolicyDigestAlgorithmsEqual

      public boolean isPolicyDigestAlgorithmsEqual()
    • getPDFRevision

      public XmlPDFRevision getPDFRevision()
      Returns a PAdES-specific PDF Revision info NOTE: applicable only for PAdES
      Returns:
      XmlPDFRevision
    • arePdfModificationsDetected

      public boolean arePdfModificationsDetected()
      Checks if any visual modifications detected in the PDF
      Returns:
      TRUE if modifications detected in a PDF, FALSE otherwise
    • getPdfAnnotationsOverlapConcernedPages

      public List<BigInteger> getPdfAnnotationsOverlapConcernedPages()
      Returns a list of PDF annotation overlap concerned pages
      Returns:
      a list of page numbers
    • getPdfVisualDifferenceConcernedPages

      public List<BigInteger> getPdfVisualDifferenceConcernedPages()
      Returns a list of PDF visual difference concerned pages
      Returns:
      a list of page numbers
    • getPdfPageDifferenceConcernedPages

      public List<BigInteger> getPdfPageDifferenceConcernedPages()
      Returns a list of pages missing/added to the final revision in a comparison with a signed one
      Returns:
      a list of page numbers
    • getFirstFieldName

      public String getFirstFieldName()
      Returns the first signature field name
      Returns:
      String field name
    • getSignatureFieldNames

      public List<String> getSignatureFieldNames()
      Returns a list of signature field names, where the signature is referenced from
      Returns:
      a list of String signature field names
    • getSignatureInformationStore

      public List<XmlSignerInfo> getSignatureInformationStore()
      Returns a list if Signer Infos (Signer Information Store) from CAdES CMS Signed Data
      Returns:
      list of XmlSignerInfos
    • getSignerName

      public String getSignerName()
    • getSignatureDictionaryType

      public String getSignatureDictionaryType()
    • getFilter

      public String getFilter()
    • getSubFilter

      public String getSubFilter()
    • getContactInfo

      public String getContactInfo()
    • getLocation

      public String getLocation()
    • getReason

      public String getReason()
    • getSignatureByteRange

      public List<BigInteger> getSignatureByteRange()
    • getSignatureValue

      public byte[] getSignatureValue()
    • isDocHashOnly

      public boolean isDocHashOnly()
    • isHashOnly

      public boolean isHashOnly()
    • getBinaries

      public byte[] getBinaries()
      Specified by:
      getBinaries in class AbstractTokenProxy