diff options
author | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-07-07 15:08:09 +0200 |
---|---|---|
committer | Jakob Heher <jakob.heher@iaik.tugraz.at> | 2022-07-07 15:08:09 +0200 |
commit | 0f63732ed31a3b5189e46f8b49c32a79ef2b6534 (patch) | |
tree | f35bd302d9e636c68b950af04e781d08ef43a190 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration | |
parent | a3b2cc83a97e6572b942a80d848ea642a2ff6043 (diff) | |
download | pdf-over-0f63732ed31a3b5189e46f8b49c32a79ef2b6534.tar.gz pdf-over-0f63732ed31a3b5189e46f8b49c32a79ef2b6534.tar.bz2 pdf-over-0f63732ed31a3b5189e46f8b49c32a79ef2b6534.zip |
config cleanup
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration')
5 files changed, 29 insertions, 29 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java index 7eac256a..fe3442a0 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AboutComposite.java @@ -21,7 +21,7 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.commons.Constants; import at.asit.pdfover.commons.Messages; import at.asit.pdfover.gui.composites.StateComposite; -import at.asit.pdfover.gui.workflow.config.ConfigProviderImpl; +import at.asit.pdfover.gui.workflow.config.ConfigurationManager; public class AboutComposite extends ConfigurationCompositeBase { static final Logger log = LoggerFactory.getLogger(AboutComposite.class); @@ -137,13 +137,13 @@ public class AboutComposite extends ConfigurationCompositeBase { protected void signerChanged() {} @Override - public void initConfiguration(ConfigProviderImpl provider) {} + public void initConfiguration(ConfigurationManager provider) {} @Override public void loadConfiguration() {} @Override - public void storeConfiguration(ConfigProviderImpl store) {} + public void storeConfiguration(ConfigurationManager store) {} @Override public void validateSettings(int resumeFrom) throws Exception {} diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java index baba386a..be872c1e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/AdvancedConfigurationComposite.java @@ -53,8 +53,8 @@ import at.asit.pdfover.gui.controls.ErrorMarker; import at.asit.pdfover.gui.exceptions.InvalidPortException; import at.asit.pdfover.gui.exceptions.OutputfolderDoesntExistException; import at.asit.pdfover.gui.exceptions.OutputfolderNotADirectoryException; -import at.asit.pdfover.gui.workflow.config.ConfigProviderImpl; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; +import at.asit.pdfover.gui.workflow.config.ConfigurationManager; +import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.BKUs; import at.asit.pdfover.signator.SignaturePosition; @@ -120,7 +120,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { * @param container * @param config */ - public AdvancedConfigurationComposite(Composite parent, int style, State state, ConfigurationContainer container, + public AdvancedConfigurationComposite(Composite parent, int style, State state, ConfigurationDataInMemory container, ConfigurationComposite config) { super(parent, style, state, container); this.configurationComposite = config; @@ -647,7 +647,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void initConfiguration(ConfigProviderImpl provider) { + public void initConfiguration(ConfigurationManager provider) { this.configurationContainer.defaultSignaturePosition = provider.getDefaultSignaturePositionPersistent(); this.configurationContainer.setUseMarker(provider.getUseMarker()); this.configurationContainer.setUseSignatureFields(provider.getUseSignatureFields()); @@ -739,7 +739,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void storeConfiguration(ConfigProviderImpl store) { + public void storeConfiguration(ConfigurationManager store) { store.setDefaultSignaturePosition(this.configurationContainer.defaultSignaturePosition); store.setUseMarker(this.configurationContainer.getUseMarker()); store.setUseSignatureFields(this.configurationContainer.getUseSignatureFields()); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java index d3e458db..16dcd366 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/ConfigurationCompositeBase.java @@ -20,8 +20,8 @@ import org.eclipse.swt.widgets.Composite; import at.asit.pdfover.gui.composites.StateComposite; import at.asit.pdfover.gui.workflow.PDFSigner; -import at.asit.pdfover.gui.workflow.config.ConfigProviderImpl; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; +import at.asit.pdfover.gui.workflow.config.ConfigurationManager; +import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory; import at.asit.pdfover.gui.workflow.states.State; /** @@ -32,7 +32,7 @@ public abstract class ConfigurationCompositeBase extends StateComposite { /** * the configuration container */ - protected ConfigurationContainer configurationContainer; + protected ConfigurationDataInMemory configurationContainer; /** * The PDF Signer used to produce signature block preview @@ -65,7 +65,7 @@ public abstract class ConfigurationCompositeBase extends StateComposite { * @param state * @param configuration */ - public ConfigurationCompositeBase(Composite parent, int style, State state, ConfigurationContainer configuration) { + public ConfigurationCompositeBase(Composite parent, int style, State state, ConfigurationDataInMemory configuration) { super(parent, style, state); this.configurationContainer = configuration; } @@ -74,7 +74,7 @@ public abstract class ConfigurationCompositeBase extends StateComposite { * Initialize ConfigurationContainer from ConfigProviderImpl * @param provider the ConfigProviderImpl to load config from */ - public abstract void initConfiguration(ConfigProviderImpl provider); + public abstract void initConfiguration(ConfigurationManager provider); /** * Load configuration from ConfigurationContainer @@ -85,7 +85,7 @@ public abstract class ConfigurationCompositeBase extends StateComposite { * Store configuration from ConfigurationContainer to ConfigProvider * @param store the ConfigProviderImpl to store config to */ - public abstract void storeConfiguration(ConfigProviderImpl store); + public abstract void storeConfiguration(ConfigurationManager store); /** * Called before exit. diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java index 597112df..7ea2a642 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/KeystoreConfigurationComposite.java @@ -55,8 +55,8 @@ import at.asit.pdfover.gui.exceptions.KeystoreAliasNoKeyException; import at.asit.pdfover.gui.exceptions.KeystoreDoesntExistException; import at.asit.pdfover.gui.exceptions.KeystoreKeyPasswordException; import at.asit.pdfover.commons.Messages; -import at.asit.pdfover.gui.workflow.config.ConfigProviderImpl; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; +import at.asit.pdfover.gui.workflow.config.ConfigurationManager; +import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory; import at.asit.pdfover.gui.workflow.states.State; import iaik.security.provider.IAIK; @@ -97,7 +97,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { */ public KeystoreConfigurationComposite( org.eclipse.swt.widgets.Composite parent, int style, State state, - ConfigurationContainer container) { + ConfigurationDataInMemory container) { super(parent, style, state, container); setLayout(new FormLayout()); @@ -277,7 +277,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { } void loadKeystore() throws KeyStoreException, NoSuchAlgorithmException, CertificateException, IOException { - ConfigurationContainer config = + ConfigurationDataInMemory config = KeystoreConfigurationComposite.this.configurationContainer; File f = new File(config.keystoreFile); this.ks = KeyStore.getInstance(config.keystoreType); @@ -380,8 +380,8 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void initConfiguration(ConfigProviderImpl provider) { - ConfigurationContainer config = this.configurationContainer; + public void initConfiguration(ConfigurationManager provider) { + ConfigurationDataInMemory config = this.configurationContainer; config.keystoreFile = provider.getKeyStoreFilePersistent(); config.keystoreType = provider.getKeyStoreTypePersistent(); config.keystoreAlias = provider.getKeyStoreAliasPersistent(); @@ -397,7 +397,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { @Override public void loadConfiguration() { // Initialize form fields from configuration Container - ConfigurationContainer config = this.configurationContainer; + ConfigurationDataInMemory config = this.configurationContainer; String ks = config.keystoreFile; performKeystoreFileChanged(ks); performKeystoreTypeChanged(config.keystoreType); @@ -414,8 +414,8 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void storeConfiguration(ConfigProviderImpl store) { - ConfigurationContainer config = this.configurationContainer; + public void storeConfiguration(ConfigurationManager store) { + ConfigurationDataInMemory config = this.configurationContainer; store.setKeyStoreFile(config.keystoreFile); store.setKeyStoreType(config.keystoreType); store.setKeyStoreAlias(config.keystoreAlias); @@ -432,7 +432,7 @@ public class KeystoreConfigurationComposite extends ConfigurationCompositeBase { */ @Override public void validateSettings(int resumeFrom) throws Exception { - ConfigurationContainer config = this.configurationContainer; + ConfigurationDataInMemory config = this.configurationContainer; switch (resumeFrom) { case 0: String fname = config.keystoreFile; diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java index 257f9cc6..c8d9c208 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/configuration/SimpleConfigurationComposite.java @@ -63,8 +63,8 @@ import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.utils.ImageConverter; -import at.asit.pdfover.gui.workflow.config.ConfigProviderImpl; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; +import at.asit.pdfover.gui.workflow.config.ConfigurationManager; +import at.asit.pdfover.gui.workflow.config.ConfigurationDataInMemory; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.CachedFileNameEmblem; import at.asit.pdfover.signator.SignatureParameter; @@ -119,7 +119,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { */ public SimpleConfigurationComposite( org.eclipse.swt.widgets.Composite parent, int style, State state, - ConfigurationContainer container) { + ConfigurationDataInMemory container) { super(parent, style, state, container); setLayout(new FormLayout()); @@ -607,7 +607,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void initConfiguration(ConfigProviderImpl provider) { + public void initConfiguration(ConfigurationManager provider) { this.configurationContainer.setMobileNumber(provider.getDefaultMobileNumberPersistent()); try { @@ -663,7 +663,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { } @Override - public void storeConfiguration(ConfigProviderImpl store) { + public void storeConfiguration(ConfigurationManager store) { store.setDefaultMobileNumber(this.configurationContainer.getMobileNumber()); store.setDefaultEmblem(this.configurationContainer.getEmblem()); store.setSignatureLocale(this.configurationContainer.signatureLocale); |