at.gv.egiz.pdfas
Class PdfAsFactory

java.lang.Object
  extended by at.gv.egiz.pdfas.PdfAsFactory

public class PdfAsFactory
extends Object

Main factory for creating a PDF-AS API Instance (PdfAs Interface).

Author:
wprinz
See Also:
PdfAs

Constructor Summary
PdfAsFactory()
           
 
Method Summary
static PdfAs createPdfAs()
          Creates a PDF-AS API instance assuming that the configuration is located within the user's home directory.
static PdfAs createPdfAs(boolean registerProvider)
          Creates a PDF-AS API instance assuming that the configuration is located within the user's home directory.
static PdfAs createPdfAs(File workDirectory)
          Creates a PDF-AS API instance for the given work directory.
static PdfAs createPdfAs(File workDirectory, boolean registerProvider)
          Creates a PDF-AS API instance for the given work directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfAsFactory

public PdfAsFactory()
Method Detail

createPdfAs

public static PdfAs createPdfAs(File workDirectory)
                         throws PdfAsException
Creates a PDF-AS API instance for the given work directory.

Parameters:
workDirectory - The work directory. If null the configuration is assumed to be located within the user's home directory. Note: IAIK JCE and IAIK ECC security provders are automatically registered.
Returns:
Returns an instance of the PDF-AS API.
Throws:
IllegalArgumentException - Thrown, if the workDirectory doesn't exist.
PdfAsException - Thrown, if the work directory does not meet its requirements, or if the config file is invalid.
See Also:
PdfAS#USERHOME_CONFIG_FOLDER

createPdfAs

public static PdfAs createPdfAs(File workDirectory,
                                boolean registerProvider)
                         throws PdfAsException
Creates a PDF-AS API instance for the given work directory.

Parameters:
workDirectory - The work directory. If null the configuration is assumed to be located within the user's home directory.
registerProvider - true: automatically registers IAIK JCE and ECC Provider; false: providers will NOT be automatically registered, providers needed have to be registered by the API user
Returns:
Returns an instance of the PDF-AS API.
Throws:
IllegalArgumentException - Thrown, if the workDirectory doesn't exist.
PdfAsException - Thrown, if the work directory does not meet its requirements, or if the config file is invalid.
See Also:
PdfAS#USERHOME_CONFIG_FOLDER

createPdfAs

public static PdfAs createPdfAs()
                         throws PdfAsException
Creates a PDF-AS API instance assuming that the configuration is located within the user's home directory. Note: IAIK JCE and IAIK ECC security providers are automatically registered.

Returns:
Returns an instance of the PDF-AS API.
Throws:
IllegalArgumentException - Thrown, if the work directory doesn't exist within the user's home directory.
PdfAsException - Thrown, if the work directory does not meet its requirements, or if the config file is invalid.
See Also:
PdfAS#USERHOME_CONFIG_FOLDER

createPdfAs

public static PdfAs createPdfAs(boolean registerProvider)
                         throws PdfAsException
Creates a PDF-AS API instance assuming that the configuration is located within the user's home directory.

Parameters:
registerProvider - true: automatically registers IAIK JCE and ECC Provider; false: providers will NOT be automatically registered, providers needed have to be registered by the API user
Returns:
Returns an instance of the PDF-AS API.
Throws:
IllegalArgumentException - Thrown, if the work directory doesn't exist within the user's home directory.
PdfAsException - Thrown, if the work directory does not meet its requirements, or if the config file is invalid.
See Also:
PdfAS#USERHOME_CONFIG_FOLDER


Copyright © 2006-2011. All Rights Reserved.