diff options
author | emusic <emina.music@egiz.gv.at> | 2019-06-19 13:26:59 +0200 |
---|---|---|
committer | emusic <emina.music@egiz.gv.at> | 2019-06-19 13:26:59 +0200 |
commit | 266af04f55476f568377b413f02257a43fae791b (patch) | |
tree | b9ac0fe54974895d1af4c5d2e815666231c58e2b /pdf-as-lib/src/main | |
parent | 516334bd777b1e3dcc2f060f12dd7a78be79b0bf (diff) | |
download | pdf-as-4-266af04f55476f568377b413f02257a43fae791b.tar.gz pdf-as-4-266af04f55476f568377b413f02257a43fae791b.tar.bz2 pdf-as-4-266af04f55476f568377b413f02257a43fae791b.zip |
pdf-as documentation changes, qr placeholder search on profile level enabled
Diffstat (limited to 'pdf-as-lib/src/main')
3 files changed, 10 insertions, 11 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 b0b45464..7a67160a 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 @@ -28,6 +28,8 @@ import at.gv.egiz.pdfas.lib.api.IConfigurationConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Map; + public class PlaceholderConfiguration extends SpecificBaseConfiguration implements IConfigurationConstants { @@ -57,8 +59,9 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration { logger.info("SelectedProfileID in ProfileConfEnabled: "+selectedProfileID); String profileMatch = SIG_OBJECT+SEPERATOR+selectedProfileID+SEPERATOR+PLACEHOLDER_SEARCH_ENABLED; - if (configuration.hasValue(profileMatch)) { - String value = configuration.getValue(profileMatch); + if (configuration.getValuesPrefix(profileMatch)!=null) { + Map<String, String> map = configuration.getValuesPrefix(profileMatch); + String value = map.get(profileMatch); if (value.equalsIgnoreCase(TRUE)) { logger.info("Configuration has Value: "+value); return true; @@ -68,5 +71,3 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration } } - - 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 455077a8..f511525d 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 @@ -70,14 +70,13 @@ public class PlaceholderFilter implements IConfigurationConstants, .extract(status.getPdfObject(), placeholderID, placeholderMode); return signaturePlaceholderData; - } else + } else if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) { //filter for local placeholder in selected profiles - if (status.getPlaceholderConfiguration().isProfileConfigurationEnabled(status.getRequestedSignature().getSignatureProfileID())) { - PlaceholderExtractor extractor = status.getBackend() + PlaceholderExtractor extractor = status.getBackend() .getPlaceholderExtractor(); String placeholderID = settings.getValue(PLACEHOLDER_ID); String placeholderModeString = settings.getValue(PLACEHOLDER_MODE); - int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE; + int placeholderMode = PLACEHOLDER_MATCH_MODE_SORTED; if (placeholderModeString != null) { try { placeholderMode = Integer.parseInt(placeholderModeString); @@ -96,9 +95,6 @@ public class PlaceholderFilter implements IConfigurationConstants, .extract(status.getPdfObject(), placeholderID, placeholderMode); return signaturePlaceholderData; - - - } return null; }}
\ No newline at end of file diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java index b851af88..01a3a298 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/stamping/TableFactory.java @@ -115,10 +115,12 @@ public class TableFactory implements IProfileConstants { // ".value."; // ArrayList table_def_keys = settings_.getKeys(table_key); Vector<String> table_defs = configuration.getFirstLevelKeys(table_key); + if (table_defs == null) { return null; } + Table sig_table = new Table(tableID); //SignatureProfileSettings profile = createProfile(profileID); boolean found_style = false; |