at.gv.egiz.pdfas.impl.api
Class PdfAsObject

java.lang.Object
  extended byat.gv.egiz.pdfas.impl.api.PdfAsObject
All Implemented Interfaces:
PdfAs

public class PdfAsObject
extends Object
implements PdfAs

Implementation of the PdfAs interface.

Author:
wprinz

Constructor Summary
PdfAsObject()
          This constructor is for internal use only - use PdfAsFactory instead.
PdfAsObject(File workDirectory)
          This constructor is for internal use only - use PdfAsFactory instead.
 
Method Summary
 AnalyzeResult analyze(AnalyzeParameters analyzeParameters)
          Analyzes a document for signatures and returns a verify-able list of such.
protected  void fillAnalyzeParametersWithVerifyParameters(AnalyzeParameters ap, VerifyParameters vp)
          Copies all adequate parameters from the VerifyParameters to the AnalyzeParameters.
protected  void fillVerifyAfterAnalysisParametersWithVerifyParameters(VerifyAfterAnalysisParameters vaap, VerifyParameters vp)
          Copies all adequate parameters from the VerifyParameters to the VerifyAfterAnalysisParameters.
 List getProfileInformation()
          Returns the list of information objects about the profiles available in the configuration.
 void reloadConfig()
          Reloads the configuration from the work directory.
 SignResult sign(SignParameters signParameters)
          Signs a PDF document using PDF-AS.
 VerifyResults verify(VerifyAfterAnalysisParameters verifyAfterAnalysisParameters)
          Verifies a list of signatures that have been analyzed previously.
 VerifyResults verify(VerifyParameters verifyParameters)
          Verifies a document with (potentially multiple) PDF-AS signatures.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfAsObject

public PdfAsObject(File workDirectory)
            throws PdfAsException
This constructor is for internal use only - use PdfAsFactory instead.

Parameters:
workDirectory - The work directory.
Throws:
PdfAsException - Thrown, if the configuration cannot be processed.

PdfAsObject

public PdfAsObject()
            throws PdfAsException
This constructor is for internal use only - use PdfAsFactory instead.

Throws:
PdfAsException - Thrown, if the configuration cannot be processed.
Method Detail

reloadConfig

public void reloadConfig()
                  throws PdfAsException
Description copied from interface: PdfAs
Reloads the configuration from the work directory.

Specified by:
reloadConfig in interface PdfAs
Throws:
PdfAsException - Thrown, if an error occurs.
See Also:
PdfAs.reloadConfig()

getProfileInformation

public List getProfileInformation()
                           throws PdfAsException
Description copied from interface: PdfAs
Returns the list of information objects about the profiles available in the configuration.

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.

Specified by:
getProfileInformation in interface PdfAs
Returns:
Returns the list of SignatureProfile objects with information about the profiles available in the configuration.
Throws:
PdfAsException - Thrown on error.
See Also:
PdfAs.getProfileInformation()

sign

public SignResult sign(SignParameters signParameters)
                throws PdfAsException
Description copied from interface: PdfAs
Signs a PDF document using PDF-AS.

Specified by:
sign in interface PdfAs
Parameters:
signParameters - The sign parameters.
Returns:
Returns the signed document plus additional information.
Throws:
PdfAsException - Thrown, if an error occurs.
See Also:
PdfAs.sign(at.gv.egiz.pdfas.api.sign.SignParameters)

verify

public VerifyResults verify(VerifyParameters verifyParameters)
                     throws PdfAsException
Description copied from interface: PdfAs
Verifies a document with (potentially multiple) PDF-AS signatures.

Specified by:
verify in interface PdfAs
Parameters:
verifyParameters - The verify parameters.
Returns:
Returns the verification results.
Throws:
PdfAsException - Thrown, if an error occurs.
See Also:
PdfAs.verify(at.gv.egiz.pdfas.api.verify.VerifyParameters)

fillAnalyzeParametersWithVerifyParameters

protected void fillAnalyzeParametersWithVerifyParameters(AnalyzeParameters ap,
                                                         VerifyParameters vp)
Copies all adequate parameters from the VerifyParameters to the AnalyzeParameters.

Parameters:
ap - The AnalyzeParameters.
vp - The VerifyParameters.

fillVerifyAfterAnalysisParametersWithVerifyParameters

protected void fillVerifyAfterAnalysisParametersWithVerifyParameters(VerifyAfterAnalysisParameters vaap,
                                                                     VerifyParameters vp)
Copies all adequate parameters from the VerifyParameters to the VerifyAfterAnalysisParameters.

Parameters:
vaap - The VerifyAfterAnalysisParameters.
vp - The VerifyParameters.

analyze

public AnalyzeResult analyze(AnalyzeParameters analyzeParameters)
                      throws PdfAsException
Description copied from interface: PdfAs
Analyzes a document for signatures and returns a verify-able list of such.

Specified by:
analyze in interface PdfAs
Parameters:
analyzeParameters - The analyzation parameters.
Returns:
Returns a list of verify-able signatures that were found in the document.
Throws:
PdfAsException - Thrown on error.
See Also:
PdfAs.analyze(at.gv.egiz.pdfas.api.analyze.AnalyzeParameters)

verify

public VerifyResults verify(VerifyAfterAnalysisParameters verifyAfterAnalysisParameters)
                     throws PdfAsException
Description copied from interface: PdfAs
Verifies a list of signatures that have been analyzed previously.

Specified by:
verify in interface PdfAs
Parameters:
verifyAfterAnalysisParameters - The parameters.
Returns:
Returns the verification results.
Throws:
PdfAsException - Thrown on error.
See Also:
PdfAs.verify(at.gv.egiz.pdfas.api.verify.VerifyAfterAnalysisParameters)


Copyright © 2006-2010. All Rights Reserved.