From 96ea325cbce319f64ad548908e395825bbdca83f Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Mon, 23 Feb 2015 15:31:03 +0100 Subject: Make BASE64 usage configurable for a-trust mobile bku --- .../pdfover/gui/workflow/config/ConfigProvider.java | 6 ++++++ .../gui/workflow/config/ConfigProviderImpl.java | 13 +++++++++++++ .../gui/workflow/config/ConfigurationContainer.java | 12 ++++++++++++ .../workflow/config/ConfigurationContainerImpl.java | 21 +++++++++++++++++++++ 4 files changed, 52 insertions(+) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java index d4489e27..ac67fb9b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java @@ -132,6 +132,12 @@ public interface ConfigProvider { */ public MobileBKUs getMobileBKUType(); + /** + * Gets the mobile BKU BASE64 setting + * @return the mobile BKU BASE64 setting + */ + public boolean getMobileBKUBase64(); + /** * Get the signature note text to use * @return the signature note text diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java index 5ec55555..2bf59a02 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java @@ -151,6 +151,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, } } + String useBase64 = config.getProperty(Constants.CFG_MOBILE_BKU_BASE64); + if (useBase64 != null) + this.configuration.setMobileBKUBase64(useBase64.equalsIgnoreCase(Constants.TRUE)); + // Set Proxy Port String proxyPortString = config .getProperty(Constants.CFG_PROXY_PORT); @@ -950,6 +954,15 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, return this.configuration.getMobileBKUType(); } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.config.ConfigProvider#getMobileBKUBase64() + */ + @Override + public boolean getMobileBKUBase64() { + return this.configuration.getMobileBKUBase64(); + } + /* * (non-Javadoc) * diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java index 6d5e888e..6215fb87 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java @@ -231,6 +231,18 @@ public interface ConfigurationContainer { */ public void setMobileBKUType(MobileBKUs bkuType); + /** + * Gets the mobile BKU BASE64 setting + * @return the mobile BKU BASE64 setting + */ + public boolean getMobileBKUBase64(); + + /** + * Sets the mobile BKU BASE64 setting + * @param useBase64 the mobile BKU BASE64 setting + */ + public void setMobileBKUBase64(boolean useBase64); + /** * Gets the default signature position * @return the default signature position diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java index 726e5b4b..c7ec2c34 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java @@ -100,6 +100,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { /** Holds the mobile BKU type */ protected MobileBKUs mobileBKUType = Constants.DEFAULT_MOBILE_BKU_TYPE; + /** Holds the mobile BKU BASE64 setting */ + protected boolean mobileBKUBase64 = false; + /** Holds the main window size */ protected Point mainWindowSize = null; @@ -434,6 +437,24 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { } + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getMobileBKUBase64() + */ + @Override + public boolean getMobileBKUBase64() { + return this.mobileBKUBase64; + } + + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getMobileBKUBase64(boolean) + */ + @Override + public void setMobileBKUBase64(boolean useBase64) { + this.mobileBKUBase64 = useBase64; + } + + /* (non-Javadoc) * @see at.asit.pdfover.gui.workflow.ConfigurationContainer#getSignaturePosition() */ -- cgit v1.2.3