Package eu.europa.esig.dss.pdf
Class PdfSigDictWrapper
java.lang.Object
eu.europa.esig.dss.pdf.PdfSigDictWrapper
- All Implemented Interfaces:
PdfSignatureDictionary
The default implementation of
PdfSignatureDictionary-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructorPdfSigDictWrapper(PdfDict dictionary) Deprecated.since DSS 6.3. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckConsistency(PdfSignatureDictionary signatureDictionary) Verifies the equality of the current PdfSignatureDictionary with providedsignatureDictionary.Gets the signed/timestamped ByteRangegetCMS()Gets the CMS from /ContentsGets the signer's contact infobyte[]Gets /Contents binaries (CMSSignedData)Returns a /DocMDP dictionary, when presentReturns a /FieldMDP dictionary, when presentGets the Filter valueGets the signer's locationGets the signing reasonGets name of the signerGets the claimed signing timeGets the SubFilter valuegetType()Gets type of the dictionarybooleanChecks if the signature dictionary is consistent.protected voidsetByteRange(ByteRange byteRange) Sets the /ByteRange valueprotected voidSets the CMS value read from /Contentsprotected voidsetContactInfo(String contactInfo) Sets the contact infoprotected voidsetContents(byte[] contents) Sets the /Contents signature valueprotected voidsetDictionary(PdfDict dictionary) Sets the signature field dictionaryprotected voidsetDocMDP(CertificationPermission docMDP) Sets the /DocMPD dictionary valueprotected voidsetFieldMDP(SigFieldPermissions fieldMDP) Sets the /FieldMDP dictionary valueprotected voidSets the /Filter valueprotected voidsetLocation(String location) Sets the signer locationprotected voidSets the signing reasonprotected voidsetSignerName(String signerName) Sets the name of the signerprotected voidsetSigningDate(Date signingDate) Sets the date of signingprotected voidsetSubFilter(String subFilter) Sets the /SubFilter valueprotected voidSets the type of the dictionary
-
Constructor Details
-
PdfSigDictWrapper
protected PdfSigDictWrapper()Default constructor -
PdfSigDictWrapper
Deprecated.since DSS 6.3. Please usenew PdfSigDictWrapperFactory(sigFieldDictionary)#createinsteadDefault constructor- Parameters:
dictionary-PdfDict
-
-
Method Details
-
setDictionary
Sets the signature field dictionary- Parameters:
dictionary-PdfDict
-
getSignerName
Description copied from interface:PdfSignatureDictionaryGets name of the signer- Specified by:
getSignerNamein interfacePdfSignatureDictionary- Returns:
String
-
setSignerName
Sets the name of the signer- Parameters:
signerName-String
-
getContactInfo
Description copied from interface:PdfSignatureDictionaryGets the signer's contact info- Specified by:
getContactInfoin interfacePdfSignatureDictionary- Returns:
String
-
setContactInfo
Sets the contact info- Parameters:
contactInfo-String
-
getReason
Description copied from interface:PdfSignatureDictionaryGets the signing reason- Specified by:
getReasonin interfacePdfSignatureDictionary- Returns:
String
-
setReason
Sets the signing reason- Parameters:
reason-String
-
getLocation
Description copied from interface:PdfSignatureDictionaryGets the signer's location- Specified by:
getLocationin interfacePdfSignatureDictionary- Returns:
String
-
setLocation
Sets the signer location- Parameters:
location-String
-
getSigningDate
Description copied from interface:PdfSignatureDictionaryGets the claimed signing time- Specified by:
getSigningDatein interfacePdfSignatureDictionary- Returns:
Date
-
setSigningDate
Sets the date of signing- Parameters:
signingDate-Date
-
getType
Description copied from interface:PdfSignatureDictionaryGets type of the dictionary- Specified by:
getTypein interfacePdfSignatureDictionary- Returns:
String
-
setType
Sets the type of the dictionary- Parameters:
type-String
-
getFilter
Description copied from interface:PdfSignatureDictionaryGets the Filter value- Specified by:
getFilterin interfacePdfSignatureDictionary- Returns:
String
-
setFilter
Sets the /Filter value- Parameters:
filter-String
-
getSubFilter
Description copied from interface:PdfSignatureDictionaryGets the SubFilter value- Specified by:
getSubFilterin interfacePdfSignatureDictionary- Returns:
String
-
setSubFilter
Sets the /SubFilter value- Parameters:
subFilter-String
-
getContents
public byte[] getContents()Description copied from interface:PdfSignatureDictionaryGets /Contents binaries (CMSSignedData)- Specified by:
getContentsin interfacePdfSignatureDictionary- Returns:
- /Contents binaries
-
setContents
protected void setContents(byte[] contents) Sets the /Contents signature value- Parameters:
contents- byte array
-
getByteRange
Description copied from interface:PdfSignatureDictionaryGets the signed/timestamped ByteRange- Specified by:
getByteRangein interfacePdfSignatureDictionary- Returns:
ByteRange
-
setByteRange
Sets the /ByteRange value- Parameters:
byteRange-ByteRange
-
getDocMDP
Description copied from interface:PdfSignatureDictionaryReturns a /DocMDP dictionary, when present- Specified by:
getDocMDPin interfacePdfSignatureDictionary- Returns:
CertificationPermission
-
setDocMDP
Sets the /DocMPD dictionary value- Parameters:
docMDP-CertificationPermission
-
getFieldMDP
Description copied from interface:PdfSignatureDictionaryReturns a /FieldMDP dictionary, when present- Specified by:
getFieldMDPin interfacePdfSignatureDictionary- Returns:
SigFieldPermissions
-
setFieldMDP
Sets the /FieldMDP dictionary value- Parameters:
fieldMDP-SigFieldPermissions
-
getCMS
Description copied from interface:PdfSignatureDictionaryGets the CMS from /Contents- Specified by:
getCMSin interfacePdfSignatureDictionary- Returns:
CMS
-
setCMS
Sets the CMS value read from /Contents- Parameters:
cms-CMS
-
checkConsistency
Description copied from interface:PdfSignatureDictionaryVerifies the equality of the current PdfSignatureDictionary with providedsignatureDictionary. NOTE: this method is similar toequals(PdfSignatureDictionary)method, but also modifies the state of the object accessible fromisConsistent()method. If none signature dictionary found in the signed revision, NULL may be provided.- Specified by:
checkConsistencyin interfacePdfSignatureDictionary- Parameters:
signatureDictionary-PdfSignatureDictionaryto compare with- Returns:
- TRUE if the
PdfSignatureDictionaryis equal to the providedsignatureDictionary, FALSE otherwise
-
isConsistent
public boolean isConsistent()Description copied from interface:PdfSignatureDictionaryChecks if the signature dictionary is consistent. NOTE: methodcheckConsistency(PdfSignatureDictionary)shall be executed before!- Specified by:
isConsistentin interfacePdfSignatureDictionary- Returns:
- TRUE if the
PdfSignatureDictionaryis consistent, FALSE otherwise
-