diff options
Diffstat (limited to 'pdf-over-gui/src/main/java')
5 files changed, 15 insertions, 15 deletions
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 e24aa9a8..7316b91e 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 @@ -663,7 +663,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { } this.configurationContainer.proxyUser = provider.getProxyUserPersistent(); this.configurationContainer.proxyPass = provider.getProxyPassPersistent(); - this.configurationContainer.setSignatureProfile(Profile.getProfile(provider.getSignatureProfile())); + this.configurationContainer.setSignatureProfile(provider.getSignatureProfile()); } /* @@ -745,7 +745,7 @@ public class AdvancedConfigurationComposite extends ConfigurationCompositeBase { store.setUpdateCheckPersistent(this.configurationContainer.updateCheck); - store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile().name()); + store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile()); String hostOld = store.getProxyHostPersistent(); String hostNew = this.configurationContainer.proxyHost; 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 52c78e9d..8f652603 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 @@ -348,7 +348,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { try { PdfAs4SignatureParameter param = new PdfAs4SignatureParameter(); - param.signatureProfileName = this.configurationContainer.getSignatureProfile().name(); + param.signatureProfile = this.configurationContainer.getSignatureProfile(); if(this.configurationContainer.signatureNote != null && !this.configurationContainer.signatureNote.isEmpty()) { param.setProperty("SIG_NOTE", this.configurationContainer.signatureNote); } @@ -612,7 +612,7 @@ public class SimpleConfigurationComposite extends ConfigurationCompositeBase { store.setDefaultEmblemPersistent(this.configurationContainer.getEmblemPath()); store.setSignatureLocalePersistent(this.configurationContainer.signatureLocale); store.setSignatureNotePersistent(this.configurationContainer.signatureNote); - store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile().name()); + store.setSignatureProfilePersistent(this.configurationContainer.getSignatureProfile()); } /* diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java index df059e68..25353ac4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationManager.java @@ -127,12 +127,12 @@ public class ConfigurationManager { String signatureProfileName = diskConfig.getProperty(Constants.SIGNATURE_PROFILE); if (signatureProfileName != null) - setSignatureProfilePersistent(signatureProfileName); + setSignatureProfilePersistent(Profile.getProfile(signatureProfileName)); if (diskConfig.containsKey(Constants.CFG_SIGNATURE_NOTE)) setSignatureNotePersistent(diskConfig.getProperty(Constants.CFG_SIGNATURE_NOTE)); else - setSignatureNotePersistent(Profile.getProfile(getSignatureProfile()).getDefaultSignatureBlockNote(getSignatureLocale())); + setSignatureNotePersistent(getSignatureProfile().getDefaultSignatureBlockNote(getSignatureLocale())); String compat = diskConfig.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT); if (compat != null) @@ -373,7 +373,7 @@ public class ConfigurationManager { if (!getUpdateCheck()) props.setProperty(Constants.CFG_UPDATE_CHECK, Constants.FALSE); - props.setProperty(Constants.SIGNATURE_PROFILE, getSignatureProfile()); + props.setProperty(Constants.SIGNATURE_PROFILE, getSignatureProfile().name()); FileOutputStream outputstream = new FileOutputStream(configFile, false); @@ -955,10 +955,6 @@ public class ConfigurationManager { if (useMarker) setUseSignatureFieldsPersistent(false); } - public void setSignatureProfilePersistent(String profile) { - this.configuration.setSignatureProfile(Profile.getProfile(profile)); - } - public void setSaveFilePostFixPersistent(String postFix) { this.configuration.saveFilePostFix = postFix; } @@ -967,8 +963,12 @@ public class ConfigurationManager { return this.configuration.saveFilePostFix; } - public String getSignatureProfile() { - return this.configuration.getSignatureProfile().name(); + public Profile getSignatureProfile() { + return this.configuration.getSignatureProfile(); + } + + public void setSignatureProfilePersistent(Profile profile) { + this.configuration.setSignatureProfile(profile); } public void setEnablePlaceholderUsagePersistent(boolean bool) { diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 15a67876..29a37970 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -107,7 +107,7 @@ public class PositioningState extends State { ConfigurationManager config = stateMachine.configProvider; PdfAs4SignatureParameter param = new PdfAs4SignatureParameter(); - param.signatureProfileName = config.getSignatureProfile(); + param.signatureProfile = config.getSignatureProfile(); Emblem emblem = new Emblem(config.getDefaultEmblemPath()); param.emblem = emblem; diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index bb3190ef..b0cfa71e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -150,7 +150,7 @@ public class PrepareSigningState extends State { this.state.signatureParameter.enablePDFACompat = configuration.getSignaturePdfACompat(); - this.state.signatureParameter.signatureProfileName = configuration.getSignatureProfile(); + this.state.signatureParameter.signatureProfile = configuration.getSignatureProfile(); this.state.signingState = PdfAs4Signer.prepare(this.state.signatureParameter); |