diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-16 10:59:52 +0200 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2014-10-16 10:59:52 +0200 |
commit | 7b105bafe5a1f4c01224c8ae0b820a478b09447f (patch) | |
tree | c201dc068bf2e01c5698493225186ae070d86149 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api | |
parent | 3c4eac027bfd68bfce63a2eed010ccc2b7310802 (diff) | |
download | pdf-as-4-7b105bafe5a1f4c01224c8ae0b820a478b09447f.tar.gz pdf-as-4-7b105bafe5a1f4c01224c8ae0b820a478b09447f.tar.bz2 pdf-as-4-7b105bafe5a1f4c01224c8ae0b820a478b09447f.zip |
added basic Preprocessor infrastructure, moved logging to logback
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/preprocessor/PreProcessor.java | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/preprocessor/PreProcessor.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/preprocessor/PreProcessor.java index a70d31d7..1621843a 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/preprocessor/PreProcessor.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/preprocessor/PreProcessor.java @@ -1,6 +1,7 @@ package at.gv.egiz.pdfas.lib.api.preprocessor; import at.gv.egiz.pdfas.common.exceptions.PDFASError; +import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.api.sign.SignParameter; import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter; @@ -10,7 +11,15 @@ import at.gv.egiz.pdfas.lib.api.verify.VerifyParameter; public interface PreProcessor { /** - * Sign. + * Initialize this instance. This Method is called once when the + * PreProcessor is constructed! + * + * @param configuration the configuration + */ + public void initialize(Configuration configuration); + + /** + * Sign. This Method is called once for each sign call. * * @param parameter the parameter * @throws PDFASError the PDFAS error @@ -18,7 +27,7 @@ public interface PreProcessor { public void sign(SignParameter parameter) throws PDFASError; /** - * Verify. + * Verify. This Method is called once for each verify call. * * @param parameter the parameter * @throws PDFASError the PDFAS error @@ -27,9 +36,20 @@ public interface PreProcessor { /** - * Registration position. - * + * The Position in which the PreProcessor should be registered. + * Lowest positions will be executed first. + * + * Negative values mean that PDF-AS chooses where to register the PreProcessor + * This should be used if the PreProcessor has no dependencies. + * * @return the int */ public int registrationPosition(); + + /** + * Gets the name. + * + * @return the name + */ + public String getName(); } |