diff options
author | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-17 11:08:51 +0100 |
---|---|---|
committer | Andreas Fitzek <andreas.fitzek@iaik.tugraz.at> | 2013-12-17 11:08:51 +0100 |
commit | c1af1550afe468537f480b399896d477f950c7d1 (patch) | |
tree | 0aa858e6fe13b7a779d583ae4038f39ade80f2c5 /pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java | |
parent | e5316db083e46c8ae9e4b07bff57812d9314200b (diff) | |
download | pdf-as-4-c1af1550afe468537f480b399896d477f950c7d1.tar.gz pdf-as-4-c1af1550afe468537f480b399896d477f950c7d1.tar.bz2 pdf-as-4-c1af1550afe468537f480b399896d477f950c7d1.zip |
Added default value for Signature Profile Entries
Diffstat (limited to 'pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java')
-rw-r--r-- | pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java index 5c443039..456e58b2 100644 --- a/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java +++ b/pdf-as-common/src/main/java/at/gv/egiz/pdfas/common/settings/SignatureProfileSettings.java @@ -46,6 +46,15 @@ public class SignatureProfileSettings implements IProfileConstants { String valueValue = values.get(valuesPrefix + KEY_SEPARATOR + key); + // Lookup default values + if(valueKey == null) { + valueKey = DefaultSignatureProfileSettings.getDefaultKeyCaption(key); + } + + if(valueValue == null) { + valueValue = DefaultSignatureProfileSettings.getDefaultKeyValue(key); + } + SignatureProfileEntry entry = new SignatureProfileEntry(); entry.setKey(key); entry.setCaption(valueKey); @@ -66,6 +75,11 @@ public class SignatureProfileSettings implements IProfileConstants { String valueValue = values.get(valuesPrefix + KEY_SEPARATOR + key); + // Lookup default values + if(valueValue == null) { + valueValue = DefaultSignatureProfileSettings.getDefaultKeyValue(key); + } + SignatureProfileEntry entry = profileInformations.get(key); if (entry == null) { entry = new SignatureProfileEntry(); @@ -100,6 +114,16 @@ public class SignatureProfileSettings implements IProfileConstants { logger.debug(" Settings: " + key + " : " + value); } + + + Iterator<SignatureProfileEntry> dumpIterator = + profileInformations.values().iterator(); + + logger.debug("Settings for profile {}", profileID); + while(dumpIterator.hasNext()) { + SignatureProfileEntry entry = dumpIterator.next(); + logger.debug(" " + entry.toString()); + } } public String getCaption(String key) { |