public class PDSeedValue extends Object implements COSObjectable
Modifier and Type | Field and Description |
---|---|
static int |
FLAG_ADD_REV_INFO
A Ff flag.
|
static int |
FLAG_DIGEST_METHOD
A Ff flag.
|
static int |
FLAG_FILTER
A Ff flag.
|
static int |
FLAG_LEGAL_ATTESTATION
A Ff flag.
|
static int |
FLAG_REASON
A Ff flag.
|
static int |
FLAG_SUBFILTER
A Ff flag.
|
static int |
FLAG_V
A Ff flag.
|
Constructor and Description |
---|
PDSeedValue()
Default constructor.
|
PDSeedValue(COSDictionary dict)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
COSDictionary |
getCOSObject()
Convert this standard java object to a COS dictionary.
|
List<String> |
getDigestMethod()
An array of names indicating acceptable digest algorithms to use when
signing.
|
String |
getFilter()
If Filter is not null and the
isFilterRequired() 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. |
List<String> |
getLegalAttestation()
(Optional, PDF 1.6) An array of text strings that specifying possible legal
attestations.
|
PDSeedValueMDP |
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.
|
List<String> |
getReasons()
If the Reasons array is provided and
isReasonRequired() 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. |
PDSeedValueCertificate |
getSeedValueCertificate()
(Optional) A certificate seed value dictionary containing information about the certificate
to be used when signing.
|
List<String> |
getSubFilter()
If SubFilter is not null and the
isSubFilterRequired() indicates this
entry is a required constraint, then the first matching encodings shall be used when
signing; otherwise, signing shall not take place. |
PDSeedValueTimeStamp |
getTimeStamp()
(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 |
isAddRevInfoRequired() |
boolean |
isDigestMethodRequired() |
boolean |
isFilterRequired() |
boolean |
isLegalAttestationRequired() |
boolean |
isReasonRequired() |
boolean |
isSubFilterRequired() |
boolean |
isVRequired() |
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 |
setFilter(COSName filter)
(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 |
setReasons(List<String> reasons)
(Optional) An array of text strings that specifying possible reasons for signing
a document.
|
void |
setReasonsd(List<String> reasons)
Deprecated.
|
void |
setSeedValueCertificate(PDSeedValueCertificate certificate)
(Optional) A certificate seed value dictionary containing information about the certificate
to be used when signing.
|
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.
|
public static final int FLAG_FILTER
public static final int FLAG_SUBFILTER
public static final int FLAG_V
public static final int FLAG_REASON
public static final int FLAG_LEGAL_ATTESTATION
public static final int FLAG_ADD_REV_INFO
public static final int FLAG_DIGEST_METHOD
public PDSeedValue()
public PDSeedValue(COSDictionary dict)
dict
- The signature dictionary.public COSDictionary getCOSObject()
getCOSObject
in interface COSObjectable
public boolean isFilterRequired()
public void setFilterRequired(boolean flag)
flag
- if true, the specified Filter shall be used when signing.public boolean isSubFilterRequired()
public void setSubFilterRequired(boolean flag)
flag
- if true, the first supported SubFilter in the array shall be used when signing.public boolean isDigestMethodRequired()
public void setDigestMethodRequired(boolean flag)
flag
- if true, one digest from the array shall be used.public boolean isVRequired()
public void setVRequired(boolean flag)
flag
- if true, the V entry shall be used.public boolean isReasonRequired()
public void setReasonRequired(boolean flag)
flag
- if true, the Reason entry shall be used.public boolean isLegalAttestationRequired()
public void setLegalAttestationRequired(boolean flag)
flag
- if true, the LegalAttestation entry shall be used.public boolean isAddRevInfoRequired()
public void setAddRevInfoRequired(boolean flag)
flag
- if true, the AddRevInfo shall be used.public String getFilter()
isFilterRequired()
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. If isFilterRequired()
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.public void setFilter(COSName filter)
filter
- is the filter that shall be used by the signature handlerpublic List<String> getSubFilter()
isSubFilterRequired()
indicates this
entry is a required constraint, then the first matching encodings shall be used when
signing; otherwise, signing shall not take place. If isSubFilterRequired()
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.public void setSubFilter(List<COSName> subfilter)
subfilter
- is the name that shall be used for encodingpublic List<String> getDigestMethod()
public void setDigestMethod(List<COSName> digestMethod)
(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
digestMethod
- is a list of possible names of the digests, that should be
used for signing.public float getV()
public void setV(float minimumRequiredCapability)
minimumRequiredCapability
- is the minimum required capability of the
signature field seed value dictionary parserpublic List<String> getReasons()
isReasonRequired()
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 the
isReasonRequired()
indicates Reasons is an optional constraint, one of
the reasons in the array may be chose or a custom reason can be provided.@Deprecated public void setReasonsd(List<String> reasons)
setReasons(java.util.List)
reasons
- is a list of possible text string that specifying possible reasonspublic void setReasons(List<String> reasons)
reasons
- is a list of possible text string that specifying possible reasonspublic PDSeedValueMDP 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.
public 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. 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.
mdp
- dictionarypublic PDSeedValueCertificate getSeedValueCertificate()
public void setSeedValueCertificate(PDSeedValueCertificate certificate)
certificate
- dictionarypublic PDSeedValueTimeStamp 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.
public void setTimeStamp(PDSeedValueTimeStamp timestamp)
(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.
timestamp
- dictionarypublic List<String> getLegalAttestation()
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.