summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src
diff options
context:
space:
mode:
authorTobias Kellner <imcybot@gmail.com>2015-10-12 04:23:04 +0200
committerTobias Kellner <imcybot@gmail.com>2015-10-12 04:23:04 +0200
commit7acdb4cb960e875bba892d9581d58a3aed9e0846 (patch)
treecdfdae523475af282c5f8eee7d972046c54de450 /pdf-over-gui/src
parentcc152140b86400670d46cba8fe798b30205f6d41 (diff)
downloadmocca-7acdb4cb960e875bba892d9581d58a3aed9e0846.tar.gz
mocca-7acdb4cb960e875bba892d9581d58a3aed9e0846.tar.bz2
mocca-7acdb4cb960e875bba892d9581d58a3aed9e0846.zip
add keystore alias
Diffstat (limited to 'pdf-over-gui/src')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/KeystoreConfigurationComposite.java3
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProvider.java6
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java51
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java11
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainerImpl.java19
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java6
8 files changed, 108 insertions, 0 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/KeystoreConfigurationComposite.java
index 9113d3bb..aa42a7bb 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/KeystoreConfigurationComposite.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/KeystoreConfigurationComposite.java
@@ -180,6 +180,8 @@ public class KeystoreConfigurationComposite extends BaseConfigurationComposite {
provider.getKeyStoreFilePersistent());
this.configurationContainer.setKeyStoreType(
provider.getKeyStoreTypePersistent());
+ this.configurationContainer.setKeyStoreAlias(
+ provider.getKeyStoreAliasPersistent());
this.configurationContainer.setKeyStoreStorePass(
provider.getKeyStoreStorePassPersistent());
this.configurationContainer.setKeyStoreKeyPass(
@@ -204,6 +206,7 @@ public class KeystoreConfigurationComposite extends BaseConfigurationComposite {
PersistentConfigProvider provider) {
store.setKeyStoreFile(this.configurationContainer.getKeyStoreFile());
store.setKeyStoreType(this.configurationContainer.getKeyStoreType());
+ store.setKeyStoreAlias(this.configurationContainer.getKeyStoreAlias());
store.setKeyStoreStorePass(this.configurationContainer.getKeyStoreStorePass());
store.setKeyStoreKeyPass(this.configurationContainer.getKeyStoreKeyPass());
}
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
index 701d0faf..f28358b8 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigManipulator.java
@@ -136,6 +136,12 @@ public interface ConfigManipulator {
public void setKeyStoreType(String type);
/**
+ * Sets the keystore alias
+ * @param alias the keystore alias
+ */
+ public void setKeyStoreAlias(String alias);
+
+ /**
* Sets the keystore store password
* @param storePass the keystore store password
*/
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
index 4eca4e4f..44c4a9c9 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigOverlayManipulator.java
@@ -109,6 +109,12 @@ public interface ConfigOverlayManipulator {
public void setKeyStoreTypeOverlay(String type);
/**
+ * Sets the keystore alias
+ * @param alias the keystore alias
+ */
+ public void setKeyStoreAliasOverlay(String alias);
+
+ /**
* Sets the keystore store password
* @param storePass the keystore store password
*/
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 30063efa..d00860e5 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
@@ -181,6 +181,12 @@ public interface ConfigProvider {
public String getKeyStoreType();
/**
+ * Gets the keystore alias
+ * @return the keystore alias
+ */
+ public String getKeyStoreAlias();
+
+ /**
* Gets the keystore store password
* @return the keystore store password
*/
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 edc6e167..ad9c4580 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
@@ -282,6 +282,8 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
setKeyStoreFile(keystoreFile);
String keystoreType = config.getProperty(Constants.CFG_KEYSTORE_TYPE);
setKeyStoreType(keystoreType);
+ String keystoreAlias = config.getProperty(Constants.CFG_KEYSTORE_ALIAS);
+ setKeyStoreAlias(keystoreAlias);
String keystoreStorePass = config.getProperty(Constants.CFG_KEYSTORE_STOREPASS);
setKeyStoreStorePass(keystoreStorePass);
String keystoreKeyPass = config.getProperty(Constants.CFG_KEYSTORE_KEYPASS);
@@ -380,6 +382,9 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
String keystoreType = getKeyStoreTypePersistent();
if (keystoreType != STRING_EMPTY)
props.setProperty(Constants.CFG_KEYSTORE_TYPE, keystoreType);
+ String keystoreAlias = getKeyStoreAliasPersistent();
+ if (keystoreAlias != STRING_EMPTY)
+ props.setProperty(Constants.CFG_KEYSTORE_ALIAS, keystoreAlias);
String keystoreStorePass = getKeyStoreStorePassPersistent();
if (keystoreStorePass != STRING_EMPTY)
props.setProperty(Constants.CFG_KEYSTORE_STOREPASS, keystoreStorePass);
@@ -1227,6 +1232,52 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator,
}
/* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigManipulator#setKeyStoreAlias(java.lang.String)
+ */
+ @Override
+ public void setKeyStoreAlias(String alias) {
+ if (alias == null || alias.trim().isEmpty()) {
+ this.configuration.setKeyStoreAlias(STRING_EMPTY);
+ } else {
+ this.configuration.setKeyStoreAlias(alias);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigOverlayManipulator#setKeyStoreAliasOverlay(java.lang.String)
+ */
+ @Override
+ public void setKeyStoreAliasOverlay(String alias) {
+ if (alias == null || alias.trim().isEmpty()) {
+ this.configurationOverlay.setKeyStoreAlias(STRING_EMPTY);
+ } else {
+ this.configurationOverlay.setKeyStoreAlias(alias);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigProvider#getKeyStoreAlias()
+ */
+ @Override
+ public String getKeyStoreAlias() {
+ String alias = this.configurationOverlay.getKeyStoreAlias();
+ if (alias == null)
+ alias = getKeyStoreAliasPersistent();
+ return alias;
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.PersistentConfigProvider#getKeyStoreAliasPersistent()
+ */
+ @Override
+ public String getKeyStoreAliasPersistent() {
+ String alias = this.configuration.getKeyStoreAlias();
+ if (alias == null)
+ alias = STRING_EMPTY;
+ return alias;
+ }
+
+ /* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.config.ConfigManipulator#setKeyStoreStorePass(java.lang.String)
*/
@Override
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 9b312ee6..95429296 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
@@ -292,6 +292,17 @@ public interface ConfigurationContainer {
public void setKeyStoreType(String type);
/**
+ * Gets the keystore alias
+ * @return the keystore alias
+ */
+ public String getKeyStoreAlias();
+
+ /**
+ * Sets the keystore alias
+ * @param alias the keystore alias
+ */
+ public void setKeyStoreAlias(String alias);
+ /**
* Gets the keystore store password
* @return the keystore store password
*/
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 f1817c83..cbc4a90e 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
@@ -118,6 +118,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
/** Keystore type */
protected String keystoreType = null;
+ /** Keystore alias */
+ protected String keystoreAlias = null;
+
/** Keystore store password */
protected String keystoreStorePass = null;
@@ -537,6 +540,22 @@ public class ConfigurationContainerImpl implements ConfigurationContainer {
}
/* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getKeyStoreAlias()
+ */
+ @Override
+ public String getKeyStoreAlias() {
+ return this.keystoreAlias;
+ }
+
+ /* (non-Javadoc)
+ * @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#setKeyStoreAlias(java.lang.String)
+ */
+ @Override
+ public void setKeyStoreAlias(String alias) {
+ this.keystoreAlias = alias;
+ }
+
+ /* (non-Javadoc)
* @see at.asit.pdfover.gui.workflow.config.ConfigurationContainer#getKeyStoreStorePass()
*/
@Override
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
index c3c78c75..cf355f34 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/PersistentConfigProvider.java
@@ -152,6 +152,12 @@ public interface PersistentConfigProvider {
public String getKeyStoreTypePersistent();
/**
+ * Gets the keystore alias
+ * @return the keystore alias
+ */
+ public String getKeyStoreAliasPersistent();
+
+ /**
* Gets the keystore store password
* @return the keystore store password
*/