diff options
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/api/sign')
-rw-r--r-- | src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java index 0bf1000..a53a140 100644 --- a/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java +++ b/src/main/java/at/gv/egiz/pdfas/api/sign/SignParameters.java @@ -20,25 +20,6 @@ import at.knowcenter.wag.egov.egiz.sig.SignatureTypes; public class SignParameters
{
// 23.11.2010 changed by exthex - added parameters for placeholder handling
- /**
- * Strict matching mode for placeholder extraction.<br/>
- * If the placeholder with the given id is not found in the document, an exception will be thrown.
- */
- public static final int PLACEHOLDER_MATCH_MODE_STRICT = 0;
-
- /**
- * A moderate matching mode for placeholder extraction.<br/>
- * If the placeholder with the given id is not found in the document, the first placeholder without an id will be taken.<br/>
- * If there is no such placeholder, the signature will be placed as usual, according to the pos parameter of the signature profile used.
- */
- public static final int PLACEHOLDER_MATCH_MODE_MODERATE = 1;
-
- /**
- * A more lenient matching mode for placeholder extraction.<br/>
- * If the placeholder with the given id is not found in the document, the first found placeholder will be taken, regardless if it has an id set, or not.<br/>
- * If there is no placeholder at all, the signature will be placed as usual, according to the pos parameter of the signature profile used.
- */
- public static final int PLACEHOLDER_MATCH_MODE_LENIENT = 2;
/**
* The document to be signed.
@@ -138,9 +119,9 @@ public class SignParameters * The matching mode for placeholder extraction.<br/>
* If a {@link SignParameters#placeholderId} is set, the match mode determines what is to be done, if no matching placeholder is found in the document.
* <br/>
- * Defaults to {@link SignParameters#PLACEHOLDER_MATCH_MODE_MODERATE}.
+ * Defaults to {@link Constants#PLACEHOLDER_MATCH_MODE_MODERATE}.
*/
- protected int placeholderMatchMode = PLACEHOLDER_MATCH_MODE_MODERATE;
+ protected int placeholderMatchMode = Constants.PLACEHOLDER_MATCH_MODE_MODERATE;
protected Properties overrideProps = new Properties();
@@ -323,6 +304,7 @@ public class SignParameters }
/**
+ * Get the value of the checkForPlaceholder flag.
*
* @return
*/
@@ -331,6 +313,9 @@ public class SignParameters }
/**
+ * 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
*/
@@ -339,6 +324,8 @@ public class SignParameters }
/**
+ * Set an explicit placeholder id.
+ * Only placeholder images that have a matching ID property embedded will be considered for replacement.
*
* @param placeholderId
*/
@@ -347,6 +334,7 @@ public class SignParameters }
/**
+ * The id of the placeholder to replace.
*
* @return the placeholderId
*/
@@ -355,6 +343,16 @@ public class SignParameters }
/**
+ * Set the behavior if no exactly matching placeholder could be found.<br/>
+ * Exactly matching meaning:<br/>
+ * <ul><li>If a placeholderId is set: a placeholder which has exactly this id embedded</li>
+ * <li>If no placeholderId is set: a placeholder without an embedded id is found</li></ul>
+ *
+ * @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
*/
@@ -363,7 +361,9 @@ public class SignParameters }
/**
+ * Get the placeholder matching mode.
*
+ * @see SignParameters#getPlaceholderMatchMode()
* @return the placeholderMatchMode
*/
public int getPlaceholderMatchMode() {
|