aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java/at
diff options
context:
space:
mode:
Diffstat (limited to 'pdf-as-lib/src/main/java/at')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java11
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/placeholder/PlaceholderFilter.java12
2 files changed, 19 insertions, 4 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
index 7a67160a..326ed142 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java
@@ -69,5 +69,16 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration
}
return false;
}
+
+ public String getProfilePlaceholderID(String selectedProfileID)
+ {
+ logger.info("SelectedProfileID in ProfileConfEnabled: "+selectedProfileID);
+ String profileMatch = SIG_OBJECT+SEPERATOR+selectedProfileID+SEPERATOR+PLACEHOLDER_ID;
+ if (configuration.getValuesPrefix(profileMatch)!=null) {
+ Map<String, String> map = configuration.getValuesPrefix(profileMatch);
+ return map.get(profileMatch);
+ }
+ return null;
+ }
}
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(