From db52e4d66d60184d53a27ba4d6772461daacc03d Mon Sep 17 00:00:00 2001 From: tknall Date: Fri, 22 Mar 2013 08:57:51 +0000 Subject: Maintenance update (bugfixes, new features, cleanup...) Refer to /dok/RELEASE_NOTES-3.3.txt for further information. git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/pdf-as/trunk@931 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../at/gv/egiz/pdfas/api/sign/SignParameters.java | 78 +++++++++++----------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java index 8834481..5533b8b 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java @@ -34,16 +34,16 @@ import at.knowcenter.wag.egov.egiz.sig.SignatureTypes; /** * Parameter object that holds the sign parameters. - * + * * @author wprinz */ public class SignParameters { // 23.11.2010 changed by exthex - added parameters for placeholder handling - + /** * The document to be signed. - * + * *

* The DataSource implementation encapsulates the actual representaion of the * data. E.g. the DataSource may be File based or byte array based. See @@ -54,7 +54,7 @@ public class SignParameters /** * The type of the signature. - * + * *

* May be {@link Constants#SIGNATURE_TYPE_BINARY} or * {@link Constants#SIGNATURE_TYPE_TEXTUAL}. @@ -64,7 +64,7 @@ public class SignParameters /** * The signature device to perform the actual signature. - * + * *

* May be {@link Constants#SIGNATURE_DEVICE_MOA} or * {@link Constants#SIGNATURE_DEVICE_BKU}. @@ -75,18 +75,18 @@ public class SignParameters /** * The signature profile identifier identifying the profile to be used in the * config file. - * + * *

* Note: In near future it will be possible to provide a full specified * profile here instead of the profile id. *

*/ protected String signatureProfileId = null; - + /** * The signature key identifier specifying which signature key should be used * by the signature device to perform the signature. - * + * *

* Providing a null value (default) means that no explicit signature key * identifier is provided. The selected signature device will then use its @@ -122,7 +122,7 @@ public class SignParameters * The output DataSink that will receive the signed document. */ protected DataSink output = null; - + protected TimeStamper timeStamperImpl; /** @@ -142,12 +142,12 @@ public class SignParameters * Defaults to {@link Constants#PLACEHOLDER_MATCH_MODE_MODERATE}. */ protected int placeholderMatchMode = Constants.PLACEHOLDER_MATCH_MODE_MODERATE; - + protected Properties overrideProps = new Properties(); - - + + /** * {@link #setTimeStamperImpl(TimeStamper)} @@ -158,7 +158,7 @@ public class SignParameters } /** - * Set a {@link TimeStamper} to create a timestamp on the signature value. Will be + * Set a {@link TimeStamper} to create a timestamp on the signature value. Will be * called after sign. For binary signatures only. Timestamp will be embedded in egiz dict /TimeStamp. * @param timeStamperImpl */ @@ -285,21 +285,21 @@ public class SignParameters } /** - * Override user defined values from the used signature profile like "value.SIG_META". - * You cannot override pre defined values like SIG_VALUE, SIG_DATE {@link SignatureTypes#REQUIRED_SIG_KEYS}. + * Override user defined values from the used signature profile like "value.SIG_META". + * You cannot override pre defined values like SIG_VALUE, SIG_DATE {@link SignatureTypes#REQUIRED_SIG_KEYS}. * The override values are bound to the {@link SignParameters} instance. *

* Sample usage: *

       SignParameters sp = new SignParameters();
       . . .
-      
-      sp.setSignatureProfileId("SIGNATURBLOCK_DE");  
-      
+
+      sp.setSignatureProfileId("SIGNATURBLOCK_DE");
+
       // expressions do not work on binary signature fields without phlength setting!!
       sp.setProfileOverrideValue("SIG_META", "It's nice to be important, but it is more important to be nice ${subject.L}");;
-      sp.setProfileOverrideValue("SIG_LABEL", "./images/signatur-logo_en.png");                  
-      
+      sp.setProfileOverrideValue("SIG_LABEL", "./images/signatur-logo_en.png");
+
       // execute sign using the overrides
       pdfAs.sign(sp);
   
@@ -311,51 +311,51 @@ public class SignParameters if (SignatureTypes.isRequredSigTypeKey(key)) { throw new RuntimeException("cannot set value for pre defined signature field names"); } - this.overrideProps.put(key, value); + this.overrideProps.put(key, value); } - + /** * Get override values created via {@link #setProfileOverrideValue(String, String)} * @return */ public Properties getProfileOverrideProperties() { return this.overrideProps; - + } /** * Get the value of the checkForPlaceholder flag. - * + * * @return */ public Boolean isCheckForPlaceholder() { return this.checkForPlaceholder; } - + /** - * Set this to true, if you want a search for placeholder images to be performed and + * Set this to true, if you want a search for placeholder images to be performed and * appropriate images to be replaced. * If this is not set, a search will only be performed if the configuration property "enable_placeholder_search" is set to true. - * + * * @param check */ - public void setCheckForPlaceholder(boolean check) { - this.checkForPlaceholder = Boolean.valueOf(check); + public void setCheckForPlaceholder(Boolean searchForPlaceHolder) { + this.checkForPlaceholder = searchForPlaceHolder; } /** - * Set an explicit placeholder id. + * Set an explicit placeholder id. * Only placeholder images that have a matching ID property embedded will be considered for replacement. - * + * * @param placeholderId */ public void setPlaceholderId(String placeholderId) { - this.placeholderId = placeholderId; + this.placeholderId = placeholderId; } - + /** * The id of the placeholder to replace. - * + * * @return the placeholderId */ public String getPlaceholderId() { @@ -367,13 +367,13 @@ public class SignParameters * Exactly matching meaning:
* - * + * * @see Constants#PLACEHOLDER_MATCH_MODE_LENIENT * @see Constants#PLACEHOLDER_MATCH_MODE_MODERATE * @see Constants#PLACEHOLDER_MATCH_MODE_STRICT - * + * * Defaults to {@link Constants#PLACEHOLDER_MATCH_MODE_MODERATE}. - * + * * @param placeholderMatchMode */ public void setPlaceholderMatchMode(int placeholderMatchMode) { @@ -382,12 +382,12 @@ public class SignParameters /** * Get the placeholder matching mode. - * + * * @see SignParameters#getPlaceholderMatchMode() * @return the placeholderMatchMode */ public int getPlaceholderMatchMode() { return this.placeholderMatchMode; } - + } -- cgit v1.2.3