aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
diff options
context:
space:
mode:
authoremusic <emina.music@egiz.gv.at>2019-11-14 14:33:16 +0100
committeremusic <emina.music@egiz.gv.at>2019-11-14 14:33:16 +0100
commitac49b41cbc52e3e8df771825ff22f72a8fb81138 (patch)
treef4d17febf29bc2605c45fa53329de09652b50132 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
parentcd19c5592a1d294debbf10ffea4b82993e5197ff (diff)
downloadpdf-as-4-ac49b41cbc52e3e8df771825ff22f72a8fb81138.tar.gz
pdf-as-4-ac49b41cbc52e3e8df771825ff22f72a8fb81138.tar.bz2
pdf-as-4-ac49b41cbc52e3e8df771825ff22f72a8fb81138.zip
Enable placeholder search on a profile level
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
index f511525d..51cd3ff2 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java
@@ -74,13 +74,17 @@ public class PlaceholderFilter implements IConfigurationConstants,
//filter for local placeholder in selected profiles
PlaceholderExtractor extractor = status.getBackend()
.getPlaceholderExtractor();
- String placeholderID = settings.getValue(PLACEHOLDER_ID);
- String placeholderModeString = settings.getValue(PLACEHOLDER_MODE);
- int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED;
+ int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED;
+
+ String placeholderID =status.getPlaceholderConfiguration().getProfilePlaceholderID(status.getRequestedSignature().getSignatureProfileID());
+ if(placeholderID != null)
+ {
+ placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE;
+ }
+ String placeholderModeString = settings.getValue(PLACEHOLDER_MODE);
if (placeholderModeString != null) {
try {
placeholderMode = Integer.parseInt(placeholderModeString);
-
if (placeholderMode < PLACEHOLDER_MODE_MIN
|| placeholderMode > PLACEHOLDER_MODE_MAX) {
throw new PdfAsErrorCarrier(new PDFASError(