From ca9df017294578c78d31784d9404ff948af2594a Mon Sep 17 00:00:00 2001 From: pdanner Date: Mon, 29 Nov 2010 14:17:45 +0000 Subject: added DynamicSignatureProfile support git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@616 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/gv/egiz/pdfas/api/PdfAs.java | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'src') diff --git a/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java index a58fa7c..a488bcd 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java +++ b/src/main/java/at/gv/egiz/pdfas/api/PdfAs.java @@ -7,6 +7,8 @@ import java.util.List; import at.gv.egiz.pdfas.api.analyze.AnalyzeParameters; import at.gv.egiz.pdfas.api.analyze.AnalyzeResult; +import at.gv.egiz.pdfas.api.commons.DynamicSignatureLifetimeEnum; +import at.gv.egiz.pdfas.api.commons.DynamicSignatureProfile; import at.gv.egiz.pdfas.api.commons.SignatureProfile; import at.gv.egiz.pdfas.api.exceptions.PdfAsException; import at.gv.egiz.pdfas.api.sign.SignParameters; @@ -160,4 +162,52 @@ public interface PdfAs * @see SignatureProfile */ public List getProfileInformation() throws PdfAsException; + + /** + * Create a signature profile dynamically. You have do apply() it for usage. See {@link SignatureProfile}. + * @param parentProfile a parent profile id to inherit all properties + * @param mode lifetime mode + * @return the created signature profile to work with. + */ + public DynamicSignatureProfile createDynamicSignatureProfile(String parentProfile, DynamicSignatureLifetimeEnum mode); + + /** + * Create a signature profile dynamically. You have to provide a unique name and have do apply() it for usage. See {@link SignatureProfile}. + * It is recommended to use {@link #createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)} that generates + * a unique name on its own. + * @param parentProfile a parent profile id to inherit all properties + * @param myUniqueName a unique name for the profile + * @param mode lifetime mode + * @return the created signature profile to work with. + */ + public DynamicSignatureProfile createDynamicSignatureProfile(String myUniqueName, String parentProfile, DynamicSignatureLifetimeEnum mode); + + /** + * Create a signature profile dynamically. You have fill it with properties and apply() it for usage. See {@link SignatureProfile}. + *
+ * It is recommended to use {@link #createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)} that inherits from an + * existing profile saving you a lot of work. + * @param mode lifetime mode + * @return the created signature profile to work with. + */ + public DynamicSignatureProfile createEmptyDynamicSignatureProfile(DynamicSignatureLifetimeEnum mode); + + /** + * Create a signature profile dynamically. You have fill it with properties and apply() it for usage. See {@link SignatureProfile}. + *
+ * It is recommended to use {@link #createDynamicSignatureProfile(String, DynamicSignatureLifetimeEnum)} that inherits from an + * existing profile saving you a lot of work. + * @param myUniqueName a unique name for the profile + * @param mode lifetime mode + * @return the created signature profile to work with. + */ + public DynamicSignatureProfile createEmptyDynamicSignatureProfile(String myUniqueName, DynamicSignatureLifetimeEnum mode); + + /** + * Loads an existing dynamic signature profile by its name. Profiles are saved when they are applied + * and it has {@link DynamicSignatureLifetimeEnum#MANUAL} + * @param profileName + * @return the signature profile or null if not found. + */ + public DynamicSignatureProfile loadDynamicSignatureProfile(String profileName); } -- cgit v1.2.3