Class PdfCMSRevision

java.lang.Object
eu.europa.esig.dss.pdf.PdfCMSRevision
All Implemented Interfaces:
PdfRevision
Direct Known Subclasses:
PdfDocTimestampRevision, PdfSignatureRevision

public abstract class PdfCMSRevision
extends Object
implements PdfRevision
Defines a PDF revision containing a CMS data (signature/timestamp)
  • Constructor Details

    • PdfCMSRevision

      protected PdfCMSRevision​(PdfSignatureDictionary signatureDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes)
      Default contructor
      Parameters:
      signatureDictionary - The signature dictionary
      signatureFieldNames - the list of signature field names
      signedContent - DSSDocument the signed content
      coverAllOriginalBytes - true if the signature covers all original bytes
  • Method Details

    • getRevisionCoveredBytes

      public byte[] getRevisionCoveredBytes()
      Gets the bytes of the originally signed document
      Returns:
      byte array
    • getPdfSigDictInfo

      public PdfSignatureDictionary getPdfSigDictInfo()
      Description copied from interface: PdfRevision
      Returns a PDF Signature Dictionary info container
      Specified by:
      getPdfSigDictInfo in interface PdfRevision
      Returns:
      PdfSignatureDictionary
    • getByteRange

      public ByteRange getByteRange()
      Gets the signed byte range
      Returns:
      ByteRange
    • getSigningDate

      public Date getSigningDate()
      Gets the claimed signing time
      Returns:
      Date
    • areAllOriginalBytesCovered

      public boolean areAllOriginalBytesCovered()
      Gets of the all PDF's content is signed
      Returns:
      TRUE if the whole PDF is signed, FALSE otherwise
    • getFieldNames

      public List<String> getFieldNames()
      Description copied from interface: PdfRevision
      Returns a list of signature field names that refer the current object
      Specified by:
      getFieldNames in interface PdfRevision
      Returns:
      list of String field names
    • getCMSSignedData

      public org.bouncycastle.cms.CMSSignedData getCMSSignedData()
      Gets the CMSSignedData
      Returns:
      CMSSignedData
    • getModificationDetection

      public PdfModificationDetection getModificationDetection()
      Description copied from interface: PdfRevision
      Returns an information about changes made in the document
      Specified by:
      getModificationDetection in interface PdfRevision
      Returns:
      PdfModificationDetection
    • setModificationDetection

      public void setModificationDetection​(PdfModificationDetection modificationDetection)
      Sets the PdfModificationDetection result
      Parameters:
      modificationDetection - PdfModificationDetection