Package eu.europa.esig.dss.pdf
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 Summary
Constructors Modifier Constructor Description protected
PdfCMSRevision(PdfSignatureDictionary signatureDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes)
Default contructor -
Method Summary
Modifier and Type Method Description boolean
areAllOriginalBytesCovered()
Gets of the all PDF's content is signedByteRange
getByteRange()
Gets the signed byte rangeorg.bouncycastle.cms.CMSSignedData
getCMSSignedData()
Gets the CMSSignedDataList<String>
getFieldNames()
Returns a list of signature field names that refer the current objectPdfModificationDetection
getModificationDetection()
Returns an information about changes made in the documentPdfSignatureDictionary
getPdfSigDictInfo()
Returns a PDF Signature Dictionary info containerbyte[]
getRevisionCoveredBytes()
Gets the bytes of the originally signed documentDate
getSigningDate()
Gets the claimed signing timevoid
setModificationDetection(PdfModificationDetection modificationDetection)
Sets thePdfModificationDetection
result
-
Constructor Details
-
PdfCMSRevision
protected PdfCMSRevision(PdfSignatureDictionary signatureDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes)Default contructor- Parameters:
signatureDictionary
- The signature dictionarysignatureFieldNames
- the list of signature field namessignedContent
-DSSDocument
the signed contentcoverAllOriginalBytes
- 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
Description copied from interface:PdfRevision
Returns a PDF Signature Dictionary info container- Specified by:
getPdfSigDictInfo
in interfacePdfRevision
- Returns:
PdfSignatureDictionary
-
getByteRange
Gets the signed byte range- Returns:
ByteRange
-
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
Description copied from interface:PdfRevision
Returns a list of signature field names that refer the current object- Specified by:
getFieldNames
in interfacePdfRevision
- Returns:
- list of
String
field names
-
getCMSSignedData
public org.bouncycastle.cms.CMSSignedData getCMSSignedData()Gets the CMSSignedData- Returns:
CMSSignedData
-
getModificationDetection
Description copied from interface:PdfRevision
Returns an information about changes made in the document- Specified by:
getModificationDetection
in interfacePdfRevision
- Returns:
PdfModificationDetection
-
setModificationDetection
Sets thePdfModificationDetection
result- Parameters:
modificationDetection
-PdfModificationDetection
-