diff options
author | bschnalzer <bianca.schnalzer@egiz.gv.at> | 2017-08-09 13:56:12 +0200 |
---|---|---|
committer | bschnalzer <bianca.schnalzer@egiz.gv.at> | 2017-08-09 13:56:14 +0200 |
commit | 7fe464cc98d714179b907c142bdd2fabfd009aa3 (patch) | |
tree | 328c53a9b60dfa1106c6b9d930d75ab127dce33f /pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration | |
parent | 17be060a4d2d79ee75036a2f785d4a4913f7935f (diff) | |
download | pdf-as-4-4.1.1-RC.tar.gz pdf-as-4-4.1.1-RC.tar.bz2 pdf-as-4-4.1.1-RC.zip |
Fixed problem with PAdES Signatures, removed some attributes from CAdES signatures which are not required, minor bug fixes, implemented new style (lineCenter)4.1.1-RC
Diffstat (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration')
-rw-r--r-- | pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/impl/configuration/PlaceholderConfiguration.java | 42 |
1 files changed, 39 insertions, 3 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 ec030388..6e91e808 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 @@ -24,7 +24,23 @@ package at.gv.egiz.pdfas.lib.impl.configuration; import at.gv.egiz.pdfas.common.settings.ISettings; +import at.gv.egiz.pdfas.common.settings.Profiles; +import at.gv.egiz.pdfas.common.settings.SignatureProfileSettings; +import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.api.IConfigurationConstants; +import at.gv.egiz.pdfas.lib.api.PdfAs; +import at.gv.egiz.pdfas.lib.impl.PdfAsImpl; +import at.gv.egiz.pdfas.lib.impl.PdfAsParameterImpl; +import at.gv.egiz.pdfas.lib.impl.placeholder.SignaturePlaceholderData; +import at.gv.egiz.pdfas.lib.impl.status.OperationStatus; +import at.gv.egiz.pdfas.lib.settings.Settings; +import at.gv.egiz.pdfas.lib.util.SignatureUtils; +import at.gv.egiz.pdfas.lib.api.PdfAs; +import com.sun.corba.se.spi.orb.Operation; + +import java.security.Signature; +import java.util.Properties; + public class PlaceholderConfiguration extends SpecificBaseConfiguration implements IConfigurationConstants { @@ -34,13 +50,33 @@ public class PlaceholderConfiguration extends SpecificBaseConfiguration } public boolean isGlobalPlaceholderEnabled() { - if(configuration.hasValue(PLACEHOLDER_SEARCH_ENABLED)) { + if (configuration.hasValue(PLACEHOLDER_SEARCH_ENABLED)) { String value = configuration.getValue(PLACEHOLDER_SEARCH_ENABLED); - if(value.equalsIgnoreCase(TRUE)) { + if (value.equalsIgnoreCase(TRUE)) { + return true; + } + } + return false; + } + + + /** + * Match selected Profile for Placeholder + * Enables to activate placeholder search/match for different profiles + * @return + */ + public boolean isProfileConfigurationEnabled(String selectedProfileID) + { + String profileMatch = SIG_OBJECT+SEPERATOR+selectedProfileID+SEPERATOR+PLACEHOLDER_SEARCH_ENABLED; + if (configuration.hasValue(profileMatch)) { + String value = configuration.getValue(profileMatch); + if (value.equalsIgnoreCase(TRUE)) { return true; } } return false; } - } + + + |