@Deprecated
public class SignParameters
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
checkForPlaceholder
Deprecated.
The flag to de-/activate placeholder search
|
protected DataSource |
document
Deprecated.
The document to be signed.
|
protected DataSink |
output
Deprecated.
The output DataSink that will receive the signed document.
|
protected java.util.Properties |
overrideProps
Deprecated.
|
protected java.lang.String |
placeholderId
Deprecated.
The id of the placeholder which should be replaced.
|
protected int |
placeholderMatchMode
Deprecated.
The matching mode for placeholder extraction.
If a placeholderId is set, the match mode determines what is to be done, if no matching placeholder is found in the document. |
protected java.lang.String |
signatureDevice
Deprecated.
The signature device to perform the actual signature.
|
protected java.lang.String |
signatureKeyIdentifier
Deprecated.
The signature key identifier specifying which signature key should be used
by the signature device to perform the signature.
|
protected SignaturePositioning |
signaturePositioning
Deprecated.
The signature position.
|
protected java.lang.String |
signatureProfileId
Deprecated.
The signature profile identifier identifying the profile to be used in the
config file.
|
protected java.lang.String |
signatureType
Deprecated.
The type of the signature.
|
protected TimeStamper |
timeStamperImpl
Deprecated.
|
Constructor and Description |
---|
SignParameters()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DataSource |
getDocument()
Deprecated.
|
DataSink |
getOutput()
Deprecated.
|
java.lang.String |
getPlaceholderId()
Deprecated.
The id of the placeholder to replace.
|
int |
getPlaceholderMatchMode()
Deprecated.
Get the placeholder matching mode.
|
java.util.Properties |
getProfileOverrideProperties()
Deprecated.
Get override values created via
setProfileOverrideValue(String, String) |
java.lang.String |
getSignatureDevice()
Deprecated.
|
java.lang.String |
getSignatureKeyIdentifier()
Deprecated.
|
SignaturePositioning |
getSignaturePositioning()
Deprecated.
|
java.lang.String |
getSignatureProfileId()
Deprecated.
|
java.lang.String |
getSignatureType()
Deprecated.
|
TimeStamper |
getTimeStamperImpl()
Deprecated.
|
java.lang.Boolean |
isCheckForPlaceholder()
Deprecated.
Get the value of the checkForPlaceholder flag.
|
void |
setCheckForPlaceholder(java.lang.Boolean searchForPlaceHolder)
Deprecated.
Set this to true, if you want a search for placeholder images to be performed and
appropriate images to be replaced.
|
void |
setDocument(DataSource document)
Deprecated.
|
void |
setOutput(DataSink output)
Deprecated.
|
void |
setPlaceholderId(java.lang.String placeholderId)
Deprecated.
Set an explicit placeholder id.
|
void |
setPlaceholderMatchMode(int placeholderMatchMode)
Deprecated.
Set the behavior if no exactly matching placeholder could be found.
Exactly matching meaning: If a placeholderId is set: a placeholder which has exactly this id embedded If no placeholderId is set: a placeholder without an embedded id is found |
void |
setProfileOverrideValue(java.lang.String key,
java.lang.String value)
Deprecated.
Override user defined values from the used signature profile like "value.SIG_META".
|
void |
setSignatureDevice(java.lang.String signatureDevice)
Deprecated.
|
void |
setSignatureKeyIdentifier(java.lang.String signatureKeyIdentifier)
Deprecated.
|
void |
setSignaturePositioning(SignaturePositioning signaturePositioning)
Deprecated.
|
void |
setSignatureProfileId(java.lang.String signatureProfileId)
Deprecated.
|
void |
setSignatureType(java.lang.String signatureType)
Deprecated.
|
void |
setTimeStamperImpl(TimeStamper timeStamperImpl)
Deprecated.
Set a
TimeStamper to create a timestamp on the signature value. |
protected DataSource document
The DataSource implementation encapsulates the actual representaion of the data. E.g. the DataSource may be File based or byte array based. See package at.gv.egiz.pdfas.framework.input and at.gv.pdfas.impl.input
protected java.lang.String signatureType
May be Constants.SIGNATURE_TYPE_BINARY
or
Constants.SIGNATURE_TYPE_TEXTUAL
.
protected java.lang.String signatureDevice
May be Constants.SIGNATURE_DEVICE_MOA
or
Constants.SIGNATURE_DEVICE_BKU
.
protected java.lang.String signatureProfileId
Note: In near future it will be possible to provide a full specified profile here instead of the profile id.
protected java.lang.String signatureKeyIdentifier
Providing a null value (default) means that no explicit signature key identifier is provided. The selected signature device will then use its default mechanism for retrieving this information (which is usually to read the key from the provided signature profile).
Note that not all signature devices may support this parameter. If a signature device doesn't support this parameter the value should be null.
This key is usually passed straight through to the signature device and thereby has to contain an appropriate value for the signature device chosen.
Currently, only the Constants.SIGNATURE_DEVICE_MOA
signature device
evaluates this parameter and passes the provided String to MOA as the MOA
key group identifier. If null is provided, the MOA signature device will
determine the signature key identifier to be used from the provided profile
and, if not specified there either, from the MOA default configuration.
protected SignaturePositioning signaturePositioning
protected DataSink output
protected TimeStamper timeStamperImpl
protected java.lang.Boolean checkForPlaceholder
protected java.lang.String placeholderId
protected int placeholderMatchMode
placeholderId
is set, the match mode determines what is to be done, if no matching placeholder is found in the document.
Constants.PLACEHOLDER_MATCH_MODE_MODERATE
.protected java.util.Properties overrideProps
public TimeStamper getTimeStamperImpl()
public void setTimeStamperImpl(TimeStamper timeStamperImpl)
TimeStamper
to create a timestamp on the signature value. Will be
called after sign. For binary signatures only. Timestamp will be embedded in egiz dict /TimeStamp.timeStamperImpl
- public DataSource getDocument()
public void setDocument(DataSource document)
document
- the document to setpublic java.lang.String getSignatureType()
public void setSignatureType(java.lang.String signatureType)
signatureType
- the signatureType to setpublic java.lang.String getSignatureDevice()
public void setSignatureDevice(java.lang.String signatureDevice)
signatureDevice
- the signatureDevice to setpublic java.lang.String getSignatureProfileId()
public void setSignatureProfileId(java.lang.String signatureProfileId)
signatureProfileId
- the signatureProfileId to setpublic SignaturePositioning getSignaturePositioning()
public void setSignaturePositioning(SignaturePositioning signaturePositioning)
signaturePositioning
- the signaturePositioning to setpublic DataSink getOutput()
public void setOutput(DataSink output)
output
- the output to setpublic java.lang.String getSignatureKeyIdentifier()
public void setSignatureKeyIdentifier(java.lang.String signatureKeyIdentifier)
signatureKeyIdentifier
- the signatureKeyIdentifier to setpublic void setProfileOverrideValue(java.lang.String key, java.lang.String value)
SignatureTypes.REQUIRED_SIG_KEYS
.
The override values are bound to the SignParameters
instance.
Sample usage:
SignParameters sp = new SignParameters(); . . . sp.setSignatureProfileId("SIGNATURBLOCK_DE"); // expressions do not work on binary signature fields without phlength setting!! sp.setProfileOverrideValue("SIG_META", "It's nice to be important, but it is more important to be nice ${subject.L}");; sp.setProfileOverrideValue("SIG_LABEL", "./images/signatur-logo_en.png"); // execute sign using the overrides pdfAs.sign(sp);
key
- the name of the setting to override e.g. "SIG_META"value
- The new valuepublic java.util.Properties getProfileOverrideProperties()
setProfileOverrideValue(String, String)
public java.lang.Boolean isCheckForPlaceholder()
public void setCheckForPlaceholder(java.lang.Boolean searchForPlaceHolder)
check
- public void setPlaceholderId(java.lang.String placeholderId)
placeholderId
- public java.lang.String getPlaceholderId()
public void setPlaceholderMatchMode(int placeholderMatchMode)
placeholderMatchMode
- Constants.PLACEHOLDER_MATCH_MODE_LENIENT
,
Constants.PLACEHOLDER_MATCH_MODE_MODERATE
,
Defaults to {@link Constants#PLACEHOLDER_MATCH_MODE_MODERATE}.
public int getPlaceholderMatchMode()
getPlaceholderMatchMode()