From ad8cccc8a24e8238dba18f636a138d72f5d77057 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Mon, 9 Nov 2020 13:19:42 +0100 Subject: added new group for signature profile selection --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index a1ebfc44..5c74b78e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -55,6 +55,8 @@ public class Constants { /** Supported locales */ public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH }; + + public static final String[] SUPPORTED_PROFILES = {"Signaturblock Normal", "Signaturblock Klein", "Amtssignaturblock", "Nur Bildmarke"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ /** Configuration directory */ public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; //$NON-NLS-1$ //$NON-NLS-2$ -- cgit v1.2.3 From 01f5b6348cdd84ce765b2235e60f309ebe7fac0c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Mon, 9 Nov 2020 16:18:42 +0100 Subject: Extending GUI (profiles) + configf --- .../main/java/at/asit/pdfover/gui/Constants.java | 22 ++++- .../composites/SimpleConfigurationComposite.java | 97 ++++++++++++---------- .../config/ConfigurationContainerImpl.java | 1 + 3 files changed, 72 insertions(+), 48 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 5c74b78e..98fac033 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -56,8 +56,26 @@ public class Constants { /** Supported locales */ public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH }; - public static final String[] SUPPORTED_PROFILES = {"Signaturblock Normal", "Signaturblock Klein", "Amtssignaturblock", "Nur Bildmarke"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - + public static final String[] SUPPORTED_PROFILES_STRINGS = {"Signaturblock Normal", "Signaturblock Klein", "Amtssignaturblock", "Nur Bildmarke"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + public static enum PROFILE { + SIGNATUREBLOCK_NORMAL("Signaturblock Normal"), //$NON-NLS-1$ + SIGNATUREBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ + AMTSSIGNATUREBLOCK("Amtssignaturblock"), //$NON-NLS-1$ + LOGO_ONLY("Nur Bildmarke"); //$NON-NLS-1$ + + public static int length = 4; + private String name; + + PROFILE(String profile){ + this.name = profile; + } + + public String getName() { + return this.name; + } + } + /** Configuration directory */ public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index c3e4a138..b3925775 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -62,6 +62,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; @@ -114,9 +115,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { Image sigPreview = null; Image logo = null; - private final Group grpSingnatureProfile; - private final Label lblSignatureProfile; + private final Group grpSignatureProfile; +// private final Label lblSignatureProfile; private final Combo cmbSingatureProfiles; + /** @@ -207,63 +209,66 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { //----------------------------------------------------------------------- - this.grpSingnatureProfile = new Group(this, SWT.NONE); + this.grpSignatureProfile = new Group(this, SWT.NONE); FormData fd_grpSingnatureProfile = new FormData(); fd_grpSingnatureProfile.right = new FormAttachment(100, -5); fd_grpSingnatureProfile.left = new FormAttachment(0, 5); fd_grpSingnatureProfile.top = new FormAttachment(this.grpHandySignatur, 5); - this.grpSingnatureProfile.setLayoutData(fd_grpSingnatureProfile); - this.grpSingnatureProfile.setLayout(new GridLayout(2, false)); - this.grpSingnatureProfile.setText("Signature Profile"); - + this.grpSignatureProfile.setLayoutData(fd_grpSingnatureProfile); + //this.grpSignatureProfile.setLayout(new GridLayout(2, false)); + this.grpSignatureProfile.setText("Signature Profile"); //$NON-NLS-1$ - this.lblSignatureProfile = new Label(this.grpSingnatureProfile, SWT.NONE); - FontData[] fD_grpSingnatureProfile = this.grpSingnatureProfile.getFont() +// this.lblSignatureProfile = new Label(this.grpSignatureProfile, SWT.NONE); +// + FontData[] fD_grpSignatureProfile = this.grpSignatureProfile.getFont() .getFontData(); - fD_grpSingnatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpSingnatureProfile.setFont(new Font(Display.getCurrent(), - fD_grpSingnatureProfile[0])); + fD_grpSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.grpSignatureProfile.setFont(new Font(Display.getCurrent(), + fD_grpSignatureProfile[0])); // TODO create text for each language - this.lblSignatureProfile.setText("Profile"); //$NON-NLS-1$ +// this.lblSignatureProfile.setText("Profile"); //$NON-NLS-1$ +// +// FontData[] fD_lblSignatureProfile = this.lblSignatureProfile.getFont() +// .getFontData(); +// fD_lblSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); +// this.lblSignatureProfile.setFont(new Font(Display.getCurrent(), +// fD_lblSignatureProfile[0])); - FontData[] fD_lblSignatureProfile = this.lblSignatureProfile.getFont() - .getFontData(); - fD_lblSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblSignatureProfile.setFont(new Font(Display.getCurrent(), - fD_lblSignatureProfile[0])); + this.cmbSingatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY); - this.cmbSingatureProfiles = new Combo(this.grpSingnatureProfile, SWT.READ_ONLY); FormData fd_cmbSingatureProfiles = new FormData(); - fd_cmbSingatureProfiles.left = new FormAttachment(this.grpSingnatureProfile, 10); + fd_cmbSingatureProfiles.left = new FormAttachment(0, 10); fd_cmbSingatureProfiles.right = new FormAttachment(100, -10); fd_cmbSingatureProfiles.top = new FormAttachment(0, 10); fd_cmbSingatureProfiles.bottom = new FormAttachment(100, -10); - this.grpSingnatureProfile.setLayoutData(fd_cmbSingatureProfiles); + this.cmbSingatureProfiles.setLayoutData(fd_cmbSingatureProfiles); - FontData[] fD_cmbSignatureLang = this.grpSingnatureProfile.getFont() - .getFontData(); - fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpSingnatureProfile.setFont(new Font(Display.getCurrent(), - fD_cmbSignatureLang[0])); - String[] profiles = new String[Constants.SUPPORTED_PROFILES.length]; - for (int i = 0; i < Constants.SUPPORTED_PROFILES.length; ++i) { - profiles[i] = Constants.SUPPORTED_PROFILES[i]; + FontData[] fD_cmbSignatureProfile = this.grpSignatureProfile.getFont() + .getFontData(); + fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.grpSignatureProfile.setFont(new Font(Display.getCurrent(), + fD_cmbSignatureProfile[0])); + + String[] profiles = new String[PROFILE.length]; + int i = 0; + for (PROFILE profile : PROFILE.values()) { + profiles[i] = profile.name(); + i++; } - this.cmbSignatureLang.setItems(profiles); - this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() { + + this.cmbSingatureProfiles.setItems(profiles); + this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - Locale currentLocale = SimpleConfigurationComposite.this.configurationContainer - .getSignatureLocale(); - String selectedLocale = Constants. - SUPPORTED_PROFILES[SimpleConfigurationComposite.this.cmbSignatureLang + String current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); + String selected = profiles[SimpleConfigurationComposite.this.cmbSingatureProfiles .getSelectionIndex()]; - if (!currentLocale.equals(selectedLocale)) { - performSignatureLangSelectionChanged(selectedLocale, currentLocale); + if (!current.equals(selected)) { + preformProfileSelectionChanged(selected, current); } } }); @@ -276,7 +281,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { FormData fd_grpBildmarke = new FormData(); fd_grpBildmarke.left = new FormAttachment(0, 5); fd_grpBildmarke.right = new FormAttachment(100, -5); - fd_grpBildmarke.top = new FormAttachment(this.grpSingnatureProfile, 5); + fd_grpBildmarke.top = new FormAttachment(this.grpSignatureProfile, 5); this.grpLogo.setLayoutData(fd_grpBildmarke); this.grpLogo.setLayout(new FormLayout()); @@ -484,16 +489,16 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_cmbSignatureLang.bottom = new FormAttachment(100, -10); this.cmbSignatureLang.setLayoutData(fd_cmbSignatureLang); -// FontData[] fD_cmbSignatureLang = this.cmbSignatureLang.getFont() -// .getFontData(); -// fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL); + FontData[] fD_cmbSignatureLang = this.cmbSignatureLang.getFont() + .getFontData(); + fD_cmbSignatureLang[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.cmbSignatureLang.setFont(new Font(Display.getCurrent(), fD_cmbSignatureLang[0])); -// String[] localeSignStrings = new String[Constants.SUPPORTED_LOCALES.length]; -// for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) { -// localeSignStrings[i] = Constants.SUPPORTED_LOCALES[i].getDisplayLanguage(); -// } + String[] localeSignStrings = new String[Constants.SUPPORTED_LOCALES.length]; + for (int idx = 0; idx < Constants.SUPPORTED_LOCALES.length; ++idx) { + localeSignStrings[idx] = Constants.SUPPORTED_LOCALES[idx].getDisplayLanguage(); + } this.cmbSignatureLang.setItems(localeSignStrings); this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() { @Override @@ -778,8 +783,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } } } - private void preformProfileSelectionChanged(String selected, String previous) { + 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 e6b168dc..be2444a0 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 @@ -726,6 +726,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { return this.enabledPlaceholderUsage; } + @Override public String getSignatureProfile() { return this.signatureProfile; -- cgit v1.2.3 From 270ea55dd1d77f4bac549ddc2cfef00393744e7a Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Tue, 10 Nov 2020 11:51:36 +0100 Subject: Signature Profile selection in GUI --- .../main/java/at/asit/pdfover/gui/Constants.java | 34 +++++++++++++++++++++- .../composites/SimpleConfigurationComposite.java | 34 +++++++--------------- .../workflow/config/ConfigurationContainer.java | 9 +++++- .../config/ConfigurationContainerImpl.java | 10 +++++-- 4 files changed, 59 insertions(+), 28 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 98fac033..7cb58f74 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -23,6 +23,7 @@ import java.util.Properties; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Display; +import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; @@ -59,7 +60,7 @@ public class Constants { public static final String[] SUPPORTED_PROFILES_STRINGS = {"Signaturblock Normal", "Signaturblock Klein", "Amtssignaturblock", "Nur Bildmarke"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ public static enum PROFILE { - SIGNATUREBLOCK_NORMAL("Signaturblock Normal"), //$NON-NLS-1$ + SIGNATUREBLOCK_NORMAL("Signaturblock Normal") , //$NON-NLS-1$ SIGNATUREBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ AMTSSIGNATUREBLOCK("Amtssignaturblock"), //$NON-NLS-1$ LOGO_ONLY("Nur Bildmarke"); //$NON-NLS-1$ @@ -71,9 +72,40 @@ public class Constants { this.name = profile; } + public static String[] getProfileStrings() { + String[] profiles = new String[PROFILE.length]; + int i = 0; + for (PROFILE profile : PROFILE.values()) { + profiles[i] = profile.getName(); + i++; + } + return profiles; + } + + public static PROFILE getProfileByIndex(int index) { + String[] profiles = getProfileStrings(); + if (profiles.length < index) { + return null; + } + return getProfile(profiles[index]); + } + public String getName() { return this.name; } + + public static PROFILE getProfile(String profile) { + if (SIGNATUREBLOCK_NORMAL.getName().equals(profile)) { + return SIGNATUREBLOCK_NORMAL; + } else if (SIGNATUREBLOCK_SMALL.getName().equals(profile)) { + return SIGNATUREBLOCK_SMALL; + } else if (AMTSSIGNATUREBLOCK.getName().equals(profile)) { + return AMTSSIGNATUREBLOCK; + } else if (LOGO_ONLY.getName().equals(profile)) { + return LOGO_ONLY; + } + return null; + } } /** Configuration directory */ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index 00df4a99..6737c194 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -116,7 +116,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { Image logo = null; private final Group grpSignatureProfile; -// private final Label lblSignatureProfile; private final Combo cmbSingatureProfiles; @@ -216,7 +215,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_grpSingnatureProfile.left = new FormAttachment(0, 5); fd_grpSingnatureProfile.top = new FormAttachment(this.grpHandySignatur, 5); this.grpSignatureProfile.setLayoutData(fd_grpSingnatureProfile); -// this.grpSignatureProfile.setLayout(new GridLayout(2, false)); this.grpSignatureProfile.setText("Signature Profile"); //$NON-NLS-1$ this.grpSignatureProfile.setLayout(new FormLayout()); @@ -241,30 +239,20 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); - - String[] profiles = new String[PROFILE.length]; - int i = 0; - for (PROFILE profile : PROFILE.values()) { - profiles[i] = profile.name(); - i++; - } - - this.cmbSingatureProfiles.setItems(profiles); + this.cmbSingatureProfiles.setItems(PROFILE.getProfileStrings()); + this.configurationContainer.getSignatureProfile(); + this.cmbSingatureProfiles.select(this.configurationContainer.getSignatureProfile().ordinal()); this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - String current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); - String selected = profiles[SimpleConfigurationComposite.this.cmbSingatureProfiles - .getSelectionIndex()]; + PROFILE current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); + PROFILE selected = PROFILE.getProfileByIndex(SimpleConfigurationComposite.this.cmbSingatureProfiles + .getSelectionIndex()); if (!current.equals(selected)) { - preformProfileSelectionChanged(selected, current); + preformProfileSelectionChanged(selected); } } }); - - - //------------------------------------------------------------------------ - this.grpLogo = new Group(this, SWT.NONE); FormData fd_grpBildmarke = new FormData(); @@ -772,12 +760,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } } } - private void preformProfileSelectionChanged(String selected, String previous) { - - - - + void preformProfileSelectionChanged(PROFILE selected) { + log.debug("Signature Profile {0} was selected", selected.getName()); + this.configurationContainer.setSignatureProfile(selected); } /* 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 668c8cb7..18145d4f 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 @@ -19,6 +19,7 @@ import java.util.Locale; import org.eclipse.swt.graphics.Point; +import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; @@ -414,8 +415,14 @@ public interface ConfigurationContainer { public boolean getEnablePlaceholderUsage(); + /** + * @param profile set the selected profile + */ + public void setSignatureProfile(PROFILE profile); + + /** * @return selected signature profile as string */ - public String getSignatureProfile(); + public PROFILE getSignatureProfile(); } 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 be2444a0..b3232cfe 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 @@ -28,6 +28,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; @@ -146,7 +147,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { protected boolean useSignatureFields = false; /** The Signature Profile */ - protected String signatureProfile = "Normal"; //$NON-NLS-1$ + protected PROFILE signatureProfile = PROFILE.SIGNATUREBLOCK_NORMAL; //$NON-NLS-1$ /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() @@ -728,8 +729,13 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { @Override - public String getSignatureProfile() { + public PROFILE getSignatureProfile() { return this.signatureProfile; } + @Override + public void setSignatureProfile(PROFILE profile) { + this.signatureProfile = profile; + } + } -- cgit v1.2.3 From 17a8b0011e749af61fa41afdc221169a579ac688 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Tue, 10 Nov 2020 13:51:09 +0100 Subject: added signature profile to the config --- .../main/java/at/asit/pdfover/gui/Constants.java | 2 ++ .../composites/AdvancedConfigurationComposite.java | 2 ++ .../composites/SimpleConfigurationComposite.java | 2 ++ .../gui/workflow/config/ConfigManipulator.java | 5 ++++ .../workflow/config/ConfigOverlayManipulator.java | 6 +++++ .../gui/workflow/config/ConfigProvider.java | 13 ++++++++++ .../gui/workflow/config/ConfigProviderImpl.java | 30 ++++++++++++---------- .../workflow/config/ConfigurationContainer.java | 4 --- .../config/ConfigurationContainerImpl.java | 2 +- .../workflow/config/PersistentConfigProvider.java | 6 +++++ 10 files changed, 54 insertions(+), 18 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 7cb58f74..dd53b1d3 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -40,6 +40,8 @@ public class Constants { /** Application name + version */ public static final String APP_NAME_VERSION = (APP_VERSION == null ? APP_NAME : APP_NAME + " v" + APP_VERSION); //$NON-NLS-1$ + + public static final String SIGNATURE_PROFILE = "SIGNATURE_PROFILE"; //$NON-NLS-1$ static { // Has to be set before (implicitly) initializing Display diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index bbcf6b9c..fe4cfc28 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -1183,6 +1183,8 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { store.setLocale(this.configurationContainer.getLocale()); store.setUpdateCheck(this.configurationContainer.getUpdateCheck()); + + store.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName()); String hostOld = provider.getProxyHostPersistent(); String hostNew = this.configurationContainer.getProxyHost(); diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index 6737c194..147f17eb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -886,6 +886,8 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { store.setSignatureLocale(this.configurationContainer.getSignatureLocale()); store.setSignatureNote(this.configurationContainer.getSignatureNote()); + + store.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName()); } /* 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 abed492a..3aba5075 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 @@ -197,6 +197,11 @@ public interface ConfigManipulator { * @return */ public boolean getEnablePlaceholderUsage(); + + /** + * @param profile + */ + void setSignatureProfile(String profile); } 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 44c4a9c9..9b54f4ee 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 @@ -131,4 +131,10 @@ public interface ConfigOverlayManipulator { * @param configurationFile */ public void setConfigurationFile(String configurationFile); + + /** + * + * @param profile + */ + public void setSignatureProfile(String profile); } 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 4c674d17..efe0a83b 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 @@ -265,4 +265,17 @@ public interface ConfigProvider { * @return */ public boolean getEnablePlaceholderUsage(); + + /** + * @param profile + */ + public void setSignatureProfile(String profile); + + + /** + * @return + */ + public String getSignatureProfile(); } + + 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 bd149cf7..b6acb392 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 @@ -30,6 +30,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; @@ -112,11 +113,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, // Set Output Folder setDefaultOutputFolder(config .getProperty(Constants.CFG_OUTPUT_FOLDER)); - - // Set Default Certificate Download URL - // .getProperty(Constants.CFG_DOWNLOAD_URL)); - - String localeString = config.getProperty(Constants.CFG_LOCALE); @@ -146,6 +142,10 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, setEnablePlaceholderUsage(enablePlaceholder.equalsIgnoreCase(Constants.TRUE)); } + String signatureProfile = config.getProperty(Constants.SIGNATURE_PROFILE); + if (signatureProfile != null) { + this.configuration.setSignatureProfile(PROFILE.getProfile(signatureProfile)); + } String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT); if (compat != null) @@ -158,14 +158,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, this.configuration.setMobileBKUURL(bkuUrl); } - /*String downloadURL = config - .getProperty(Constants.CFG_DOWNLOAD_URL); - - if (downloadURL != null && !downloadURL.isEmpty()) { - this.configuration.setDownloadURL(downloadURL); - }*/ - - String bkuType = config .getProperty(Constants.CFG_MOBILE_BKU_TYPE); @@ -434,6 +426,8 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, if (!getUpdateCheck()) props.setProperty(Constants.CFG_UPDATE_CHECK, Constants.FALSE); + props.setProperty(Constants.SIGNATURE_PROFILE, getSignatureProfile()); + FileOutputStream outputstream = new FileOutputStream(configFile, false); @@ -1511,6 +1505,16 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, if (useFields) setUseMarker(false); } + @Override + public void setSignatureProfile(String profile) { + this.configurationOverlay.setSignatureProfile(PROFILE.getProfile(profile)); + } + + @Override + public String getSignatureProfile() { + return this.configurationOverlay.getSignatureProfile().getName(); + } + @Override public void setEnablePlaceholderUsage(boolean bool) { 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 18145d4f..8b08ba9f 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 @@ -153,10 +153,6 @@ public interface ConfigurationContainer { * @return the default BKU */ public BKUs getDefaultBKU(); - - - - /** * Sets the default BKU 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 b3232cfe..3f0021f7 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 @@ -147,7 +147,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { protected boolean useSignatureFields = false; /** The Signature Profile */ - protected PROFILE signatureProfile = PROFILE.SIGNATUREBLOCK_NORMAL; //$NON-NLS-1$ + protected PROFILE signatureProfile = PROFILE.SIGNATUREBLOCK_NORMAL; /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() 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 e217b3c8..3304b6ca 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 @@ -199,4 +199,10 @@ public interface PersistentConfigProvider { * @return */ public boolean getEnablePlaceholderUsage(); + + /*** + * + * @return the signature profile + */ + public String getSignatureProfile(); } -- cgit v1.2.3 From a50acb0863935747edbf1ebccf000d28822dc2db Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 09:54:44 +0100 Subject: settings --- pdf-over-gui/.classpath | 68 +++++++- pdf-over-gui/.project | 41 +++-- pdf-over-gui/.settings/org.eclipse.jdt.core.prefs | 181 +++++++++++---------- .../main/java/at/asit/pdfover/gui/Constants.java | 2 - pdf-over-signator/.classpath | 22 ++- pdf-over-signator/.project | 37 ++--- .../.settings/org.eclipse.jdt.core.prefs | 151 ++++++++--------- pdf-over-signer/pdf-over-sigpdfas4/.classpath | 83 ++++++---- pdf-over-signer/pdf-over-sigpdfas4/.project | 42 ++--- .../.settings/org.eclipse.jdt.core.prefs | 151 ++++++++--------- .../signer/pdfas/PdfAs4SignatureParameter.java | 2 + .../at/asit/pdfover/signer/pdfas/PdfAs4Signer.java | 2 + 12 files changed, 440 insertions(+), 342 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/.classpath b/pdf-over-gui/.classpath index a6e09d11..e070f335 100644 --- a/pdf-over-gui/.classpath +++ b/pdf-over-gui/.classpath @@ -1,7 +1,8 @@ - + + @@ -16,18 +17,73 @@ - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - diff --git a/pdf-over-gui/.project b/pdf-over-gui/.project index c7fd44f6..d378d8d3 100644 --- a/pdf-over-gui/.project +++ b/pdf-over-gui/.project @@ -1,24 +1,21 @@ - pdf-over-gui - - - pdf-as-lib - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - + pdf-over-gui + A tool to sign pdf documents. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + + pdf-over-signator + pdf-over-sigpdfas4 + + + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + \ No newline at end of file diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs index 0e650d49..dc8993fb 100644 --- a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs +++ b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs @@ -1,105 +1,110 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.doc.comment.support=enabled +#Thu Nov 12 09:47:59 CET 2020 +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +encoding/src/main/java=UTF-8 +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +encoding/src/test/java=UTF-8 +encoding/src/test/resources=UTF-8 +encoding/src/main/resources=UTF-8 org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled -org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW -org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index dd53b1d3..37e7ceb6 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -59,8 +59,6 @@ public class Constants { /** Supported locales */ public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH }; - public static final String[] SUPPORTED_PROFILES_STRINGS = {"Signaturblock Normal", "Signaturblock Klein", "Amtssignaturblock", "Nur Bildmarke"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ - public static enum PROFILE { SIGNATUREBLOCK_NORMAL("Signaturblock Normal") , //$NON-NLS-1$ SIGNATUREBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ diff --git a/pdf-over-signator/.classpath b/pdf-over-signator/.classpath index 77af1552..162d2a38 100644 --- a/pdf-over-signator/.classpath +++ b/pdf-over-signator/.classpath @@ -1,23 +1,37 @@ - + + - + + + - + + + + + + + + + + + + - + diff --git a/pdf-over-signator/.project b/pdf-over-signator/.project index e6d690af..221f31bc 100644 --- a/pdf-over-signator/.project +++ b/pdf-over-signator/.project @@ -1,23 +1,18 @@ - pdf-over-signator - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - + pdf-over-signator + A tool to sign pdf documents. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + + + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + \ No newline at end of file diff --git a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs b/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs index 51f690b3..5f860d69 100644 --- a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs +++ b/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs @@ -1,90 +1,95 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.doc.comment.support=enabled +#Thu Nov 12 09:47:52 CET 2020 +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +encoding/src/main/java=UTF-8 +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +encoding/src/test/java=UTF-8 +encoding/src/test/resources=UTF-8 +encoding/src/main/resources=UTF-8 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled -org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW -org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.classpath b/pdf-over-signer/pdf-over-sigpdfas4/.classpath index 6328ed81..bcc28deb 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/.classpath +++ b/pdf-over-signer/pdf-over-sigpdfas4/.classpath @@ -1,31 +1,56 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.project b/pdf-over-signer/pdf-over-sigpdfas4/.project index 1d14e32f..882b34b9 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/.project +++ b/pdf-over-signer/pdf-over-sigpdfas4/.project @@ -1,26 +1,20 @@ - pdf-over-sigpdfas - - - pdf-as-common - pdf-as-lib - sigs-pades - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.m2e.core.maven2Builder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.m2e.core.maven2Nature - - + pdf-over-sigpdfas4 + A tool to sign pdf documents. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse. + + pdf-over-signator + + + + org.eclipse.jdt.core.javabuilder + + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + \ No newline at end of file diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs index 51f690b3..086b272b 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs +++ b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs @@ -1,90 +1,95 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.doc.comment.support=enabled +#Thu Nov 12 09:47:55 CET 2020 +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +encoding/src/main/java=UTF-8 +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +encoding/src/test/java=UTF-8 +encoding/src/test/resources=UTF-8 +encoding/src/main/resources=UTF-8 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=warning -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled -org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,LOW -org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,NOTE diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 679e1e0e..38a2bc8f 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -26,6 +26,7 @@ import java.util.Locale; import org.slf4j.Logger; import org.slf4j.LoggerFactory; + import at.asit.pdfover.signator.SignatureDimension; import at.asit.pdfover.signator.SignatureParameter; import at.asit.pdfover.signator.SignaturePosition; @@ -163,6 +164,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { String lang = getSignatureLanguage(); boolean useNote = (getProperty("SIG_NOTE") != null); boolean usePdfACompat = (getSignaturePdfACompat()); + String profile = getProperty("SIGNATURE_PROFILE"); //Add Signature Param here// String profileId; diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java index c7dba85f..a729f65b 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java @@ -90,6 +90,8 @@ public class PdfAs4Signer implements Signer { param.getConfiguration().setValue(IConfigurationConstants.PLACEHOLDER_MODE, "3"); param.getConfiguration().setValue(IConfigurationConstants.PLACEHOLDER_SEARCH_ENABLED, IConfigurationConstants.TRUE); } + + state.setSignParameter(param); state.setOutput(output); -- cgit v1.2.3 From be14be9262cfd2a5f4b811fcbc9f5dfa8b43c3f6 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 14:25:36 +0100 Subject: Invisible signatures to availabel profiles added --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 37e7ceb6..cbfd8e24 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -62,10 +62,11 @@ public class Constants { public static enum PROFILE { SIGNATUREBLOCK_NORMAL("Signaturblock Normal") , //$NON-NLS-1$ SIGNATUREBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ - AMTSSIGNATUREBLOCK("Amtssignaturblock"), //$NON-NLS-1$ - LOGO_ONLY("Nur Bildmarke"); //$NON-NLS-1$ + AMTSSIGNATUREBLOCK("Amtssignatur"), //$NON-NLS-1$ + LOGO_ONLY("Nur Bildmarke"), //$NON-NLS-1$ + INVISIBLE("Unsichtbar"); - public static int length = 4; + public static int length = 5; private String name; PROFILE(String profile){ @@ -103,7 +104,9 @@ public class Constants { return AMTSSIGNATUREBLOCK; } else if (LOGO_ONLY.getName().equals(profile)) { return LOGO_ONLY; - } + } else if (INVISIBLE.getName().equals(profile)){ + return INVISIBLE; + } return null; } } -- cgit v1.2.3 From 1ccaee68474946e2509854a62b6d7e380bca6e7c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 16:19:52 +0100 Subject: Fixed Naming in Signature Profile Names --- .../src/main/java/at/asit/pdfover/gui/Constants.java | 18 +++++++++--------- .../workflow/config/ConfigurationContainerImpl.java | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index cbfd8e24..d6f83973 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -60,9 +60,9 @@ public class Constants { public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH }; public static enum PROFILE { - SIGNATUREBLOCK_NORMAL("Signaturblock Normal") , //$NON-NLS-1$ - SIGNATUREBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ - AMTSSIGNATUREBLOCK("Amtssignatur"), //$NON-NLS-1$ + SIGNATURBLOCK("Signaturblock Normal") , //$NON-NLS-1$ + SIGNATURBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ + AMTSSIGNATURBLOCK("Amtssignatur"), //$NON-NLS-1$ LOGO_ONLY("Nur Bildmarke"), //$NON-NLS-1$ INVISIBLE("Unsichtbar"); @@ -96,12 +96,12 @@ public class Constants { } public static PROFILE getProfile(String profile) { - if (SIGNATUREBLOCK_NORMAL.getName().equals(profile)) { - return SIGNATUREBLOCK_NORMAL; - } else if (SIGNATUREBLOCK_SMALL.getName().equals(profile)) { - return SIGNATUREBLOCK_SMALL; - } else if (AMTSSIGNATUREBLOCK.getName().equals(profile)) { - return AMTSSIGNATUREBLOCK; + if (SIGNATURBLOCK.getName().equals(profile)) { + return SIGNATURBLOCK; + } else if (SIGNATURBLOCK_SMALL.getName().equals(profile)) { + return SIGNATURBLOCK_SMALL; + } else if (AMTSSIGNATURBLOCK.getName().equals(profile)) { + return AMTSSIGNATURBLOCK; } else if (LOGO_ONLY.getName().equals(profile)) { return LOGO_ONLY; } else if (INVISIBLE.getName().equals(profile)){ 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 32b5ece3..300e2df1 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 @@ -731,7 +731,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { @Override public PROFILE getSignatureProfile() { if (this.signatureProfile == null) { - this.signatureProfile = PROFILE.SIGNATUREBLOCK_NORMAL; + this.signatureProfile = PROFILE.SIGNATURBLOCK; } return this.signatureProfile; } -- cgit v1.2.3 From d658f95290ea03bd0ecdc01110b48244b28e6f19 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 13:49:59 +0100 Subject: refactored Profile --- pdf-over-commons/pdf-over-commons.iml | 1 - .../main/java/at/asit/pdfover/commons/Profile.java | 58 ++++++++++++++++++++++ pdf-over-gui/pom.xml | 6 +++ .../main/java/at/asit/pdfover/gui/Constants.java | 55 +------------------- .../composites/AdvancedConfigurationComposite.java | 6 +-- .../composites/SimpleConfigurationComposite.java | 10 ++-- .../gui/workflow/config/ConfigProviderImpl.java | 8 +-- .../workflow/config/ConfigurationContainer.java | 6 +-- .../config/ConfigurationContainerImpl.java | 10 ++-- pdf-over-signer/pdf-over-sigpdfas4/pom.xml | 6 +++ .../signer/pdfas/PdfAs4SignatureParameter.java | 8 ++- 11 files changed, 94 insertions(+), 80 deletions(-) create mode 100644 pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-commons/pdf-over-commons.iml b/pdf-over-commons/pdf-over-commons.iml index c035f0b0..597cd8e6 100644 --- a/pdf-over-commons/pdf-over-commons.iml +++ b/pdf-over-commons/pdf-over-commons.iml @@ -6,7 +6,6 @@ - diff --git a/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java new file mode 100644 index 00000000..84de1aaa --- /dev/null +++ b/pdf-over-commons/src/main/java/at/asit/pdfover/commons/Profile.java @@ -0,0 +1,58 @@ +package at.asit.pdfover.commons; + +public enum Profile { + + SIGNATURBLOCK("Signaturblock Normal") , //$NON-NLS-1$ + SIGNATURBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ + AMTSSIGNATURBLOCK("Amtssignatur"), //$NON-NLS-1$ + LOGO_ONLY("Nur Bildmarke"), //$NON-NLS-1$ + INVISIBLE("Unsichtbar"); + + public static int length = 5; + private String name; + + Profile(String profile){ + this.name = profile; + } + + public static String[] getProfileStrings() { + String[] profiles = new String[Profile.length]; + int i = 0; + for (Profile profile : Profile.values()) { + profiles[i] = profile.getName(); + i++; + } + return profiles; + } + + public static Profile getProfileByIndex(int index) { + String[] profiles = getProfileStrings(); + if (profiles.length < index) { + return null; + } + return getProfile(profiles[index]); + } + + public String getName() { + return this.name; + } + + public static Profile getProfile(String profile) { + if (SIGNATURBLOCK.getName().equals(profile)) { + return SIGNATURBLOCK; + } else if (SIGNATURBLOCK_SMALL.getName().equals(profile)) { + return SIGNATURBLOCK_SMALL; + } else if (AMTSSIGNATURBLOCK.getName().equals(profile)) { + return AMTSSIGNATURBLOCK; + } else if (LOGO_ONLY.getName().equals(profile)) { + return LOGO_ONLY; + } else if (INVISIBLE.getName().equals(profile)){ + return INVISIBLE; + } + return null; + } + + + + +} diff --git a/pdf-over-gui/pom.xml b/pdf-over-gui/pom.xml index 3c108817..37d35469 100644 --- a/pdf-over-gui/pom.xml +++ b/pdf-over-gui/pom.xml @@ -66,6 +66,12 @@ commons-configuration 1.10 + + at.a-sit + pdf-over-commons + 4.2.4-SNAPSHOT + compile + diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index d6f83973..ed007cb8 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -23,8 +23,7 @@ import java.util.Properties; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Display; -import at.asit.pdfover.gui.Constants.PROFILE; -import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper; + import at.asit.pdfover.gui.bku.mobile.MobileBKUs; /** @@ -59,58 +58,6 @@ public class Constants { /** Supported locales */ public static final Locale[] SUPPORTED_LOCALES = { Locale.GERMAN, Locale.ENGLISH }; - public static enum PROFILE { - SIGNATURBLOCK("Signaturblock Normal") , //$NON-NLS-1$ - SIGNATURBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ - AMTSSIGNATURBLOCK("Amtssignatur"), //$NON-NLS-1$ - LOGO_ONLY("Nur Bildmarke"), //$NON-NLS-1$ - INVISIBLE("Unsichtbar"); - - public static int length = 5; - private String name; - - PROFILE(String profile){ - this.name = profile; - } - - public static String[] getProfileStrings() { - String[] profiles = new String[PROFILE.length]; - int i = 0; - for (PROFILE profile : PROFILE.values()) { - profiles[i] = profile.getName(); - i++; - } - return profiles; - } - - public static PROFILE getProfileByIndex(int index) { - String[] profiles = getProfileStrings(); - if (profiles.length < index) { - return null; - } - return getProfile(profiles[index]); - } - - public String getName() { - return this.name; - } - - public static PROFILE getProfile(String profile) { - if (SIGNATURBLOCK.getName().equals(profile)) { - return SIGNATURBLOCK; - } else if (SIGNATURBLOCK_SMALL.getName().equals(profile)) { - return SIGNATURBLOCK_SMALL; - } else if (AMTSSIGNATURBLOCK.getName().equals(profile)) { - return AMTSSIGNATURBLOCK; - } else if (LOGO_ONLY.getName().equals(profile)) { - return LOGO_ONLY; - } else if (INVISIBLE.getName().equals(profile)){ - return INVISIBLE; - } - return null; - } - } - /** Configuration directory */ public static final String CONFIG_DIRECTORY = System.getProperty("user.home") + File.separator + ".pdf-over"; //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index e9ed5316..f4b3ae0b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -48,7 +48,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Constants.PROFILE; +import at.asit.pdfover.commons.Profile; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; @@ -953,7 +953,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { provider.getProxyUserPersistent()); this.configurationContainer.setProxyPass( provider.getProxyPassPersistent()); - this.configurationContainer.setSignatureProfile(PROFILE.getProfile(provider.getSignatureProfile())); + this.configurationContainer.setSignatureProfile(Profile.getProfile(provider.getSignatureProfile())); } /* @@ -1001,7 +1001,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { * @param profile * */ - public void performSetSignatureProfile(PROFILE profile) { + public void performSetSignatureProfile(Profile profile) { this.configurationContainer.setSignatureProfile(profile); } diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index d65c45a5..7941bc9a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -62,7 +62,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Constants.PROFILE; +import at.asit.pdfover.commons.Profile; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; @@ -236,13 +236,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); - this.cmbSingatureProfiles.setItems(PROFILE.getProfileStrings()); + this.cmbSingatureProfiles.setItems(Profile.getProfileStrings()); //this.cmbSingatureProfiles.select(this.configurationContainer.getSignatureProfile().ordinal()); this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - PROFILE current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); - PROFILE selected = PROFILE.getProfileByIndex(SimpleConfigurationComposite.this.cmbSingatureProfiles + Profile current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); + Profile selected = Profile.getProfileByIndex(SimpleConfigurationComposite.this.cmbSingatureProfiles .getSelectionIndex()); if (!current.equals(selected)) { preformProfileSelectionChanged(selected); @@ -755,7 +755,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } } - void preformProfileSelectionChanged(PROFILE selected) { + void preformProfileSelectionChanged(Profile selected) { log.debug("Signature Profile {} was selected", selected.getName()); //$NON-NLS-1$ this.configurationContainer.setSignatureProfile(selected); this.cmbSingatureProfiles.select(selected.ordinal()); 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 f1461809..92a64103 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 @@ -25,12 +25,12 @@ import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; +import at.asit.pdfover.commons.Profile; import org.eclipse.swt.graphics.Point; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; @@ -144,8 +144,8 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, String signatureProfile = config.getProperty(Constants.SIGNATURE_PROFILE); if (signatureProfile != null) { - this.configuration.setSignatureProfile(PROFILE.getProfile(signatureProfile)); - this.configurationOverlay.setSignatureProfile(PROFILE.getProfile(signatureProfile)); + this.configuration.setSignatureProfile(Profile.getProfile(signatureProfile)); + this.configurationOverlay.setSignatureProfile(Profile.getProfile(signatureProfile)); } String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT); @@ -1508,7 +1508,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, @Override public void setSignatureProfile(String profile) { - this.configurationOverlay.setSignatureProfile(PROFILE.getProfile(profile)); + this.configurationOverlay.setSignatureProfile(Profile.getProfile(profile)); } @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 8b08ba9f..bed44da1 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 @@ -17,9 +17,9 @@ package at.asit.pdfover.gui.workflow.config; import java.util.Locale; +import at.asit.pdfover.commons.Profile; import org.eclipse.swt.graphics.Point; -import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; @@ -414,11 +414,11 @@ public interface ConfigurationContainer { /** * @param profile set the selected profile */ - public void setSignatureProfile(PROFILE profile); + public void setSignatureProfile(Profile profile); /** * @return selected signature profile as string */ - public PROFILE getSignatureProfile(); + public Profile getSignatureProfile(); } 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 300e2df1..7d2c77c4 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 @@ -20,6 +20,7 @@ import java.io.File; import java.io.FileNotFoundException; import java.util.Locale; +import at.asit.pdfover.commons.Profile; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.ImageData; import org.eclipse.swt.graphics.Point; @@ -28,7 +29,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Constants.PROFILE; import at.asit.pdfover.gui.bku.mobile.MobileBKUHelper; import at.asit.pdfover.gui.bku.mobile.MobileBKUs; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; @@ -147,7 +147,7 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { protected boolean useSignatureFields = false; /** The Signature Profile */ - protected PROFILE signatureProfile = null; + protected Profile signatureProfile = null; /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() @@ -729,15 +729,15 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { @Override - public PROFILE getSignatureProfile() { + public Profile getSignatureProfile() { if (this.signatureProfile == null) { - this.signatureProfile = PROFILE.SIGNATURBLOCK; + this.signatureProfile = Profile.SIGNATURBLOCK; } return this.signatureProfile; } @Override - public void setSignatureProfile(PROFILE profile) { + public void setSignatureProfile(Profile profile) { this.signatureProfile = profile; } diff --git a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml index 41054f48..dbcb4f9f 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml +++ b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml @@ -53,6 +53,12 @@ iaik_eccelerate_cms 3.01 + + at.a-sit + pdf-over-commons + 4.2.4-SNAPSHOT + compile + diff --git a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java index 5d286d44..62533868 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java +++ b/pdf-over-signer/pdf-over-sigpdfas4/src/main/java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java @@ -34,7 +34,7 @@ import at.gv.egiz.pdfas.lib.api.Configuration; import at.gv.egiz.pdfas.lib.api.PdfAs; import at.gv.egiz.pdfas.lib.api.PdfAsFactory; import at.gv.egiz.pdfas.lib.api.sign.SignParameter; -import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.commons.Profile; /** * Implementation of SignatureParameter for PDF-AS 4 Library @@ -172,13 +172,11 @@ public class PdfAs4SignatureParameter extends SignatureParameter { - if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar")) + if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar") || Profile.getProfile(this.profile).equals(Profile.INVISIBLE)) { - //TODO set base profile id using the this.profile - //TODO verifiy profileId = "INVISIBLE"; } else { - profileId = Constants.PROFILE.getProfile(this.profile).name();//PROFILE_ID_BASE; + profileId = Profile.getProfile(this.profile).name(); profileId += (lang != null && lang.equals("en")) ? PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; } -- cgit v1.2.3 From a3b052f565b4c54774f18745acad69fc6412d682 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 14:19:40 +0100 Subject: Minimum Version of PDF-AS updated to 4.1.6 --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index ed007cb8..dcc7c1d3 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -80,7 +80,7 @@ public class Constants { * The minimum PDF-AS configuration version (older ones will be backed up * and updated */ - public static final String MIN_PDF_AS_CONFIG_VERSION = "4.1.0"; //$NON-NLS-1$ + public static final String MIN_PDF_AS_CONFIG_VERSION = "4.1.6"; //$NON-NLS-1$ /** The configuration backup filename */ public static final String PDF_AS_CONFIG_BACKUP_FILENAME = "cfg_backup"; //$NON-NLS-1$ -- cgit v1.2.3 From d13ffed00c2c97e5fd582f42c019b8833ac39c7c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Mon, 16 Nov 2020 15:49:13 +0100 Subject: PDF-Over Version changed --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index dcc7c1d3..17a9a8d7 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -105,7 +105,7 @@ public class Constants { public static final int SIGNATURE_KEYBOARD_POSITIONING_OFFSET = 15; /** PDF-Over User Agent string */ - public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.1" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$ + public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.3" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$ /** Current release file */ public static final String CURRENT_RELEASE_URL = "http://webstart.buergerkarte.at/PDF-Over/Release.txt"; //$NON-NLS-1$ -- cgit v1.2.3 From 402805f8485a926a8efd8d01de9af98824941140 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 16:30:36 +0100 Subject: Added Postfix option to the configuration --- .../main/java/at/asit/pdfover/gui/Constants.java | 5 +++- .../composites/AdvancedConfigurationComposite.java | 9 +++++++- .../gui/workflow/config/ConfigManipulator.java | 4 +++- .../gui/workflow/config/ConfigProvider.java | 2 ++ .../gui/workflow/config/ConfigProviderImpl.java | 27 ++++++++++++---------- .../workflow/config/PersistentConfigProvider.java | 4 +++- 6 files changed, 35 insertions(+), 16 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 17a9a8d7..1fa31abb 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -41,8 +41,9 @@ public class Constants { public static final String APP_NAME_VERSION = (APP_VERSION == null ? APP_NAME : APP_NAME + " v" + APP_VERSION); //$NON-NLS-1$ public static final String SIGNATURE_PROFILE = "SIGNATURE_PROFILE"; //$NON-NLS-1$ + public static final String DEFAULT_POSTFIX = "_signed"; - static { + static { // Has to be set before (implicitly) initializing Display Display.setAppName(APP_NAME); } @@ -209,6 +210,8 @@ public class Constants { /** The output folder config parameter */ public static final String CFG_OUTPUT_FOLDER = "OUTPUT_FOLDER"; //$NON-NLS-1$ + public static final String CFG_POSTFIX = "SAVE_FILE_POSTFIX"; + /** The main window size (Format: width,height) */ public static final String CFG_MAINWINDOW_SIZE = "MAINWINDOW_SIZE"; //$NON-NLS-1$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index 0cb26983..8ed1b640 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -869,6 +869,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.configurationContainer.setKeyStoreEnabled(provider.getKeyStoreEnabledPersistent()); this.configurationContainer.setOutputFolder(provider.getDefaultOutputFolderPersistent()); + this.configurationContainer.setSaveFilePostFix(provider.getSaveFilePostFix()); this.configurationContainer.setLocale(provider.getLocale()); @@ -899,6 +900,12 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { if (outputFolder != null) { performOutputFolderChanged(outputFolder); } + String postFix = this.configurationContainer.getSaveFilePostFix(); + if (postFix != null) { + performPostFixChanged(postFix); + } else { + performPostFixChanged(Constants.DEFAULT_POSTFIX); + } SignaturePosition pos = this.configurationContainer.getDefaultSignaturePosition(); performPositionSelection(pos != null && pos.useAutoPositioning()); performUseMarkerSelection(this.configurationContainer.getUseMarker()); @@ -963,7 +970,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { store.setKeyStoreEnabled(this.configurationContainer.getKeyStoreEnabled()); store.setDefaultOutputFolder(this.configurationContainer.getOutputFolder()); - + store.setSaveFilePostFix(this.configurationContainer.getSaveFilePostFix()); store.setLocale(this.configurationContainer.getLocale()); store.setUpdateCheck(this.configurationContainer.getUpdateCheck()); 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 3aba5075..befb244b 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 @@ -201,7 +201,9 @@ public interface ConfigManipulator { /** * @param profile */ - void setSignatureProfile(String profile); + public void setSignatureProfile(String profile); + + public void setSaveFilePostFix(String postFix); } 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 efe0a83b..b6935206 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 @@ -276,6 +276,8 @@ public interface ConfigProvider { * @return */ public String getSignatureProfile(); + + public String getSaveFilePostFix(); } 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 92a64103..9dc19be4 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 @@ -114,6 +114,8 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, setDefaultOutputFolder(config .getProperty(Constants.CFG_OUTPUT_FOLDER)); + setSaveFilePostFix(config.getProperty(Constants.CFG_POSTFIX)); + String localeString = config.getProperty(Constants.CFG_LOCALE); Locale targetLocale = LocaleSerializer.parseFromString(localeString); @@ -351,6 +353,7 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, props.setProperty(Constants.CFG_SIGNATURE_NOTE, getSignatureNote()); props.setProperty(Constants.CFG_MOBILE_NUMBER, getDefaultMobileNumberPersistent()); props.setProperty(Constants.CFG_OUTPUT_FOLDER, getDefaultOutputFolderPersistent()); + props.setProperty(Constants.CFG_POSTFIX, getSaveFilePostFix()); props.setProperty(Constants.CFG_SIGNATURE_PLACEHOLDER_TRANSPARENCY, Integer.toString(getPlaceholderTransparency())); @@ -985,16 +988,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, } } - - /*@Override - public void setDefaultDownloadURL(String downloadURL) { - if (downloadURL == null || downloadURL.trim().isEmpty()) { - this.configuration.setDownloadURL(Constants.CERTIFICATE_DOWNLOAD_XML_URL+Constants.CERTIFICATE_XML_FILE); - } else { - this.configuration.setDownloadURL(downloadURL); - } - } - /* (non-Javadoc) * @see at.asit.pdfover.gui.workflow.ConfigOverlayManipulator#setDefaultOutputFolderOverlay(java.lang.String) */ @@ -1510,8 +1503,18 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, public void setSignatureProfile(String profile) { this.configurationOverlay.setSignatureProfile(Profile.getProfile(profile)); } - - @Override + + @Override + public void setSaveFilePostFix(String postFix) { + this.configurationOverlay.setSaveFilePostFix(postFix); + } + + @Override + public String getSaveFilePostFix(){ + return this.configurationOverlay.getSaveFilePostFix(); + } + + @Override public String getSignatureProfile() { return this.configurationOverlay.getSignatureProfile().getName(); } 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 3304b6ca..1175ca9a 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 @@ -204,5 +204,7 @@ public interface PersistentConfigProvider { * * @return the signature profile */ - public String getSignatureProfile(); + public String getSignatureProfile(); + + public String getSaveFilePostFix(); } -- cgit v1.2.3 From a224ce26811102d97ab02a33f3befcba311e0a62 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 20 Nov 2020 07:40:57 +0100 Subject: Updated update URL and download url --- pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java index 1fa31abb..105eedd5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Constants.java @@ -109,10 +109,10 @@ public class Constants { public static final String USER_AGENT_STRING = "PDF-Over " + (APP_VERSION == null ? "4.3" : APP_VERSION); //$NON-NLS-1$ //$NON-NLS-2$ /** Current release file */ - public static final String CURRENT_RELEASE_URL = "http://webstart.buergerkarte.at/PDF-Over/Release.txt"; //$NON-NLS-1$ + public static final String CURRENT_RELEASE_URL = "https://updates.a-sit.at/pdf-over/Release.txt"; //$NON-NLS-1$ /** Update URL */ - public static final String UPDATE_URL = "http://webstart.buergerkarte.at/PDF-Over/"; //$NON-NLS-1$ + public static final String UPDATE_URL = "https://technology.a-sit.at/en/pdf-over/"; //$NON-NLS-1$ /** True */ public static final String TRUE = "true"; //$NON-NLS-1$ -- cgit v1.2.3