diff options
author | emusic <emina.music@egiz.gv.at> | 2018-03-21 17:56:48 +0100 |
---|---|---|
committer | emusic <emina.music@egiz.gv.at> | 2018-03-21 17:56:48 +0100 |
commit | 08911a1b4f7bc825841f99053cf98af795e506f2 (patch) | |
tree | 423df348b6b257ae433c08009e0762b82b0c9a0f /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl | |
parent | ad3722eeda59cb2bcffa205f6ad8fbb37cf55504 (diff) | |
download | pdf-as-4-08911a1b4f7bc825841f99053cf98af795e506f2.tar.gz pdf-as-4-08911a1b4f7bc825841f99053cf98af795e506f2.tar.bz2 pdf-as-4-08911a1b4f7bc825841f99053cf98af795e506f2.zip |
enabled placeholder serach for pdf-as web
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl')
3 files changed, 27 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 b20215fc..69d83239 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 @@ -47,8 +47,7 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration } return false; } - - + /** * Match selected Profile for Placeholder * Enables to activate placeholder search/match for different profiles diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderWebConfiguration.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderWebConfiguration.java new file mode 100644 index 00000000..8c63ed02 --- /dev/null +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderWebConfiguration.java @@ -0,0 +1,18 @@ +package at.gv.egiz.pdfas.lib.impl.configuration; + +import java.util.Properties; + +public class PlaceholderWebConfiguration { + + protected static Properties properties = new Properties(); + + public static void setValue(String key, String value) + { + properties.setProperty(key,value); + } + public static String getValue(String key) + { + return properties.getProperty(key); + } + +} 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 4b1a5a49..455077a8 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 @@ -30,6 +30,7 @@ import at.gv.egiz.pdfas.common.exceptions.PdfAsErrorCarrier; import at.gv.egiz.pdfas.common.exceptions.PdfAsException; import at.gv.egiz.pdfas.common.settings.ISettings; import at.gv.egiz.pdfas.lib.api.IConfigurationConstants; +import at.gv.egiz.pdfas.lib.impl.configuration.PlaceholderWebConfiguration; import at.gv.egiz.pdfas.lib.impl.status.OperationStatus; public class PlaceholderFilter implements IConfigurationConstants, @@ -42,9 +43,14 @@ public class PlaceholderFilter implements IConfigurationConstants, if (status.getPlaceholderConfiguration().isGlobalPlaceholderEnabled()) { PlaceholderExtractor extractor = status.getBackend() .getPlaceholderExtractor(); - String placeholderID = settings.getValue(PLACEHOLDER_ID); - String placeholderModeString = settings.getValue(PLACEHOLDER_MODE); + String placeholderID = PlaceholderWebConfiguration.getValue(PLACEHOLDER_WEB_ID); + if(placeholderID == null) + { + placeholderID = settings.getValue(PLACEHOLDER_ID); + } + + String placeholderModeString = settings.getValue(PLACEHOLDER_MODE); int placeholderMode = PLACEHOLDER_MATCH_MODE_MODERATE; if (placeholderModeString != null) { try { |