Constructor and Description |
---|
PdfAsObject(java.io.File workdirectory) |
Modifier and Type | Method and Description |
---|---|
AnalyzeResult |
analyze(AnalyzeParameters analyzeParameters)
Analyzes a document for signatures and returns a verify-able list of such.
|
DynamicSignatureProfile |
createDynamicSignatureProfile(java.lang.String parentProfile,
DynamicSignatureLifetimeEnum mode)
Create a signature profile dynamically.
|
DynamicSignatureProfile |
createDynamicSignatureProfile(java.lang.String myUniqueName,
java.lang.String parentProfile,
DynamicSignatureLifetimeEnum mode)
Create a signature profile dynamically.
|
DynamicSignatureProfile |
createEmptyDynamicSignatureProfile(DynamicSignatureLifetimeEnum mode)
Create a signature profile dynamically.
|
DynamicSignatureProfile |
createEmptyDynamicSignatureProfile(java.lang.String myUniqueName,
DynamicSignatureLifetimeEnum mode)
Create a signature profile dynamically.
|
SignResult |
finishSign(SignParameters signParameters,
SignatureDetailInformation signatureDetailInformation)
Finish the signature process.
|
java.util.List |
getProfileInformation()
Returns the list of information objects about activated profiles available in the
configuration.
|
DynamicSignatureProfile |
loadDynamicSignatureProfile(java.lang.String profileName)
Loads an existing dynamic signature profile by its name.
|
SignatureDetailInformation |
prepareSign(SignParameters signParameters)
Prepares the signature of the given PDF document.
|
ReconstructXMLDsigResult |
reconstructXMLDSIG(ReconstructXMLDsigAfterAnalysisParameters reconstructXMLDsigParameters)
Reconstruct the
|
ReconstructXMLDsigResult |
reconstructXMLDSIG(ReconstructXMLDsigParameters reconstructXMLDsigParameters)
Reconstruct the
|
void |
reloadConfig()
Reloads the configuration from the work directory.
|
SignResult |
sign(SignParameters signParameters)
Signs a PDF document using PDF-AS.
|
SignResult |
sign(SignParameters signParameters,
SignatureDetailInformation signatureDetailInformation)
Signs a PDF document using PDF-AS.
This uses the SignatorInformation which was obtained by a call to PdfAs.prepareSign(SignParameters) |
VerifyResults |
verify(VerifyAfterAnalysisParameters verifyAfterAnalysisParameters)
Verifies a list of signatures that have been analyzed previously.
|
VerifyResults |
verify(VerifyAfterReconstructXMLDsigParameters verifyAfterReconstructXMLDsigParameters)
Verifies a list of signatures that have been analyzed previously and the xmldsigs have been reconstructed.
|
VerifyResults |
verify(VerifyParameters verifyParameters)
Verifies a document with (potentially multiple) PDF-AS signatures.
|
public SignResult sign(SignParameters signParameters) throws PdfAsException
PdfAs
sign
in interface PdfAs
signParameters
- The sign parameters.PdfAsException
- Thrown, if an error occurs.SignParameters
,
SignResult
public SignResult sign(SignParameters signParameters, SignatureDetailInformation signatureDetailInformation) throws PdfAsException
PdfAs
SignatorInformation
which was obtained by a call to PdfAs.prepareSign(SignParameters)
sign
in interface PdfAs
signParameters
- The sign parameters.signatureDetailInformation
- The signature information which was previously obtained by a call to PdfAs.prepareSign(SignParameters)
PdfAsException
- Thrown, if an error occurs.SignParameters
,
SignResult
public VerifyResults verify(VerifyParameters verifyParameters) throws PdfAsException
PdfAs
verify
in interface PdfAs
verifyParameters
- The verify parameters.PdfAsException
- Thrown, if an error occurs.VerifyParameters
,
VerifyResults
,
VerifyResult
public AnalyzeResult analyze(AnalyzeParameters analyzeParameters) throws PdfAsException
PdfAs
analyze
in interface PdfAs
analyzeParameters
- The analyzation parameters.PdfAsException
- Thrown on error.AnalyzeParameters
,
AnalyzeResult
,
#verify(AnalyzeResult)}
public ReconstructXMLDsigResult reconstructXMLDSIG(ReconstructXMLDsigParameters reconstructXMLDsigParameters) throws PdfAsException
PdfAs
reconstructXMLDSIG
in interface PdfAs
reconstructXMLDsigParameters
- The data from which to reconstruct the xmldsigPdfAsException
- if the reconstruction failspublic ReconstructXMLDsigResult reconstructXMLDSIG(ReconstructXMLDsigAfterAnalysisParameters reconstructXMLDsigParameters) throws PdfAsException
PdfAs
reconstructXMLDSIG
in interface PdfAs
reconstructXMLDsigParameters
- The data from which to reconstruct the xmldsigsPdfAsException
public VerifyResults verify(VerifyAfterAnalysisParameters verifyAfterAnalysisParameters) throws PdfAsException
PdfAs
verify
in interface PdfAs
verifyAfterAnalysisParameters
- The parameters.PdfAsException
- Thrown on error.AnalyzeResult
,
VerifyAfterAnalysisParameters
,
VerifyResults
,
VerifyResult
,
#analyze(AnalyzeParameters)}
public VerifyResults verify(VerifyAfterReconstructXMLDsigParameters verifyAfterReconstructXMLDsigParameters) throws PdfAsException
PdfAs
verify
in interface PdfAs
verifyAfterReconstructXMLDsigParameters
- The parameters.PdfAsException
- Thrown on error.public void reloadConfig() throws PdfAsException
PdfAs
reloadConfig
in interface PdfAs
PdfAsException
- Thrown, if an error occurs.public java.util.List getProfileInformation() throws PdfAsException
PdfAs
Note: Currently the profile information consists of the profile Id and the MOA Key Id only.
Note: In near future the profile management will be moved out of the config file into an API class representation of the profiles which may render this (and related) methods obsolete.
getProfileInformation
in interface PdfAs
SignatureProfile
objects with
information about active profiles available in the configuration.PdfAsException
- Thrown on error.SignatureProfile
public DynamicSignatureProfile createDynamicSignatureProfile(java.lang.String parentProfile, DynamicSignatureLifetimeEnum mode)
PdfAs
SignatureProfile
.createDynamicSignatureProfile
in interface PdfAs
parentProfile
- a parent profile id to inherit all propertiesmode
- lifetime modepublic DynamicSignatureProfile createDynamicSignatureProfile(java.lang.String myUniqueName, java.lang.String parentProfile, DynamicSignatureLifetimeEnum mode)
PdfAs
SignatureProfile
.
It is recommended to use PdfAs.createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)
that generates
a unique name on its own.createDynamicSignatureProfile
in interface PdfAs
myUniqueName
- a unique name for the profileparentProfile
- a parent profile id to inherit all propertiesmode
- lifetime modeDynamicSignatureProfile
public DynamicSignatureProfile createEmptyDynamicSignatureProfile(DynamicSignatureLifetimeEnum mode)
PdfAs
SignatureProfile
.
PdfAs.createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)
that inherits from an
existing profile saving you a lot of work.createEmptyDynamicSignatureProfile
in interface PdfAs
mode
- lifetime modeDynamicSignatureProfile
public DynamicSignatureProfile createEmptyDynamicSignatureProfile(java.lang.String myUniqueName, DynamicSignatureLifetimeEnum mode)
PdfAs
SignatureProfile
.
PdfAs.createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)
that inherits from an
existing profile saving you a lot of work.createEmptyDynamicSignatureProfile
in interface PdfAs
myUniqueName
- a unique name for the profilemode
- lifetime modepublic DynamicSignatureProfile loadDynamicSignatureProfile(java.lang.String profileName)
PdfAs
DynamicSignatureLifetimeEnum.MANUAL
loadDynamicSignatureProfile
in interface PdfAs
null
if not found.DynamicSignatureProfile
public SignatureDetailInformation prepareSign(SignParameters signParameters) throws PdfAsException
PdfAs
prepareSign
in interface PdfAs
signParameters
- The sign parameters.SignatureDetailInformation.getSignaturePosition()
, SignatureDetailInformation.getNonTextualObjects()
, SignatureDetailInformation.getSignatureData()
are filled.PdfAsException
- if something goes wrong during the processpublic SignResult finishSign(SignParameters signParameters, SignatureDetailInformation signatureDetailInformation) throws PdfAsException
PdfAs
finishSign
in interface PdfAs
signParameters
- The sign parameters.signatureDetailInformation
- The signature detail information.PdfAsException