aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/pdfas/impl/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/pdfas/impl/api')
-rw-r--r--src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
index 4ee4e70..3433565 100644
--- a/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
+++ b/src/main/java/at/gv/egiz/pdfas/impl/api/PdfAsObject.java
@@ -678,25 +678,37 @@ public class PdfAsObject implements PdfAs
if (profile == null)
profile = defaultProfile;
String key = SignatureTypes.SIG_OBJ + profile + "." + ENABLE_PLACEHOLDER_SEARCH_KEY;
- String enableSearchString = settings.getValueFromKey(key);
+ String configFileActivedString = settings.getValueFromKey(key);
- if (enableSearchString == null){
+ if (configFileActivedString == null){
// check global enable_placeholder_search
- enableSearchString = settings.getValueFromKey(ENABLE_PLACEHOLDER_SEARCH_KEY);
+ configFileActivedString = settings.getValueFromKey(ENABLE_PLACEHOLDER_SEARCH_KEY);
}
- boolean enableSearch = true;
- if (enableSearchString != null && enableSearchString.trim().equalsIgnoreCase("false"))
- enableSearch = false;
+ Boolean configFileActived = null;
+ if (configFileActivedString != null)
+ configFileActived = Boolean.valueOf(configFileActivedString);
+
+ Boolean signParamsActivated = signParameters.isCheckForPlaceholder();
+
+ boolean enableSearch;
+ if (signParamsActivated != null)
+ {
+ enableSearch = signParamsActivated.booleanValue();
+ } else {
+ if (configFileActived != null)
+ enableSearch = configFileActived.booleanValue();
+ else
+ enableSearch = false;
+ }
+
if (enableSearch)
{
- if (signParameters.isCheckForPlaceholder()) {
- spd = SignaturePlaceholderExtractor.extract(
- signParameters.getDocument().createInputStream(),
- signParameters.getPlaceholderId(),
- signParameters.getPlaceholderMatchMode());
- }
+ spd = SignaturePlaceholderExtractor.extract(
+ signParameters.getDocument().createInputStream(),
+ signParameters.getPlaceholderId(),
+ signParameters.getPlaceholderMatchMode());
}
return spd;
}