diff options
author | Thomas <> | 2023-06-27 08:41:01 +0200 |
---|---|---|
committer | Thomas <> | 2023-06-27 08:41:01 +0200 |
commit | 6e0bff37a90eaee1ae7f0eef0972dc735e4076f4 (patch) | |
tree | 00a7a39c3268ce1353214a06a5c2840594dd00d9 /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl | |
parent | 1e580545ff0dd4c15ce05045ab1a9573dec6f9d3 (diff) | |
download | pdf-as-4-6e0bff37a90eaee1ae7f0eef0972dc735e4076f4.tar.gz pdf-as-4-6e0bff37a90eaee1ae7f0eef0972dc735e4076f4.tar.bz2 pdf-as-4-6e0bff37a90eaee1ae7f0eef0972dc735e4076f4.zip |
chore(core): add missing interface implementations
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java index fd47bac5..79854641 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/ConfigurationImpl.java @@ -28,6 +28,8 @@ import java.util.Map; import java.util.Properties; import java.util.Vector; +import org.apache.commons.lang3.StringUtils; + import at.gv.egiz.pdfas.common.settings.ISettings; import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.settings.Settings; @@ -57,6 +59,28 @@ public class ConfigurationImpl implements ISettings, Configuration { } @Override + public boolean isValue(String key) { + return isValue(key, false); + } + + @Override + public boolean isValue(String key, boolean defaultValue) { + if (overwrittenProperties.containsKey(key)) { + String value = overwrittenProperties.getProperty(key); + if (StringUtils.isNotEmpty(value)) { + return Boolean.valueOf(value); + + } else { + return defaultValue; + + } + } else { + return this.settings.isValue(key); + + } + } + + @Override public boolean hasValue(String key) { if (overwrittenProperties.containsKey(key)) { return true; |