Class PDSeedValue
- All Implemented Interfaces:
COSObjectable
- Version:
- $Revision: 1.1 $
- Author:
- Thomas Chojecki
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A Ff flag.static final int
A Ff flag.static final int
A Ff flag.static final int
A Ff flag.static final int
A Ff flag.static final int
A Ff flag.static final int
A Ff flag. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert this standard java object to a COS object.Convert this standard java object to a COS dictionary.An array of names indicating acceptable digest algorithms to use when signing.If Filter is not null and theisFilterRequired()
indicates this entry is a required constraint, then the signature handler specified by this entry shall be used when signing; otherwise, signing shall not take place.(Optional, PDF 1.6) An array of text strings that specifying possible legal attestations.getMDP()
(Optional; PDF 1.6) A dictionary containing a single entry whose key is P and whose value is an integer between 0 and 3.If the Reasons array is provided andisReasonRequired()
indicates that Reasons is a required constraint, one of the reasons in the array shall be used for the signature dictionary; otherwise signing shall not take place.If SubFilter is not null and theisSubFilterRequired()
indicates this entry is a required constraint, then the first matching encodings shall be used when signing; otherwise, signing shall not take place.(Optional; PDF 1.6) A time stamp dictionary containing two entries.float
getV()
The minimum required capability of the signature field seed value dictionary parser.boolean
boolean
boolean
boolean
boolean
boolean
boolean
void
setAddRevInfoRequired
(boolean flag) set true if the AddRevInfo shall be required.void
setDigestMethod
(List<COSName> digestMethod) (Optional, PDF 1.7) An array of names indicating acceptable digest algorithms to use when signing.void
setDigestMethodRequired
(boolean flag) set true if the DigestMethod shall be required.void
(Optional) The signature handler that shall be used to sign the signature field.void
setFilterRequired
(boolean flag) set true if the filter shall be required.void
setLegalAttestation
(List<String> legalAttestation) (Optional, PDF 1.6) An array of text strings that specifying possible legal attestations.void
setLegalAttestationRequired
(boolean flag) set true if the LegalAttestation shall be required.void
setMPD
(PDSeedValueMDP mdp) (Optional; PDF 1.6) A dictionary containing a single entry whose key is P and whose value is an integer between 0 and 3.void
setReasonRequired
(boolean flag) set true if the Reason shall be required.void
setReasonsd
(List<String> reasons) (Optional) An array of text strings that specifying possible reasons for signing a document.void
setSubFilter
(List<COSName> subfilter) (Optional) An array of names indicating encodings to use when signing.void
setSubFilterRequired
(boolean flag) set true if the subfilter shall be required.void
setTimeStamp
(PDSeedValueTimeStamp timestamp) (Optional; PDF 1.6) A time stamp dictionary containing two entries.void
setV
(float minimumRequiredCapability) (Optional) The minimum required capability of the signature field seed value dictionary parser.void
setVRequired
(boolean flag) set true if the V entry shall be required.
-
Field Details
-
FLAG_FILTER
public static final int FLAG_FILTERA Ff flag.- See Also:
-
FLAG_SUBFILTER
public static final int FLAG_SUBFILTERA Ff flag.- See Also:
-
FLAG_V
public static final int FLAG_VA Ff flag.- See Also:
-
FLAG_REASON
public static final int FLAG_REASONA Ff flag.- See Also:
-
FLAG_LEGAL_ATTESTATION
public static final int FLAG_LEGAL_ATTESTATIONA Ff flag.- See Also:
-
FLAG_ADD_REV_INFO
public static final int FLAG_ADD_REV_INFOA Ff flag.- See Also:
-
FLAG_DIGEST_METHOD
public static final int FLAG_DIGEST_METHODA Ff flag.- See Also:
-
-
Constructor Details
-
PDSeedValue
public PDSeedValue()Default constructor. -
PDSeedValue
Constructor.- Parameters:
dict
- The signature dictionary.
-
-
Method Details
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getDictionary
Convert this standard java object to a COS dictionary.- Returns:
- The COS dictionary that matches this Java object.
-
isFilterRequired
public boolean isFilterRequired()- Returns:
- true if the Filter is required
-
setFilterRequired
public void setFilterRequired(boolean flag) set true if the filter shall be required.- Parameters:
flag
- if true, the specified Filter shall be used when signing.
-
isSubFilterRequired
public boolean isSubFilterRequired()- Returns:
- true if the SubFilter is required
-
setSubFilterRequired
public void setSubFilterRequired(boolean flag) set true if the subfilter shall be required.- Parameters:
flag
- if true, the first supported SubFilter in the array shall be used when signing.
-
isDigestMethodRequired
public boolean isDigestMethodRequired()- Returns:
- true if the DigestMethod is required
-
setDigestMethodRequired
public void setDigestMethodRequired(boolean flag) set true if the DigestMethod shall be required.- Parameters:
flag
- if true, one digest from the array shall be used.
-
isVRequired
public boolean isVRequired()- Returns:
- true if the V entry is required
-
setVRequired
public void setVRequired(boolean flag) set true if the V entry shall be required.- Parameters:
flag
- if true, the V entry shall be used.
-
isReasonRequired
public boolean isReasonRequired()- Returns:
- true if the Reason is required
-
setReasonRequired
public void setReasonRequired(boolean flag) set true if the Reason shall be required.- Parameters:
flag
- if true, the Reason entry shall be used.
-
isLegalAttestationRequired
public boolean isLegalAttestationRequired()- Returns:
- true if the LegalAttestation is required
-
setLegalAttestationRequired
public void setLegalAttestationRequired(boolean flag) set true if the LegalAttestation shall be required.- Parameters:
flag
- if true, the LegalAttestation entry shall be used.
-
isAddRevInfoRequired
public boolean isAddRevInfoRequired()- Returns:
- true if the AddRevInfo is required
-
setAddRevInfoRequired
public void setAddRevInfoRequired(boolean flag) set true if the AddRevInfo shall be required.- Parameters:
flag
- if true, the AddRevInfo shall be used.
-
getFilter
If Filter is not null and theisFilterRequired()
indicates this entry is a required constraint, then the signature handler specified by this entry shall be used when signing; otherwise, signing shall not take place. IfisFilterRequired()
indicates that this is an optional constraint, this handler may be used if it is available. If it is not available, a different handler may be used instead.- Returns:
- the filter that shall be used by the signature handler
-
setFilter
(Optional) The signature handler that shall be used to sign the signature field.- Parameters:
filter
- is the filter that shall be used by the signature handler
-
getSubFilter
If SubFilter is not null and theisSubFilterRequired()
indicates this entry is a required constraint, then the first matching encodings shall be used when signing; otherwise, signing shall not take place. IfisSubFilterRequired()
indicates that this is an optional constraint, then the first matching encoding shall be used if it is available. If it is not available, a different encoding may be used instead.- Returns:
- the subfilter that shall be used by the signature handler
-
setSubFilter
(Optional) An array of names indicating encodings to use when signing. The first name in the array that matches an encoding supported by the signature handler shall be the encoding that is actually used for signing.- Parameters:
subfilter
- is the name that shall be used for encoding
-
getDigestMethod
An array of names indicating acceptable digest algorithms to use when signing. The value shall be one of SHA1, SHA256, SHA384, SHA512, RIPEMD160. The default value is implementation-specific.- Returns:
- the digest method that shall be used by the signature handler
-
setDigestMethod
(Optional, PDF 1.7) An array of names indicating acceptable digest algorithms to use when signing. The value shall be one of SHA1, SHA256, SHA384, SHA512, RIPEMD160. The default value is implementation-specific.
This property is only applicable if the digital credential signing contains RSA public/privat keys
- Parameters:
digestMethod
- is a list of possible names of the digests, that should be used for signing.
-
getV
public float getV()The minimum required capability of the signature field seed value dictionary parser. A value of 1 specifies that the parser shall be able to recognize all seed value dictionary entries in a PDF 1.5 file. A value of 2 specifies that it shall be able to recognize all seed value dictionary entries specified.- Returns:
- the minimum required capability of the signature field seed value dictionary parser
-
setV
public void setV(float minimumRequiredCapability) (Optional) The minimum required capability of the signature field seed value dictionary parser. A value of 1 specifies that the parser shall be able to recognize all seed value dictionary entries in a PDF 1.5 file. A value of 2 specifies that it shall be able to recognize all seed value dictionary entries specified.- Parameters:
minimumRequiredCapability
- is the minimum required capability of the signature field seed value dictionary parser
-
getReasons
If the Reasons array is provided andisReasonRequired()
indicates that Reasons is a required constraint, one of the reasons in the array shall be used for the signature dictionary; otherwise signing shall not take place. If theisReasonRequired()
indicates Reasons is an optional constraint, one of the reasons in the array may be chose or a custom reason can be provided.- Returns:
- the reasons that should be used by the signature handler
-
setReasonsd
(Optional) An array of text strings that specifying possible reasons for signing a document. If specified, the reasons supplied in this entry replace those used by conforming products.- Parameters:
reasons
- is a list of possible text string that specifying possible reasons
-
getMDP
(Optional; PDF 1.6) A dictionary containing a single entry whose key is P and whose value is an integer between 0 and 3. A value of 0 defines the signatures as an author signature. The value 1 through 3 shall be used for certification signatures and correspond to the value of P in a DocMDP transform parameters dictionary.
If this MDP key is not present or the MDP dictionary does not contain a P entry, no rules shall be defined regarding the type of signature or its permissions.
- Returns:
- the mdp dictionary as PDSeedValueMDP
-
setMPD
(Optional; PDF 1.6) A dictionary containing a single entry whose key is P and whose value is an integer between 0 and 3. A value of 0 defines the signatures as an author signature. The value 1 through 3 shall be used for certification signatures and correspond to the value of P in a DocMDP transform parameters dictionary.
If this MDP key is not present or the MDP dictionary does not contain a P entry, no rules shall be defined regarding the type of signature or its permissions.
- Parameters:
mdp
- dictionary
-
getTimeStamp
(Optional; PDF 1.6) A time stamp dictionary containing two entries. URL which is a ASCII string specifying the URL to a rfc3161 conform timestamp server and Ff to indicate if a timestamp is required or optional.
- Returns:
- the timestamp dictionary as PDSeedValueTimeStamp
-
setTimeStamp
(Optional; PDF 1.6) A time stamp dictionary containing two entries. URL which is a ASCII string specifying the URL to a rfc3161 conform timestamp server and Ff to indicate if a timestamp is required or optional.
- Parameters:
timestamp
- dictionary
-
getLegalAttestation
(Optional, PDF 1.6) An array of text strings that specifying possible legal attestations.- Returns:
- the reasons that should be used by the signature handler
-
setLegalAttestation
(Optional, PDF 1.6) An array of text strings that specifying possible legal attestations.- Parameters:
legalAttestation
- is a list of possible text string that specifying possible legal attestations.
-