From 62fb9bc1e350bfda25463899cf4fb06253763c0c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 27 Mar 2020 14:42:17 +0100 Subject: ... --- .../at/asit/pdfover/gui/composites/PositioningComposite.java | 1 + .../at/asit/pdfover/gui/utils/CertificateDownloadSource.java | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 7f42db8f..22d18f2d 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -310,6 +310,7 @@ public class PositioningComposite extends StateComposite { if (e.getWheelRotation() < 0) { if (PositioningComposite.this.currentPage > 1) + System.out.println("################## page " + newPage); newPage--; } else if (e.getWheelRotation() > 0) { if (PositioningComposite.this.currentPage < PositioningComposite.this.numPages) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java index ad4fa70e..6ce5b176 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java @@ -85,7 +85,7 @@ public class CertificateDownloadSource { - if (!cp.getProxyHost().equals("")) { + if (!cp.getProxyHost().equals("")) { //$NON-NLS-1$ log.info("Found PDF-Over Host settings: "+cp.getProxyHost().toString()); //$NON-NLS-1$ try{ @@ -103,7 +103,7 @@ public class CertificateDownloadSource { {log.info("Illegal Argument for Proxy and/or Host)");} //$NON-NLS-1$ } else { - log.info("Opening default connection"); + log.info("Opening default connection"); //$NON-NLS-1$ connection = url.openConnection(); } @@ -131,7 +131,7 @@ public class CertificateDownloadSource { Document doc = dBuilder.newDocument(); // root element - Node rootElement = doc.createElement("certificates"); + Node rootElement = doc.createElement("certificates"); //$NON-NLS-1$ doc.appendChild(rootElement); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); @@ -169,7 +169,7 @@ public class CertificateDownloadSource { Node certificates_added = doc_added.getFirstChild(); NodeList certificates_added_list = certificates_added.getChildNodes(); - log.info("===== Starting to download accepted certificates ====="); + log.info("===== Starting to download accepted certificates ====="); //$NON-NLS-1$ // identify the certificate that has to be downloaded for (int i = 0; i < certificates_added_list.getLength(); i++) { @@ -187,7 +187,7 @@ public class CertificateDownloadSource { } URLConnection connection; - if (!certificateNode.getTextContent().equals("")) { + if (!certificateNode.getTextContent().equals("")) { //$NON-NLS-1$ String certResource = Constants.CERTIFICATE_DOWNLOAD_XML_URL + certificateNode.getTextContent(); URL url = new URL(certResource); -- cgit v1.2.3 From 0d7f6f56d7a359d6d67763000712dd6b153f741f Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Wed, 13 May 2020 15:49:20 +0200 Subject: sms tan --- .../src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java | 2 +- .../at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java index 4c8b42e8..fe91dfa9 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/bku/mobile/ATrustStatus.java @@ -245,7 +245,7 @@ public class ATrustStatus extends AbstractMobileBKUStatusImpl { * @return the smsTan */ public boolean isSmsTan() { - return smsTan; + return this.smsTan; } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java index f49ebdc4..f10ea855 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java @@ -360,6 +360,8 @@ public class MobileBKUEnterNumberComposite extends StateComposite { public String getMobilePassword() { return this.mobilePassword; } + + /** * @param mobilePassword -- cgit v1.2.3 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 --- .../main/java/at/asit/pdfover/gui/Constants.java | 2 + .../gui/composites/ConfigurationComposite.java | 2 + .../composites/SimpleConfigurationComposite.java | 96 ++++++++++++++++++++-- .../workflow/config/ConfigurationContainer.java | 6 ++ .../config/ConfigurationContainerImpl.java | 8 ++ 5 files changed, 106 insertions(+), 8 deletions(-) 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$ diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index 7396a6b0..dc88834b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -173,6 +173,7 @@ public class ConfigurationComposite extends StateComposite { this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE); this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + System.out.println(Messages.getString("config.Simple")); ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); @@ -188,6 +189,7 @@ public class ConfigurationComposite extends StateComposite { this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE); this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ + System.out.print(Messages.getString("config.Advanced")); ScrolledComposite advancedCompositeScr = new ScrolledComposite( this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); 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 e54b4a59..c3e4a138 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 @@ -113,6 +113,11 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { String logoFile; Image sigPreview = null; Image logo = null; + + private final Group grpSingnatureProfile; + private final Label lblSignatureProfile; + private final Combo cmbSingatureProfiles; + /** * @param parent @@ -198,12 +203,80 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { processNumberChanged(); } }); + + + //----------------------------------------------------------------------- + + this.grpSingnatureProfile = 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.lblSignatureProfile = new Label(this.grpSingnatureProfile, SWT.NONE); + + FontData[] fD_grpSingnatureProfile = this.grpSingnatureProfile.getFont() + .getFontData(); + fD_grpSingnatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.grpSingnatureProfile.setFont(new Font(Display.getCurrent(), + fD_grpSingnatureProfile[0])); + + // TODO create text for each language + 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])); + + this.cmbSingatureProfiles = new Combo(this.grpSingnatureProfile, SWT.READ_ONLY); + FormData fd_cmbSingatureProfiles = new FormData(); + fd_cmbSingatureProfiles.left = new FormAttachment(this.grpSingnatureProfile, 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); + + 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]; + } + this.cmbSignatureLang.setItems(profiles); + this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + Locale currentLocale = SimpleConfigurationComposite.this.configurationContainer + .getSignatureLocale(); + String selectedLocale = Constants. + SUPPORTED_PROFILES[SimpleConfigurationComposite.this.cmbSignatureLang + .getSelectionIndex()]; + if (!currentLocale.equals(selectedLocale)) { + performSignatureLangSelectionChanged(selectedLocale, currentLocale); + } + } + }); + + + //------------------------------------------------------------------------ + this.grpLogo = new Group(this, SWT.NONE); 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.grpHandySignatur, 5); + fd_grpBildmarke.top = new FormAttachment(this.grpSingnatureProfile, 5); this.grpLogo.setLayoutData(fd_grpBildmarke); this.grpLogo.setLayout(new FormLayout()); @@ -411,16 +484,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 i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) { +// localeSignStrings[i] = Constants.SUPPORTED_LOCALES[i].getDisplayLanguage(); +// } this.cmbSignatureLang.setItems(localeSignStrings); this.cmbSignatureLang.addSelectionListener(new SelectionAdapter() { @Override @@ -704,6 +777,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { processSignatureNoteChanged(); } } + } + + private void preformProfileSelectionChanged(String selected, String previous) { + + + + } /* 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 d5976b3c..668c8cb7 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 @@ -412,4 +412,10 @@ public interface ConfigurationContainer { * @return boolean */ public boolean getEnablePlaceholderUsage(); + + + /** + * @return selected signature profile as string + */ + public String 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 8269cb0b..e6b168dc 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 @@ -144,6 +144,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { /** Either QR-Code or signature fields as marker */ protected boolean useSignatureFields = false; + + /** The Signature Profile */ + protected String signatureProfile = "Normal"; //$NON-NLS-1$ /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() @@ -723,4 +726,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { return this.enabledPlaceholderUsage; } + @Override + public String getSignatureProfile() { + return this.signatureProfile; + } + } -- 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(-) 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 a27fdd91c4ba25f7d99c8c916fc7b8cdfc8a2f13 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Tue, 10 Nov 2020 09:46:16 +0100 Subject: Not showing combo fixed --- .../composites/SimpleConfigurationComposite.java | 23 ++++++---------------- 1 file changed, 6 insertions(+), 17 deletions(-) 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 b3925775..00df4a99 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 @@ -119,6 +119,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { // private final Label lblSignatureProfile; private final Combo cmbSingatureProfiles; + /** @@ -210,32 +211,21 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { //----------------------------------------------------------------------- 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.grpSignatureProfile.setLayoutData(fd_grpSingnatureProfile); - //this.grpSignatureProfile.setLayout(new GridLayout(2, false)); +// this.grpSignatureProfile.setLayout(new GridLayout(2, false)); this.grpSignatureProfile.setText("Signature Profile"); //$NON-NLS-1$ - - -// this.lblSignatureProfile = new Label(this.grpSignatureProfile, SWT.NONE); -// + this.grpSignatureProfile.setLayout(new FormLayout()); + FontData[] fD_grpSignatureProfile = this.grpSignatureProfile.getFont() .getFontData(); 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$ -// -// 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); @@ -246,11 +236,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_cmbSingatureProfiles.bottom = new FormAttachment(100, -10); this.cmbSingatureProfiles.setLayoutData(fd_cmbSingatureProfiles); - - FontData[] fD_cmbSignatureProfile = this.grpSignatureProfile.getFont() + FontData[] fD_cmbSignatureProfile = this.cmbSingatureProfiles.getFont() .getFontData(); fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpSignatureProfile.setFont(new Font(Display.getCurrent(), + this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); String[] profiles = new String[PROFILE.length]; -- 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(-) 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(-) 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 0b920b2d10e7844f4ba2f02e0191438808d8d4e0 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Wed, 11 Nov 2020 15:32:36 +0100 Subject: fixed bug in configuration --- .../composites/AdvancedConfigurationComposite.java | 180 ++------------------- .../composites/SimpleConfigurationComposite.java | 43 +++-- .../gui/workflow/config/ConfigProviderImpl.java | 1 + .../config/ConfigurationContainerImpl.java | 5 +- 4 files changed, 39 insertions(+), 190 deletions(-) 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 fe4cfc28..e9ed5316 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,6 +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.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; import at.asit.pdfover.gui.controls.Dialog.BUTTONS; @@ -113,12 +114,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { private Label lblProxyPort; private Text txtProxyPort; private ErrorMarker txtProxyPortErrorMarker; -// private Label lblProxyUser; -// private Text txtProxyUser; -// private ErrorMarker proxyUserErrorMarker; -// private Label lblProxyPass; -// private Text txtProxyPass; -// private ErrorMarker proxyPassErrorMarker; FormData fd_txtProxyPort; FormData fd_txtProxyPortErrorMarker; @@ -719,119 +714,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { processProxyPortChanged(); } }); - -// this.lblProxyUser = new Label(this.grpProxy, SWT.NONE); -// GridData gd_lblProxyUser = new GridData(SWT.LEFT, SWT.CENTER, false, -// false, 1, 1); -// gd_lblProxyUser.widthHint = 80; -// this.lblProxyUser.setLayoutData(gd_lblProxyUser); -// this.lblProxyUser.setBounds(0, 0, 57, 15); -// -// FontData[] fD_lblProxyUser = this.lblProxyUser.getFont().getFontData(); -// fD_lblProxyUser[0].setHeight(Constants.TEXT_SIZE_NORMAL); -// this.lblProxyUser.setFont(new Font(Display.getCurrent(), -// fD_lblProxyUser[0])); -// -// Composite compProxyUserContainer = new Composite(this.grpProxy, SWT.NONE); -// compProxyUserContainer.setLayout(new FormLayout()); -// compProxyUserContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, -// 1, 1)); -// this.txtProxyUser = new Text(compProxyUserContainer, SWT.BORDER); -// FormData fd_txtProxyUser = new FormData(); -// fd_txtProxyUser.right = new FormAttachment(100, -42); -// fd_txtProxyUser.top = new FormAttachment(0); -// fd_txtProxyUser.left = new FormAttachment(0, 5); -// -// FontData[] fD_txtProxyUser = this.txtProxyUser.getFont().getFontData(); -// fD_txtProxyUser[0].setHeight(Constants.TEXT_SIZE_NORMAL); -// this.txtProxyUser.setFont(new Font(Display.getCurrent(), -// fD_txtProxyUser[0])); -// -// this.proxyUserErrorMarker = new ErrorMarker(compProxyUserContainer, SWT.NONE, ""); //$NON-NLS-1$ -// -// FormData fd_proxyUserErrorMarker = new FormData(); -// fd_proxyUserErrorMarker.left = new FormAttachment(100, -32); -// fd_proxyUserErrorMarker.right = new FormAttachment(100); -// fd_proxyUserErrorMarker.top = new FormAttachment(0); -// fd_proxyUserErrorMarker.bottom = new FormAttachment(0, 32); -// -// this.proxyUserErrorMarker.setLayoutData(fd_proxyUserErrorMarker); -// this.proxyUserErrorMarker.setVisible(false); -// this.txtProxyUser.setLayoutData(fd_txtProxyUser); -// -// this.txtProxyUser.addFocusListener(new FocusAdapter() { -// -// @Override -// public void focusLost(FocusEvent e) { -// processProxyUserChanged(); -// } -// }); -// -// this.txtProxyUser.addTraverseListener(new TraverseListener() { -// -// @Override -// public void keyTraversed(TraverseEvent e) { -// if (e.detail == SWT.TRAVERSE_RETURN) { -// processProxyUserChanged(); -// } -// } -// }); -// -// this.lblProxyPass = new Label(this.grpProxy, SWT.NONE); -// this.lblProxyPass.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, -// false, false, 1, 1)); -// this.lblProxyPass.setBounds(0, 0, 57, 15); -// -// FontData[] fD_lblProxyPass = this.lblProxyPass.getFont().getFontData(); -// fD_lblProxyPass[0].setHeight(Constants.TEXT_SIZE_NORMAL); -// this.lblProxyPass.setFont(new Font(Display.getCurrent(), -// fD_lblProxyPass[0])); -// -// Composite compProxyPassContainer = new Composite(this.grpProxy, SWT.NONE); -// compProxyPassContainer.setLayout(new FormLayout()); -// compProxyPassContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, -// 1, 1)); -// this.txtProxyPass = new Text(compProxyPassContainer, SWT.PASSWORD | SWT.BORDER); -// FormData fd_txtProxyPass = new FormData(); -// fd_txtProxyPass.right = new FormAttachment(100, -42); -// fd_txtProxyPass.top = new FormAttachment(0); -// fd_txtProxyPass.left = new FormAttachment(0, 5); -// -// FontData[] fD_txtProxyPass = this.txtProxyPass.getFont().getFontData(); -// fD_txtProxyPass[0].setHeight(Constants.TEXT_SIZE_NORMAL); -// this.txtProxyPass.setFont(new Font(Display.getCurrent(), -// fD_txtProxyPass[0])); -// -// this.proxyPassErrorMarker = new ErrorMarker(compProxyPassContainer, SWT.NONE, ""); //$NON-NLS-1$ -// -// FormData fd_proxyPassErrorMarker = new FormData(); -// fd_proxyPassErrorMarker.left = new FormAttachment(100, -32); -// fd_proxyPassErrorMarker.right = new FormAttachment(100); -// fd_proxyPassErrorMarker.top = new FormAttachment(0); -// fd_proxyPassErrorMarker.bottom = new FormAttachment(0, 32); -// -// this.proxyPassErrorMarker.setLayoutData(fd_proxyPassErrorMarker); -// this.proxyPassErrorMarker.setVisible(false); -// this.txtProxyPass.setLayoutData(fd_txtProxyPass); -// -// this.txtProxyPass.addFocusListener(new FocusAdapter() { -// -// @Override -// public void focusLost(FocusEvent e) { -// processProxyPassChanged(); -// } -// }); -// -// this.txtProxyPass.addTraverseListener(new TraverseListener() { -// -// @Override -// public void keyTraversed(TraverseEvent e) { -// if (e.detail == SWT.TRAVERSE_RETURN) { -// processProxyPassChanged(); -// } -// } -// }); - reloadResources(); } @@ -990,44 +872,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.configurationContainer.setProxyHost(host); } -// void processProxyUserChanged() { -// try { -// this.proxyUserErrorMarker.setVisible(false); -// plainProxyUserSetter(); -// } catch (Exception ex) { -// this.proxyUserErrorMarker.setVisible(true); -// this.proxyUserErrorMarker.setToolTipText(ex.getMessage()); -// log.error("processProxyUser: ", ex); //$NON-NLS-1$ -// } -// } -// -// /** -// * -// */ -// private void plainProxyUserSetter() { -// String user = this.txtProxyUser.getText(); -// this.configurationContainer.setProxyUser(user); -// } -// -// void processProxyPassChanged() { -// try { -// this.proxyPassErrorMarker.setVisible(false); -// plainProxyPassSetter(); -// } catch (Exception ex) { -// this.proxyPassErrorMarker.setVisible(true); -// this.proxyPassErrorMarker.setToolTipText(ex.getMessage()); -// log.error("processProxyPass: ", ex); //$NON-NLS-1$ -// } -// } -// -// /** -// * -// */ -// private void plainProxyPassSetter() { -// String pass = this.txtProxyPass.getText(); -// this.configurationContainer.setProxyPass(pass); -// } - void processProxyPortChanged() { try { this.txtProxyPortErrorMarker.setVisible(false); @@ -1109,6 +953,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { provider.getProxyUserPersistent()); this.configurationContainer.setProxyPass( provider.getProxyPassPersistent()); + this.configurationContainer.setSignatureProfile(PROFILE.getProfile(provider.getSignatureProfile())); } /* @@ -1136,6 +981,8 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { performPdfACompatSelection(this.configurationContainer.getSignaturePdfACompat()); performKeystoreEnabledSelection(this.configurationContainer.getKeyStoreEnabled()); performUpdateCheckSelection(this.configurationContainer.getUpdateCheck()); + performSetSignatureProfile(this.configurationContainer.getSignatureProfile()); + int port = this.configurationContainer.getProxyPort(); if (port > 0) { @@ -1146,19 +993,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { if (host != null) { this.txtProxyHost.setText(host); } - - /*String user = this.configurationContainer.getProxyUser(); - if (user != null) { - this.txtProxyUser.setText(user); - } - - String pass = this.configurationContainer.getProxyPass(); - if (pass != null) { - this.txtProxyPass.setText(pass); - }*/ + } + /** + * @param profile + * + */ + public void performSetSignatureProfile(PROFILE profile) { + this.configurationContainer.setSignatureProfile(profile); + } + /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration(at.asit.pdfover.gui.workflow.config.ConfigManipulator, at.asit.pdfover.gui.workflow.config.PersistentConfigProvider) */ 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 147f17eb..4e18cd52 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 @@ -91,32 +91,32 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { private Group grpHandySignatur; private Label lblMobileNumber; - Text txtMobileNumber; - FormData fd_txtMobileNumber; - ErrorMarker txtMobileNumberErrorMarker; - FormData fd_txtMobileNumberErrorMarker; + protected Text txtMobileNumber; + protected FormData fd_txtMobileNumber; + protected ErrorMarker txtMobileNumberErrorMarker; + protected FormData fd_txtMobileNumberErrorMarker; private Group grpLogo; private Canvas cLogo; private Label lblDropLogo; - Button btnClearImage; + protected Button btnClearImage; private Button btnBrowseLogo; - Canvas cSigPreview; + protected Canvas cSigPreview; private Group grpSignatureNote; private Label lblSignatureNote; - Text txtSignatureNote; + protected Text txtSignatureNote; private Button btnSignatureNoteDefault; - private Group grpSignatureLang; - Combo cmbSignatureLang; + protected final Group grpSignatureLang; + protected final Combo cmbSignatureLang; - String logoFile; - Image sigPreview = null; - Image logo = null; + protected String logoFile = null; + protected Image sigPreview = null; + protected Image logo = null; - private final Group grpSignatureProfile; - private final Combo cmbSingatureProfiles; + protected final Group grpSignatureProfile; + protected final Combo cmbSingatureProfiles; @@ -205,10 +205,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { processNumberChanged(); } }); - - - //----------------------------------------------------------------------- - + this.grpSignatureProfile = new Group(this, SWT.NONE); FormData fd_grpSingnatureProfile = new FormData(); fd_grpSingnatureProfile.right = new FormAttachment(100, -5); @@ -240,8 +237,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); this.cmbSingatureProfiles.setItems(PROFILE.getProfileStrings()); - this.configurationContainer.getSignatureProfile(); - this.cmbSingatureProfiles.select(this.configurationContainer.getSignatureProfile().ordinal()); + //this.cmbSingatureProfiles.select(this.configurationContainer.getSignatureProfile().ordinal()); this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -324,7 +320,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { FormData fd_lbl_drop = new FormData(); fd_lbl_drop.left = new FormAttachment(0, 20); fd_lbl_drop.right = new FormAttachment(100, -20); - // fd_lbl_drop.top = new FormAttachment(50, -20); fd_lbl_drop.bottom = new FormAttachment(this.btnBrowseLogo, -20); this.lblDropLogo.setLayoutData(fd_lbl_drop); @@ -762,8 +757,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } void preformProfileSelectionChanged(PROFILE selected) { - log.debug("Signature Profile {0} was selected", selected.getName()); + log.debug("Signature Profile {} was selected", selected.getName()); //$NON-NLS-1$ this.configurationContainer.setSignatureProfile(selected); + this.cmbSingatureProfiles.select(selected.ordinal()); } /* @@ -871,6 +867,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.setVisibleImage(); this.performSignatureLangSelectionChanged(this.configurationContainer.getSignatureLocale(), null); + + this.preformProfileSelectionChanged(this.configurationContainer.getSignatureProfile()); + } /* (non-Javadoc) 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 b6acb392..f1461809 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 @@ -145,6 +145,7 @@ 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)); } String compat = config.getProperty(Constants.CFG_SIGNATURE_PDFA_COMPAT); 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 3f0021f7..32b5ece3 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; + protected PROFILE signatureProfile = null; /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() @@ -730,6 +730,9 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { @Override public PROFILE getSignatureProfile() { + if (this.signatureProfile == null) { + this.signatureProfile = PROFILE.SIGNATUREBLOCK_NORMAL; + } return this.signatureProfile; } -- 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(-) 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 9e89577de5f2421085bab9b8466007cb4b229e1b Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 09:55:18 +0100 Subject: removed old settings --- pdf-over-gui/.classpath | 89 ----------------- pdf-over-gui/.project | 21 ---- .../.settings/org.eclipse.core.resources.prefs | 7 -- pdf-over-gui/.settings/org.eclipse.jdt.core.prefs | 110 --------------------- pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs | 3 - pdf-over-gui/.settings/org.eclipse.m2e.core.prefs | 5 - .../.settings/org.eclipse.mylyn.tasks.ui.prefs | 4 - pdf-over-signator/.classpath | 40 -------- pdf-over-signator/.project | 18 ---- .../.settings/org.eclipse.core.resources.prefs | 6 -- .../.settings/org.eclipse.jdt.core.prefs | 95 ------------------ .../.settings/org.eclipse.jdt.ui.prefs | 3 - .../.settings/org.eclipse.m2e.core.prefs | 5 - .../.settings/org.eclipse.mylyn.tasks.ui.prefs | 4 - pdf-over-signer/pdf-over-sigpdfas4/.classpath | 56 ----------- pdf-over-signer/pdf-over-sigpdfas4/.project | 20 ---- .../.settings/org.eclipse.core.resources.prefs | 6 -- .../.settings/org.eclipse.jdt.core.prefs | 95 ------------------ .../.settings/org.eclipse.jdt.ui.prefs | 3 - .../.settings/org.eclipse.m2e.core.prefs | 5 - .../.settings/org.eclipse.mylyn.tasks.ui.prefs | 4 - 21 files changed, 599 deletions(-) delete mode 100644 pdf-over-gui/.classpath delete mode 100644 pdf-over-gui/.project delete mode 100644 pdf-over-gui/.settings/org.eclipse.core.resources.prefs delete mode 100644 pdf-over-gui/.settings/org.eclipse.jdt.core.prefs delete mode 100644 pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 pdf-over-gui/.settings/org.eclipse.m2e.core.prefs delete mode 100644 pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs delete mode 100644 pdf-over-signator/.classpath delete mode 100644 pdf-over-signator/.project delete mode 100644 pdf-over-signator/.settings/org.eclipse.core.resources.prefs delete mode 100644 pdf-over-signator/.settings/org.eclipse.jdt.core.prefs delete mode 100644 pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 pdf-over-signator/.settings/org.eclipse.m2e.core.prefs delete mode 100644 pdf-over-signator/.settings/org.eclipse.mylyn.tasks.ui.prefs delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.classpath delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.project delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.core.resources.prefs delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.m2e.core.prefs delete mode 100644 pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.mylyn.tasks.ui.prefs diff --git a/pdf-over-gui/.classpath b/pdf-over-gui/.classpath deleted file mode 100644 index e070f335..00000000 --- a/pdf-over-gui/.classpath +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pdf-over-gui/.project b/pdf-over-gui/.project deleted file mode 100644 index d378d8d3..00000000 --- a/pdf-over-gui/.project +++ /dev/null @@ -1,21 +0,0 @@ - - - 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.core.resources.prefs b/pdf-over-gui/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 3ce90f38..00000000 --- a/pdf-over-gui/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,7 +0,0 @@ -#Fri Aug 03 17:20:36 CEST 2012 -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 -encoding/=UTF-8 diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index dc8993fb..00000000 --- a/pdf-over-gui/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,110 +0,0 @@ -#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.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.finalParameterBound=warning -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.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.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.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -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.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.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.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=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.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 diff --git a/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs b/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 05288cb4..00000000 --- a/pdf-over-gui/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs b/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 22a219d4..00000000 --- a/pdf-over-gui/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Aug 02 12:06:01 CEST 2012 -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs b/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs deleted file mode 100644 index 9d4b915d..00000000 --- a/pdf-over-gui/.settings/org.eclipse.mylyn.tasks.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Aug 03 18:56:11 CEST 2012 -eclipse.preferences.version=1 -project.repository.kind=jira -project.repository.url=http\://jira.egovlabs.gv.at diff --git a/pdf-over-signator/.classpath b/pdf-over-signator/.classpath deleted file mode 100644 index 162d2a38..00000000 --- a/pdf-over-signator/.classpath +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pdf-over-signator/.project b/pdf-over-signator/.project deleted file mode 100644 index 221f31bc..00000000 --- a/pdf-over-signator/.project +++ /dev/null @@ -1,18 +0,0 @@ - - - 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.core.resources.prefs b/pdf-over-signator/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 29abf999..00000000 --- a/pdf-over-signator/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,6 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 -encoding/=UTF-8 diff --git a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs b/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5f860d69..00000000 --- a/pdf-over-signator/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,95 +0,0 @@ -#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.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.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.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=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.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.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -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.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.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.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.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=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.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 diff --git a/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs b/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 05288cb4..00000000 --- a/pdf-over-signator/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/pdf-over-signator/.settings/org.eclipse.m2e.core.prefs b/pdf-over-signator/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 031daaa1..00000000 --- a/pdf-over-signator/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Aug 02 12:30:29 CEST 2012 -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/pdf-over-signator/.settings/org.eclipse.mylyn.tasks.ui.prefs b/pdf-over-signator/.settings/org.eclipse.mylyn.tasks.ui.prefs deleted file mode 100644 index c50cb4e0..00000000 --- a/pdf-over-signator/.settings/org.eclipse.mylyn.tasks.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Aug 03 18:56:19 CEST 2012 -eclipse.preferences.version=1 -project.repository.kind=jira -project.repository.url=http\://jira.egovlabs.gv.at diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.classpath b/pdf-over-signer/pdf-over-sigpdfas4/.classpath deleted file mode 100644 index bcc28deb..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.classpath +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.project b/pdf-over-signer/pdf-over-sigpdfas4/.project deleted file mode 100644 index 882b34b9..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.project +++ /dev/null @@ -1,20 +0,0 @@ - - - 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.core.resources.prefs b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 29abf999..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,6 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/main/java=UTF-8 -encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 -encoding//src/test/resources=UTF-8 -encoding/=UTF-8 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 deleted file mode 100644 index 086b272b..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,95 +0,0 @@ -#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.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.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.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.fieldHiding=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.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.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -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.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.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.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.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=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.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 diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.ui.prefs b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 05288cb4..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.ui.javadoc=true -org.eclipse.jdt.ui.text.custom_code_templates= diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.m2e.core.prefs b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.m2e.core.prefs deleted file mode 100644 index 62e91186..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.m2e.core.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Thu Aug 02 12:33:52 CEST 2012 -activeProfiles= -eclipse.preferences.version=1 -resolveWorkspaceProjects=true -version=1 diff --git a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.mylyn.tasks.ui.prefs b/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.mylyn.tasks.ui.prefs deleted file mode 100644 index c6aa7359..00000000 --- a/pdf-over-signer/pdf-over-sigpdfas4/.settings/org.eclipse.mylyn.tasks.ui.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Fri Aug 03 18:56:31 CEST 2012 -eclipse.preferences.version=1 -project.repository.kind=jira -project.repository.url=http\://jira.egovlabs.gv.at -- cgit v1.2.3 From 1eddc2b51034df2ce3e814c297311e27dccacee1 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 14:13:18 +0100 Subject: fixed problem handing over the selected profile to pdf-as4 signer --- .../gui/composites/SimpleConfigurationComposite.java | 14 ++++++++++++-- .../pdfover/gui/workflow/states/PrepareSigningState.java | 4 +++- .../at/asit/pdfover/signator/SignatureParameter.java | 5 +++++ .../pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 16 +++++++++++++++- .../java/at/asit/pdfover/signer/pdfas/PdfAs4Signer.java | 2 +- 5 files changed, 36 insertions(+), 5 deletions(-) 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 4e18cd52..26f67da3 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 @@ -663,8 +663,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { try { if (this.signer != null) { - SignatureParameter param = this.signer.getPDFSigner() - .newParameter(); + SignatureParameter param = this.signer.getPDFSigner().newParameter(); if(this.configurationContainer.getSignatureNote() != null && !this.configurationContainer.getSignatureNote().isEmpty()) { param.setProperty("SIG_NOTE", this.configurationContainer.getSignatureNote()); //$NON-NLS-1$ } @@ -762,6 +761,16 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.cmbSingatureProfiles.select(selected.ordinal()); } + void setSignatureProfileSetting(){ + try { + SignatureParameter param = this.signer.getPDFSigner().newParameter(); + param.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName()); + + } catch (Exception e){ + log.debug("Cannot save siganture profile" + e.getMessage()); + } + } + /* * (non-Javadoc) * @@ -771,6 +780,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { @Override protected void signerChanged() { this.setVisibleImage(); + this.setSignatureProfileSetting(); } /** diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index f9827ba4..9d17a3e8 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -166,6 +166,8 @@ public class PrepareSigningState extends State { this.state.signatureParameter .setSignaturePdfACompat(configuration.getSignaturePdfACompat()); + this.state.signatureParameter.setSignatureProfile(configuration.getSignatureProfile()); + this.state.signingState = this.state.signer .prepare(this.state.signatureParameter); @@ -199,7 +201,7 @@ public class PrepareSigningState extends State { at.asit.pdfover.signator.SigningState signingState = null; - Signer signer; + Signer signer; Exception threadException = null; diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java index c52370d4..edf50b23 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java @@ -221,4 +221,9 @@ public abstract class SignatureParameter { * @return associated value */ public abstract String getProperty(String key); + + + public abstract void setSignatureProfile(String profile); + + public abstract String getSignatureProfile(); } 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 38a2bc8f..aed66b9b 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 @@ -68,6 +68,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { **/ static final Logger log = LoggerFactory .getLogger(PdfAs4SignatureParameter.class); + private String profile; /* (non-Javadoc) * @see at.asit.pdfover.signator.SignatureParameter#getPlaceholderDimension() @@ -164,7 +165,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; @@ -191,4 +192,17 @@ public class PdfAs4SignatureParameter extends SignatureParameter { log.debug("Profile ID: " + profileId); return profileId; } + + @Override + public void setSignatureProfile(String profile) { + this.profile = profile; + } + + @Override + public String getSignatureProfile() { + return this.profile; + } } + + + 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 a729f65b..5c4782ba 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 @@ -91,7 +91,7 @@ public class PdfAs4Signer implements Signer { 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(-) 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 400529060ae22fb9741ff7eb1c0ce81807b2d5f5 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 12 Nov 2020 14:50:02 +0100 Subject: Implemented invisbile sigantures visability --- .../at/asit/pdfover/signator/SignatureParameter.java | 1 + .../pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java index edf50b23..b03790b3 100644 --- a/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java +++ b/pdf-over-signator/src/main/java/at/asit/pdfover/signator/SignatureParameter.java @@ -226,4 +226,5 @@ public abstract class SignatureParameter { public abstract void setSignatureProfile(String profile); public abstract String getSignatureProfile(); + } 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 aed66b9b..57f36fbd 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 @@ -166,30 +166,28 @@ public class PdfAs4SignatureParameter extends SignatureParameter { boolean useNote = (getProperty("SIG_NOTE") != null); boolean usePdfACompat = (getSignaturePdfACompat()); - //Add Signature Param here// String profileId; - if (PROFILE_VISIBILITY) - { - profileId = PROFILE_ID_BASE; - profileId += (lang != null && lang.equals("en")) ? - PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE;} - - else + if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar")) { profileId ="INVISIBLE"; + } else { + profileId = PROFILE_ID_BASE; + profileId += (lang != null && lang.equals("en")) ? + PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; } + if (useNote) profileId += PROFILE_ID_NOTE; if (usePdfACompat) profileId += PROFILE_ID_PDFA; - log.debug("Profile ID: " + profileId); + log.debug("Profile ID: {0}", profileId); return profileId; } @@ -202,6 +200,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { public String getSignatureProfile() { return this.profile; } + } -- 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(-) 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 a43f3b3f266a63a505ae866a2378f01e5b508cc9 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 12:18:13 +0100 Subject: new module pdf-over-commons added --- .gitignore | 3 ++- pdf-over-commons/pdf-over-commons.iml | 15 +++++++++++++++ pdf-over-commons/pom.xml | 15 +++++++++++++++ .../composites/SimpleConfigurationComposite.java | 2 +- .../signer/pdfas/PdfAs4SignatureParameter.java | 22 +++++++++++++--------- pom.xml | 1 + 6 files changed, 47 insertions(+), 11 deletions(-) create mode 100644 pdf-over-commons/pdf-over-commons.iml create mode 100644 pdf-over-commons/pom.xml diff --git a/.gitignore b/.gitignore index 6787d1cc..8ec0355c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ log/ *pom.xml.releaseBackup pdf-over-build/ release.properties -*.jar-bak \ No newline at end of file +*.jar-bak +*.iml \ No newline at end of file diff --git a/pdf-over-commons/pdf-over-commons.iml b/pdf-over-commons/pdf-over-commons.iml new file mode 100644 index 00000000..c035f0b0 --- /dev/null +++ b/pdf-over-commons/pdf-over-commons.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pdf-over-commons/pom.xml b/pdf-over-commons/pom.xml new file mode 100644 index 00000000..1a68b59a --- /dev/null +++ b/pdf-over-commons/pom.xml @@ -0,0 +1,15 @@ + + + + pdf-over + at.a-sit + 4.2.4-SNAPSHOT + + 4.0.0 + + pdf-over-commons + + + \ No newline at end of file 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 26f67da3..d65c45a5 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 @@ -767,7 +767,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { param.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName()); } catch (Exception e){ - log.debug("Cannot save siganture profile" + e.getMessage()); + log.debug("Cannot save signature profile" + e.getMessage()); } } 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 57f36fbd..5d286d44 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,6 +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; /** * Implementation of SignatureParameter for PDF-AS 4 Library @@ -49,7 +50,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { private static final String PROFILE_ID_NOTE = "_NOTE"; /** The profile ID extension for PDF/A compatibility */ private static final String PROFILE_ID_PDFA = "_PDFA"; - + /** * Visibility of signature block */ @@ -58,7 +59,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { private HashMap genericProperties = new HashMap(); /** - * This parameters are defining the signature block size + * This parameters are defining the signature block size */ private int sig_w = 229; private int sig_h = 77; @@ -131,7 +132,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { /** * Gets the Signature Position String for PDF-AS - * + * * @return Signature Position String */ public String getPdfAsSignaturePosition() { @@ -168,14 +169,16 @@ public class PdfAs4SignatureParameter extends SignatureParameter { //Add Signature Param here// String profileId; - - - + + + if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar")) { - profileId ="INVISIBLE"; + //TODO set base profile id using the this.profile + //TODO verifiy + profileId = "INVISIBLE"; } else { - profileId = PROFILE_ID_BASE; + profileId = Constants.PROFILE.getProfile(this.profile).name();//PROFILE_ID_BASE; profileId += (lang != null && lang.equals("en")) ? PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; } @@ -187,7 +190,8 @@ public class PdfAs4SignatureParameter extends SignatureParameter { if (usePdfACompat) profileId += PROFILE_ID_PDFA; - log.debug("Profile ID: {0}", profileId); + log.debug("Profile ID: {}", profileId); + System.out.println(profileId); return profileId; } diff --git a/pom.xml b/pom.xml index 822e6ade..cc7914c8 100644 --- a/pom.xml +++ b/pom.xml @@ -85,6 +85,7 @@ pdf-over-gui pdf-over-signator pdf-over-signer + pdf-over-commons -- 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 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 92b4ef89ee39b6b337c8201f6d330f26d5558f54 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 13:52:09 +0100 Subject: Improved code --- .../java/at/asit/pdfover/signer/pdfas/PdfAs4SignatureParameter.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 62533868..68712db9 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 @@ -40,8 +40,6 @@ import at.asit.pdfover.commons.Profile; * Implementation of SignatureParameter for PDF-AS 4 Library */ public class PdfAs4SignatureParameter extends SignatureParameter { - /** The base profile ID */ - private static final String PROFILE_ID_BASE = "SIGNATURBLOCK_SMALL"; /** The profile ID extension for the German signature block */ private static final String PROFILE_ID_LANG_DE = "_DE"; /** The profile ID extension for the English signature block */ @@ -172,7 +170,7 @@ public class PdfAs4SignatureParameter extends SignatureParameter { - if (!PROFILE_VISIBILITY || this.profile.equals("Unsichtbar") || Profile.getProfile(this.profile).equals(Profile.INVISIBLE)) + if (!PROFILE_VISIBILITY || Profile.getProfile(this.profile).equals(Profile.INVISIBLE)) { profileId = "INVISIBLE"; } else { -- cgit v1.2.3 From b562ef40f6b00dbe204fef7026c4690c173b485d Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Fri, 13 Nov 2020 13:58:19 +0100 Subject: Updated PDF-AS Version --- pdf-over-signer/pdf-over-sigpdfas4/pom.xml | 160 ++++++++++++++--------------- 1 file changed, 80 insertions(+), 80 deletions(-) diff --git a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml index dbcb4f9f..8319c8b9 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml +++ b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml @@ -1,80 +1,80 @@ - - 4.0.0 - - pdf-over-signer - at.a-sit - 4.2.4-SNAPSHOT - - - pdf-over-sigpdfas4 - PDF-Over PDF-AS 4 Signer - - ${project.basedir}/../.. - 4.1.6-RC - - - - at.a-sit - pdf-over-signator - ${project.parent.version} - - - at.gv.egiz.pdfas - pdf-as-lib - ${pdf-as.version} - - - at.gv.egiz.pdfas - sigs-pades - ${pdf-as.version} - - - at.gv.egiz.pdfas - pdf-as-pdfbox-2 - ${pdf-as.version} - - - iaik - iaik_jce_full_signed - 5.5 - - - iaik - iaik_eccelerate - 3.01 - - - iaik - iaik_cms - 2.15 - - - iaik - iaik_eccelerate_cms - 3.01 - - - at.a-sit - pdf-over-commons - 4.2.4-SNAPSHOT - compile - - - - - pdf-as-4 - PDF-AS 4 Repository - https://apps.egiz.gv.at/maven/ - - - pdf-as-4-rc - PDF-AS 4 Repository RC - https://apps.egiz.gv.at/releases/pdf-as/release/4.1.6RC/mvn-repo/releases/ - - - - local-repo - file://${project.maindir}/repo - - - + + 4.0.0 + + pdf-over-signer + at.a-sit + 4.2.4-SNAPSHOT + + + pdf-over-sigpdfas4 + PDF-Over PDF-AS 4 Signer + + ${project.basedir}/../.. + 4.1.6 + + + + at.a-sit + pdf-over-signator + ${project.parent.version} + + + at.gv.egiz.pdfas + pdf-as-lib + ${pdf-as.version} + + + at.gv.egiz.pdfas + sigs-pades + ${pdf-as.version} + + + at.gv.egiz.pdfas + pdf-as-pdfbox-2 + ${pdf-as.version} + + + iaik + iaik_jce_full_signed + 5.5 + + + iaik + iaik_eccelerate + 3.01 + + + iaik + iaik_cms + 2.15 + + + iaik + iaik_eccelerate_cms + 3.01 + + + at.a-sit + pdf-over-commons + 4.2.4-SNAPSHOT + compile + + + + + pdf-as-4 + PDF-AS 4 Repository + https://apps.egiz.gv.at/maven/ + + + pdf-as-4-rc + PDF-AS 4 Repository RC + https://apps.egiz.gv.at/releases/pdf-as/release/4.1.6RC/mvn-repo/releases/ + + + + local-repo + file://${project.maindir}/repo + + + -- 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(-) 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(-) 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 f3c085a81d933dd22373a75e2d8fa194056b02d6 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Tue, 17 Nov 2020 10:20:56 +0100 Subject: PDF-AS Config updated --- .../src/main/resources/cfg/PDFASConfig.zip | Bin 971868 -> 1269980 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip index 4c25ca9d..141fe64d 100644 Binary files a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip and b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip differ -- cgit v1.2.3 From af14459241ed7c653531f769216d4e97d3c9ef2f Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Wed, 18 Nov 2020 13:54:40 +0100 Subject: changes in pom and SignatureProfle --- .../main/java/at/asit/pdfover/commons/Profile.java | 15 ++++++--------- .../config/ConfigurationContainerImpl.java | 2 +- .../src/main/resources/cfg/PDFASConfig.zip | Bin 1269980 -> 1269817 bytes pdf-over-signer/pdf-over-sigpdfas4/pom.xml | 10 ++-------- 4 files changed, 9 insertions(+), 18 deletions(-) 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 index 84de1aaa..d9694f18 100644 --- 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 @@ -2,13 +2,12 @@ package at.asit.pdfover.commons; public enum Profile { - SIGNATURBLOCK("Signaturblock Normal") , //$NON-NLS-1$ - SIGNATURBLOCK_SMALL("Signaturblock Klein"), //$NON-NLS-1$ + SIGNATURBLOCK_SMALL("Signaturblock Normal"), //$NON-NLS-1$ AMTSSIGNATURBLOCK("Amtssignatur"), //$NON-NLS-1$ - LOGO_ONLY("Nur Bildmarke"), //$NON-NLS-1$ + BASE_LOGO("Nur Bildmarke"), //$NON-NLS-1$ INVISIBLE("Unsichtbar"); - public static int length = 5; + public static int length = 4; private String name; Profile(String profile){ @@ -38,14 +37,12 @@ public enum Profile { } public static Profile getProfile(String profile) { - if (SIGNATURBLOCK.getName().equals(profile)) { - return SIGNATURBLOCK; - } else if (SIGNATURBLOCK_SMALL.getName().equals(profile)) { + 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 (BASE_LOGO.getName().equals(profile)) { + return BASE_LOGO; } else if (INVISIBLE.getName().equals(profile)){ return INVISIBLE; } 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 7d2c77c4..e00e04d6 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.SIGNATURBLOCK; + this.signatureProfile = Profile.SIGNATURBLOCK_SMALL; } return this.signatureProfile; } diff --git a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip index 141fe64d..37fb63da 100644 Binary files a/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip and b/pdf-over-gui/src/main/resources/cfg/PDFASConfig.zip differ diff --git a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml index 8319c8b9..f297577b 100644 --- a/pdf-over-signer/pdf-over-sigpdfas4/pom.xml +++ b/pdf-over-signer/pdf-over-sigpdfas4/pom.xml @@ -62,16 +62,10 @@ - pdf-as-4 - PDF-AS 4 Repository + EGIZ Repo + EGIZ Internal Repository https://apps.egiz.gv.at/maven/ - - pdf-as-4-rc - PDF-AS 4 Repository RC - https://apps.egiz.gv.at/releases/pdf-as/release/4.1.6RC/mvn-repo/releases/ - - local-repo file://${project.maindir}/repo -- cgit v1.2.3 From df362d82d20d0301099ff3b43517034b4880bd9c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 09:24:38 +0100 Subject: Fixed smaller bugs and typos --- .../pdfover/gui/cliarguments/InvisibleProfile.java | 2 +- .../composites/AdvancedConfigurationComposite.java | 12 +++++++- .../composites/SimpleConfigurationComposite.java | 7 +++++ .../signer/pdfas/PdfAs4SignatureParameter.java | 36 ++++++++++++++++------ .../at/asit/pdfover/signer/pdfas/PdfAs4Signer.java | 7 +++-- 5 files changed, 50 insertions(+), 14 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java index b833ce9d..4bb3890f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InvisibleProfile.java @@ -54,8 +54,8 @@ public class InvisibleProfile extends Argument { log.info("Set Profile Invisible"); if (args.length > argOffset + 1) { - PdfAs4SignatureParameter.PROFILE_VISIBILITY=false; + log.debug("We are setting the profile visibility to false"); return argOffset + 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 f4b3ae0b..27b0f135 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 @@ -1002,7 +1002,17 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { * */ public void performSetSignatureProfile(Profile profile) { - this.configurationContainer.setSignatureProfile(profile); + switch (profile){ + case INVISIBLE: + case AMTSSIGNATURBLOCK: + this.performPositionSelection(true); + this.btnAutomatischePositionierung.setEnabled(false); + this.grpPlaceholder.setEnabled(false); + break; + default: + this.btnAutomatischePositionierung.setEnabled(true); + this.grpPlaceholder.setEnabled(true); + } } /* (non-Javadoc) 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 7941bc9a..ad0d5eb8 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 @@ -22,6 +22,7 @@ import java.util.Locale; import javax.imageio.ImageIO; +import at.asit.pdfover.signator.SignaturePosition; import org.eclipse.swt.SWT; import org.eclipse.swt.dnd.DND; import org.eclipse.swt.dnd.DropTarget; @@ -759,6 +760,12 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { log.debug("Signature Profile {} was selected", selected.getName()); //$NON-NLS-1$ this.configurationContainer.setSignatureProfile(selected); this.cmbSingatureProfiles.select(selected.ordinal()); + + if (selected.equals(Profile.AMTSSIGNATURBLOCK)){ + this.configurationContainer.setDefaultSignaturePosition(new SignaturePosition()); + //TODO also set the radio button in advanced config + } + } void setSignatureProfileSetting(){ 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 68712db9..08722617 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 @@ -49,6 +49,8 @@ public class PdfAs4SignatureParameter extends SignatureParameter { /** The profile ID extension for PDF/A compatibility */ private static final String PROFILE_ID_PDFA = "_PDFA"; + private static final String PROFILE_ID_RECOMMENDED = "_RECOMMENDED"; + /** * Visibility of signature block */ @@ -168,17 +170,25 @@ public class PdfAs4SignatureParameter extends SignatureParameter { //Add Signature Param here// String profileId; - - - if (!PROFILE_VISIBILITY || Profile.getProfile(this.profile).equals(Profile.INVISIBLE)) - { - profileId = "INVISIBLE"; - } else { - profileId = Profile.getProfile(this.profile).name(); - profileId += (lang != null && lang.equals("en")) ? - PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; + if (!PROFILE_VISIBILITY){ + log.debug("Profile visibility was set to false"); + return Profile.INVISIBLE.name(); } + switch (Profile.getProfile(this.profile)){ + case BASE_LOGO: + case INVISIBLE: + return getProfileName(); + case AMTSSIGNATURBLOCK: + profileId = getProfileName(); + profileId += getLangProfilePart(lang); + profileId += PROFILE_ID_RECOMMENDED; + return profileId; + default: + profileId = getProfileName(); + profileId += getLangProfilePart(lang); + break; + } if (useNote) profileId += PROFILE_ID_NOTE; @@ -191,6 +201,14 @@ public class PdfAs4SignatureParameter extends SignatureParameter { return profileId; } + private String getProfileName(){ + return Profile.getProfile(this.profile).name(); + } + + private String getLangProfilePart(String lang){ + return (lang != null && lang.equals("en")) ? PROFILE_ID_LANG_EN : PROFILE_ID_LANG_DE; + } + @Override public void setSignatureProfile(String profile) { this.profile = profile; 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 5c4782ba..67a8fe7f 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 @@ -5,6 +5,7 @@ import java.util.UUID; import javax.activation.DataSource; +import at.asit.pdfover.commons.Profile; import at.asit.pdfover.signator.ByteArrayDocumentSource; import at.asit.pdfover.signator.SignResult; import at.asit.pdfover.signator.SignResultImpl; @@ -144,6 +145,8 @@ public class PdfAs4Signer implements Signer { sp = new SignaturePosition(); else if (tp.isPauto()) sp = new SignaturePosition(tp.getPosX(), tp.getPosY()); + else if (param.getSignatureProfileId().contains(Profile.AMTSSIGNATURBLOCK.getName())) + sp = new SignaturePosition(); else sp = new SignaturePosition(tp.getPosX(), tp.getPosY(), tp.getPage()); result.setSignaturePosition(sp); @@ -151,9 +154,7 @@ public class PdfAs4Signer implements Signer { result.setSignedDocument(new ByteArrayDocumentSource(sstate.getOutput().toByteArray())); return result; - } catch (PdfAsException e) { - throw new SignatureException(e); - } catch (PDFASError e) { + } catch (PdfAsException | PDFASError e) { throw new SignatureException(e); } } -- cgit v1.2.3 From 5ceb3061ada685cd02ae3f1236da108c88c953d2 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 09:53:08 +0100 Subject: Changed the GUI behaviour when selecting different profiles accordingly --- .../asit/pdfover/gui/composites/AdvancedConfigurationComposite.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 27b0f135..b03451b5 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 @@ -1007,11 +1007,12 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { case AMTSSIGNATURBLOCK: this.performPositionSelection(true); this.btnAutomatischePositionierung.setEnabled(false); - this.grpPlaceholder.setEnabled(false); + this.btnEnablePlaceholderUsage.setEnabled(true); + this.performEnableUsePlaceholder(false); break; default: this.btnAutomatischePositionierung.setEnabled(true); - this.grpPlaceholder.setEnabled(true); + this.btnEnablePlaceholderUsage.setEnabled(true); } } -- cgit v1.2.3 From 1feb15655af5bdd685afa814832aaf5d3e522409 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 09:58:37 +0100 Subject: Improved code quality according to SonarLint --- .../composites/AdvancedConfigurationComposite.java | 42 ++++++++-------------- 1 file changed, 15 insertions(+), 27 deletions(-) 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 b03451b5..3d8d7726 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 @@ -26,8 +26,6 @@ import org.eclipse.swt.events.FocusAdapter; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.TraverseEvent; -import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.layout.FormAttachment; @@ -363,7 +361,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fD_cmbBKUAuswahl[0])); int blen = BKUs.values().length; - this.bkuStrings = new ArrayList(blen); + this.bkuStrings = new ArrayList<>(blen); for (int i = 0; i < blen; i++) { String lookup = "BKU." + BKUs.values()[i].toString(); //$NON-NLS-1$ String text = Messages.getString(lookup); @@ -651,13 +649,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { } }); - this.txtProxyHost.addTraverseListener(new TraverseListener() { - - @Override - public void keyTraversed(TraverseEvent e) { - if (e.detail == SWT.TRAVERSE_RETURN) { - processProxyHostChanged(); - } + this.txtProxyHost.addTraverseListener(e -> { + if (e.detail == SWT.TRAVERSE_RETURN) { + processProxyHostChanged(); } }); @@ -687,13 +681,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.txtProxyPort.setFont(new Font(Display.getCurrent(), fD_txtProxyPort[0])); - this.txtProxyPort.addTraverseListener(new TraverseListener() { - - @Override - public void keyTraversed(TraverseEvent e) { - if (e.detail == SWT.TRAVERSE_RETURN) { - processProxyPortChanged(); - } + this.txtProxyPort.addTraverseListener(e -> { + if (e.detail == SWT.TRAVERSE_RETURN) { + processProxyPortChanged(); } }); @@ -729,7 +719,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { } void performOutputFolderChanged(String foldername) { - log.debug("Selected Output folder: " + foldername); //$NON-NLS-1$ + log.debug("Selected Output folder: {}", foldername); //$NON-NLS-1$ this.configurationContainer.setOutputFolder(foldername); AdvancedConfigurationComposite.this.txtOutputFolder.setText(foldername); } @@ -740,14 +730,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { int i = this.bkuStrings.indexOf(bkuName); if (i == -1) { - log.warn("NO BKU match for " + bkuName); //$NON-NLS-1$ + log.warn("NO BKU match for {}", bkuName); //$NON-NLS-1$ return 0; } return i; } void performBKUSelectionChanged(BKUs selected) { - log.debug("Selected BKU: " + selected.toString()); //$NON-NLS-1$ + log.debug("Selected BKU: {}", selected); //$NON-NLS-1$ this.configurationContainer.setDefaultBKU(selected); this.cmbBKUAuswahl.select(this.getBKUElementIndex(selected)); } @@ -757,7 +747,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { BKUs bkuvalue = resolveBKU(selected); this.performBKUSelectionChanged(bkuvalue); } catch (Exception ex) { - log.error("Failed to parse BKU value: " + selected, ex); //$NON-NLS-1$ + log.error("Failed to parse BKU value: {} {}", selected, ex); //$NON-NLS-1$ ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$ dialog.open(); @@ -780,23 +770,23 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { int getLocaleElementIndex(Locale locale) { for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) { if (Constants.SUPPORTED_LOCALES[i].equals(locale)) { - log.debug("Locale: " + locale + " IDX: " + i); //$NON-NLS-1$ //$NON-NLS-2$ + log.debug("Locale: {} IDX: {}", locale, i); //$NON-NLS-1$ //$NON-NLS-2$ return i; } } - log.warn("NO Locale match for " + locale); //$NON-NLS-1$ + log.warn("NO Locale match for {}", locale); //$NON-NLS-1$ return 0; } void performLocaleSelectionChanged(Locale selected) { - log.debug("Selected Locale: " + selected); //$NON-NLS-1$ + log.debug("Selected Locale: {}", selected); //$NON-NLS-1$ this.configurationContainer.setLocale(selected); this.cmbLocaleAuswahl.select(this.getLocaleElementIndex(selected)); } void performPositionSelection(boolean automatic) { - log.debug("Selected Position: " + automatic); //$NON-NLS-1$ + log.debug("Selected Position: {}", automatic); //$NON-NLS-1$ SignaturePosition pos = automatic ? new SignaturePosition() : null; this.configurationContainer.setDefaultSignaturePosition(pos); this.btnAutomatischePositionierung.setSelection(automatic); @@ -921,8 +911,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.configurationContainer.setUseMarker(provider.getUseMarker()); this.configurationContainer.setUseSignatureFields(provider.getUseSignatureFields()); this.configurationContainer.setEnablePlaceholderUsage(provider.getEnablePlaceholderUsage()); - /*this.configurationContainer.setDownloadURL( - provider.getDownloadURL());*/ this.configurationContainer.setSignaturePdfACompat( provider.getSignaturePdfACompat()); this.configurationContainer.setPlaceholderTransparency( -- cgit v1.2.3 From 636a0d443e8a257879b8a6199d4de79cba88abfa Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 10:06:48 +0100 Subject: Improved code quality according to SonarLint --- .../composites/SimpleConfigurationComposite.java | 80 +++++++--------------- 1 file changed, 26 insertions(+), 54 deletions(-) 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 ad0d5eb8..38f3967b 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 @@ -33,7 +33,6 @@ import org.eclipse.swt.dnd.Transfer; import org.eclipse.swt.events.FocusAdapter; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.TraverseEvent; @@ -189,13 +188,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.txtMobileNumber.setFont(new Font(Display.getCurrent(), fD_txtMobileNumber[0])); - this.txtMobileNumber.addTraverseListener(new TraverseListener() { - - @Override - public void keyTraversed(TraverseEvent e) { - if (e.detail == SWT.TRAVERSE_RETURN) { - processNumberChanged(); - } + this.txtMobileNumber.addTraverseListener(e -> { + if (e.detail == SWT.TRAVERSE_RETURN) { + processNumberChanged(); } }); @@ -238,7 +233,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); this.cmbSingatureProfiles.setItems(Profile.getProfileStrings()); - //this.cmbSingatureProfiles.select(this.configurationContainer.getSignatureProfile().ordinal()); this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -282,16 +276,13 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_controlComposite.top = new FormAttachment(0, 20); fd_controlComposite.bottom = new FormAttachment(100, -20); controlComposite.setLayoutData(fd_controlComposite); - controlComposite.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - e.gc.setForeground(Constants.DROP_BORDER_COLOR); - e.gc.setLineWidth(3); - e.gc.setLineStyle(SWT.LINE_DASH); - Point size = controlComposite.getSize(); - e.gc.drawRoundRectangle(0, 0, size.x - 2, size.y - 2, - 10, 10); - } + controlComposite.addPaintListener(e -> { + e.gc.setForeground(Constants.DROP_BORDER_COLOR); + e.gc.setLineWidth(3); + e.gc.setLineStyle(SWT.LINE_DASH); + Point size = controlComposite.getSize(); + e.gc.drawRoundRectangle(0, 0, size.x - 2, size.y - 2, + 10, 10); }); this.cSigPreview = new Canvas(containerComposite, SWT.RESIZE); @@ -309,12 +300,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_cLogo.height = 40; fd_cLogo.width = 40; this.cLogo.setLayoutData(fd_cLogo); - this.cLogo.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - imagePaintControl(e, SimpleConfigurationComposite.this.logo); - } - }); + this.cLogo.addPaintListener(e -> imagePaintControl(e, SimpleConfigurationComposite.this.logo)); this.btnClearImage = new Button(controlComposite, SWT.NATIVE); @@ -332,12 +318,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fd_cSigPreview.bottom = new FormAttachment(100, -20); this.cSigPreview.setLayoutData(fd_cSigPreview); - this.cSigPreview.addPaintListener(new PaintListener() { - @Override - public void paintControl(PaintEvent e) { - imagePaintControl(e, SimpleConfigurationComposite.this.sigPreview); - } - }); + this.cSigPreview.addPaintListener(e -> imagePaintControl(e, SimpleConfigurationComposite.this.sigPreview)); FontData[] fD_cSigPreview = this.cSigPreview.getFont().getFontData(); fD_cSigPreview[0].setHeight(Constants.TEXT_SIZE_NORMAL); @@ -358,7 +339,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { // Only taking first file ... File file = new File(files[0]); if (!file.exists()) { - log.error("File: " + files[0] + " does not exist!"); //$NON-NLS-1$//$NON-NLS-2$ + log.error("File: {} does not exist!", files[0]); //$NON-NLS-1$//$NON-NLS-2$ return; } processEmblemChanged(file.getAbsolutePath()); @@ -540,12 +521,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { } }); - this.txtSignatureNote.addTraverseListener(new TraverseListener() { - @Override - public void keyTraversed(TraverseEvent e) { - if (e.detail == SWT.TRAVERSE_RETURN) { - processSignatureNoteChanged(); - } + this.txtSignatureNote.addTraverseListener(e -> { + if (e.detail == SWT.TRAVERSE_RETURN) { + processSignatureNoteChanged(); } }); @@ -628,10 +606,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { if (fileName != null) { file = new File(fileName); if (file.exists()) { - /* - * SimpleConfigurationComposite.this.txtEmblemFile - * .setText(fileName); - */ processEmblemChanged(fileName); } } @@ -644,11 +618,9 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { private void setEmblemFileInternal(final String filename, boolean force) throws Exception { - if (!force) { - if (this.configurationContainer.getEmblem() != null) { - if (this.configurationContainer.getEmblem().equals(filename)) { - return; // Ignore ... - } + if (!force && this.configurationContainer.getEmblem() != null) { + if (this.configurationContainer.getEmblem().equals(filename)) { + return; // Ignore ... } } @@ -734,17 +706,17 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { int getLocaleElementIndex(Locale locale) { for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; i++) { if (Constants.SUPPORTED_LOCALES[i].equals(locale)) { - log.debug("Locale: " + locale + " IDX: " + i); //$NON-NLS-1$ //$NON-NLS-2$ + log.debug("Locale: {} IDX: {}",locale, i); //$NON-NLS-1$ //$NON-NLS-2$ return i; } } - log.warn("NO Locale match for " + locale); //$NON-NLS-1$ + log.warn("NO Locale match for {}", locale); //$NON-NLS-1$ return 0; } void performSignatureLangSelectionChanged(Locale selected, Locale previous) { - log.debug("Selected Sign Locale: " + selected); //$NON-NLS-1$ + log.debug("Selected Sign Locale: {}", selected); //$NON-NLS-1$ this.configurationContainer.setSignatureLocale(selected); this.cmbSignatureLang.select(this.getLocaleElementIndex(selected)); if (previous != null) { @@ -763,7 +735,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { if (selected.equals(Profile.AMTSSIGNATURBLOCK)){ this.configurationContainer.setDefaultSignaturePosition(new SignaturePosition()); - //TODO also set the radio button in advanced config } } @@ -774,7 +745,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { param.setSignatureProfile(this.configurationContainer.getSignatureProfile().getName()); } catch (Exception e){ - log.debug("Cannot save signature profile" + e.getMessage()); + log.debug("Cannot save signature profile {}", e.getMessage()); } } @@ -861,7 +832,6 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { String emblemFile = this.configurationContainer.getEmblem(); if (emblemFile != null && !emblemFile.trim().isEmpty()) { - // this.txtEmblemFile.setText(emblemFile); this.logoFile = emblemFile; try { setEmblemFileInternal(emblemFile, true); @@ -921,8 +891,10 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { // Fall through case 1: this.processSignatureNoteChanged(); + break; + default: + //Fall through } - // this.plainEmblemSetter(this.emblemFile); } /* -- cgit v1.2.3 From d3b5b119873b9186857a8c324362437ce3828848 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 10:15:58 +0100 Subject: Improved code quality according to SonarLint --- .../src/main/java/at/asit/pdfover/gui/utils/Messages.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java index 6271656c..c48337e6 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java @@ -38,10 +38,7 @@ public class Messages { private static final String BUNDLE_NAME = "at.asit.pdfover.gui.messages"; //$NON-NLS-1$ - private static HashMap bundles = new HashMap(); - - //private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle - // .getBundle(BUNDLE_NAME); + private static HashMap bundles = new HashMap<>(); private static Locale currentLocale = getDefaultLocale(); @@ -71,17 +68,17 @@ public class Messages { private static ResourceBundle getBundle(Locale locale) { if(!bundles.containsKey(locale)) { - log.debug("Loading resource bundle for " + locale); //$NON-NLS-1$ + log.debug("Loading resource bundle for {}", locale); //$NON-NLS-1$ ResourceBundle tmp = null; try { tmp = ResourceBundle.getBundle(BUNDLE_NAME, locale); - log.debug("Received bundle for " + tmp.getLocale()); //$NON-NLS-1$ + log.debug("Received bundle for {}", tmp.getLocale()); //$NON-NLS-1$ } catch(Exception e) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString(), e); //$NON-NLS-1$ + log.error("NO RESOURCE BUNDLE FOR {} {}", locale, e); //$NON-NLS-1$ tmp = ResourceBundle.getBundle(BUNDLE_NAME); } if(tmp == null) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString()); //$NON-NLS-1$ + log.error("NO RESOURCE BUNDLE FOR {}", locale); //$NON-NLS-1$ tmp = ResourceBundle.getBundle(BUNDLE_NAME); } bundles.put(locale, tmp); @@ -98,7 +95,6 @@ public class Messages { public static String getString(String key) { try { return getBundle(currentLocale).getString(key); - //return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } @@ -113,7 +109,6 @@ public class Messages { public static String getString(String key, Locale locale) { try { return getBundle(locale).getString(key); - //return RESOURCE_BUNDLE.getString(key); } catch (MissingResourceException e) { return '!' + key + '!'; } -- cgit v1.2.3 From ebade6f73b9e3c1f5c93bb0e1c7b48c47061d104 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 10:44:50 +0100 Subject: Added English and German values for Signature Profile description --- .../main/java/at/asit/pdfover/commons/Profile.java | 2 - .../composites/SimpleConfigurationComposite.java | 28 +- .../at/asit/pdfover/gui/messages.properties | 482 +++++++++++---------- .../at/asit/pdfover/gui/messages_de.properties | 466 ++++++++++---------- 4 files changed, 495 insertions(+), 483 deletions(-) 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 index d9694f18..ef2eccd8 100644 --- 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 @@ -50,6 +50,4 @@ public enum 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 38f3967b..84078fbf 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 @@ -35,8 +35,6 @@ import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.TraverseEvent; -import org.eclipse.swt.events.TraverseListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; import org.eclipse.swt.graphics.Image; @@ -116,7 +114,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { protected Image logo = null; protected final Group grpSignatureProfile; - protected final Combo cmbSingatureProfiles; + protected final Combo cmbSignatureProfiles; @@ -218,26 +216,34 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { fD_grpSignatureProfile[0])); - this.cmbSingatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY); + this.cmbSignatureProfiles = new Combo(this.grpSignatureProfile, SWT.READ_ONLY); FormData fd_cmbSingatureProfiles = new FormData(); 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.cmbSingatureProfiles.setLayoutData(fd_cmbSingatureProfiles); + this.cmbSignatureProfiles.setLayoutData(fd_cmbSingatureProfiles); - FontData[] fD_cmbSignatureProfile = this.cmbSingatureProfiles.getFont() + FontData[] fD_cmbSignatureProfile = this.cmbSignatureProfiles.getFont() .getFontData(); fD_cmbSignatureProfile[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.cmbSingatureProfiles.setFont(new Font(Display.getCurrent(), + this.cmbSignatureProfiles.setFont(new Font(Display.getCurrent(), fD_cmbSignatureProfile[0])); - this.cmbSingatureProfiles.setItems(Profile.getProfileStrings()); - this.cmbSingatureProfiles.addSelectionListener(new SelectionAdapter() { + + String[] items = new String[Profile.values().length]; + int i = 0; + for (Profile profile : Profile.values()) { + items[i] = Messages.getString("simple_config." + profile.name()); + i++; + } + + this.cmbSignatureProfiles.setItems(items); + this.cmbSignatureProfiles.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { Profile current = SimpleConfigurationComposite.this.configurationContainer.getSignatureProfile(); - Profile selected = Profile.getProfileByIndex(SimpleConfigurationComposite.this.cmbSingatureProfiles + Profile selected = Profile.getProfileByIndex(SimpleConfigurationComposite.this.cmbSignatureProfiles .getSelectionIndex()); if (!current.equals(selected)) { preformProfileSelectionChanged(selected); @@ -731,7 +737,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { void preformProfileSelectionChanged(Profile selected) { log.debug("Signature Profile {} was selected", selected.getName()); //$NON-NLS-1$ this.configurationContainer.setSignatureProfile(selected); - this.cmbSingatureProfiles.select(selected.ordinal()); + this.cmbSignatureProfiles.select(selected.ordinal()); if (selected.equals(Profile.AMTSSIGNATURBLOCK)){ this.configurationContainer.setDefaultSignaturePosition(new SignaturePosition()); diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index cf33c2a2..4764a1af 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -1,239 +1,243 @@ -#Eclipse messages class -#Mon Dec 02 13:17:21 CET 2019 -BKU.KS=Keystore -BKU.LOCAL=Local CCE -BKU.MOBILE=Mobile CCE -BKU.NONE=no default -BKUSelectionComposite.btnMobile.text=MOBILE -PlaceholderSelectionGui.lblNewLabel.text=New Label -PlaceholderSelectionGui.shlInfo.text=Info -TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection -WaitingForAppComposite.btnCancel.text=Cancel -WaitingForAppComposite.btnCancel_1.text=Cancel -WaitingForAppComposite.btnNewButton.text=New Button -WaitingForAppComposite.btnRequestSms.text=Request SMS -WaitingForAppComposite.lblNewLabel.text=New Label -advanced_config.AutoPosition=Automatic positioning -advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature -advanced_config.BKUSelection_Title=CC&E Selection -advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature -advanced_config.KeystoreEnabled=Enable keystore signing -advanced_config.KeystoreEnabled_ToolTip=Enables the possibility to sign with a local keystore -advanced_config.LocaleSelection_Title=Interface &language selection -advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over -advanced_config.OutputFolder=Default output folder\: -advanced_config.OutputFolder.Dialog=Select a folder -advanced_config.OutputFolder.Dialog_Title=Select Output folder -advanced_config.OutputFolder_Title=&Output location -advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory) -advanced_config.PdfACompat=PDF/A compatibility -advanced_config.PdfACompat_ToolTip=Whether to make signature PDF/A compatible (increases pdf size) -advanced_config.ProxyHost=Host\: -advanced_config.ProxyHost_Template=Hostname or IP of the proxy server -advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here -advanced_config.ProxyPass=Password\: -advanced_config.ProxyPass_Template=Password for proxy authentication -advanced_config.ProxyPass_ToolTip=To use proxy authentication enter password here -advanced_config.ProxyPort=Port\: -advanced_config.ProxyPort_Template=Port of the proxy server [1-65535] -advanced_config.ProxyPort_ToolTip=To use a proxy server enter the port number here -advanced_config.ProxyUser=Username\: -advanced_config.ProxyUser_Template=Username for proxy authentication -advanced_config.ProxyUser_ToolTip=To use proxy authentication enter username here -advanced_config.Proxy_Title=&Proxy -advanced_config.SigPHTransparency=Signature placeholder transparency -advanced_config.SigPHTransparencyMax=Opaque -advanced_config.SigPHTransparencyMin=Invisible -advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step -advanced_config.Signature_Title=Si&gnature -advanced_config.Placeholder_Title=Placeholder -advanced_config.Placeholder_Enabled=Enable placeholder search -advanced_config.UpdateCheck=Automatically check for updates -advanced_config.UpdateCheck_Title=Updates -advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available -advanced_config.UseMarker=Search for QR-Code signature markers -advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. -advanced_config.UseSignatureFields=Search for signature fields -advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. -argument.error.output=is not a directory -argument.help.autopos=Enables automatic signature positioning -argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE -argument.help.config=Defines which configuration file to use. Example\: -c -argument.help.emblem=Sets the signature logo file to use for the signature. Example\: -e -argument.help.help=Shows this help message -argument.help.input=Sets the document to sign. Example\: -i -argument.help.keystorealias=Sets the keystore key alias. Example \: -ksalias -argument.help.keystorefile=Sets the keystore file. Example \: -ks -argument.help.keystorekeypass=Sets the keystore password. Example \: -kspass -argument.help.keystorestorepass=Sets the keystore key password. Example \: -kskeypass -argument.help.keystoretype=Sets the keystore type. Example \: -kstype [PKCS12|JKS|JCEKS] -argument.help.number=Sets the telephone number to use for mobile CCE. Example\: -n -argument.help.output=Sets the output folder or file to use. Example\: -o -argument.help.password=Sets the password to use for mobile CCE. Example\: -p -argument.help.proxyhost=Sets the proxy host to use. Example\: -proxy -argument.help.proxypass=Sets the proxy password to use. Example\: -proxypass -argument.help.proxyport=Sets the proxy port to use. Example\: -proxyport -argument.help.proxyuser=Sets the proxy username to use. Example\: -proxyuser -argument.help.skipfinish=Enables skipping of the "Finish" dialog (if successfully saved) -argument.help.vis=Sets the visibility of a signature. Example\: -v "true" -argument.info.help=The following options are available\: -argument.invalid.bku=CCE argument invalid\! Usage\: -argument.invalid.config=Configuration file argument invalid\! Usage\: -argument.invalid.emblem=Signature logo argument invalid\! Usage\: -argument.invalid.input=Document to sign argument invalid\! Usage\: -argument.invalid.keystorealias=Keystore alias invalid\! Usage\: -argument.invalid.keystorefile=Keystore file invalid\! Usage\: -argument.invalid.keystorekeypass=Keystore key password invalid\! Usage\: -argument.invalid.keystorestorepass=Keystore password invalid\! Usage\: -argument.invalid.keystoretype=Keystore type invalid\! Usage\: -argument.invalid.number=Phone number argument invalid\! Usage\: -argument.invalid.output=Output folder argument invalid\! Usage\: -argument.invalid.password=Mobile CCE password invalid\! Usage\: -argument.invalid.proxyhost=Proxy host argument invalid\! Usage\: -argument.invalid.proxypass=Proxy password argument invalid\! Usage\: -argument.invalid.proxyport=Proxy port argument invalid\! Usage\: -argument.invalid.proxyuser=Proxy username argument invalid\! Usage\: -argument.invalid.vis=Profile Visbility argument invalid\! Usage\: -bku_selection.card=&Card -bku_selection.ks=&Keystore -bku_selection.mobile=&Mobile -common.AllExtension_Description=All files -common.Cancel=C&ancel -common.GIFExtension_Description=GIF files -common.ImageExtension_Description=All supported image files -common.JPGExtension_Description=JPG files -common.KSExtension_Description=Java keystore files -common.KeystoreExtension_Description=Keystore files -common.Ok=O&K -common.PDFExtension_Description=PDF documents -common.PKCS12Extension_Description=PKCS12 keystore files -common.PNGExtension_Description=PNG files -common.Save=&Save -common.browse=&Browse -common.info=Information -common.open=Open -common.warning=Warning -config.About=A&bout %s -config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at http\://demo.a-sit.at/lizenzbedingungen/.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software. -config.Advanced=Ad&vanced -config.Keystore=&Keystore -config.Simple=Basi&c -dataSourceSelection.DropLabel=Drag document here -dataSourceSelection.DropLabel2=or... -dataSourceSelection.browse=&Browse for PDF on your computer -dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it? -dataSourceSelection.usePlaceholderTitle=Info -error.ATrustConnection=Connection to A-Trust could not be established -error.CmdLineArgs=Error parsing the command-line arguments\: -error.Details=Details -error.EnteredReferenceValue=You entered the reference value\! -error.FailedToGetSignedDocument=Failed to get signed document. -error.FailedToLoadEmblem=Failed to load the signature logo -error.FailedToLoadQRCode=Failed to load the QR code -error.FailedToOpenDocument=Failed to open signed document\: %s. -error.FailedToSaveSettings=Failed to save configuration file\! -error.FileNotExist=File %s does not exist\! -error.IOError=Input/Output Error -error.Initialization=Initialization failed. Please check your configuration. -error.InvalidBKU=Invalid CCE selection. Please check. -error.InvalidLocale=Locale not valid -error.InvalidPhoneNumber=Given phone number is invalid\! Example\:+43664123456789 -error.InvalidSettings=Invalid settings are still present. Please check your input. -error.KeyStore=Error loading they keystore. Wrong password? -error.KeyStoreAliasExist=Key alias %s not found in keystore -error.KeyStoreAliasNoKey=Alias %s is not a key -error.KeyStoreFileNotExist=Keystore file %s does not exist\! -error.KeyStoreKeyPass=Key password invalid -error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at -error.MayNotBeAPDF=This may not be a PDF file -error.NoTan=No TAN entered -error.PDFProtected=This PDF file is encrypted and can therefore not be signed -error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed -error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning. -error.PrepareDocument=Failed to prepare document for signature. -error.Retry=Retry -error.SWTLib=Error loading SWT library -error.SaveOutputFolder=Failed to save signed document to configured output folder. -error.Signatur=Signature error -error.SignaturePanel.NoPage=No page selected -error.SignaturePanel.NoRender=Could not render page -error.TanTooLong=Entered TAN too long -error.Title=Error -error.TitleFatal=Fatal Error -error.Unexpected=Unexpected Error -exception.InvalidEmblemFile=%s is an invalid signature logo file\! -exception.InvalidPort=%s is invalid\: has to be a number between %d and %d -exception.PasswordTooLong=Given password is too long\! -exception.PasswordTooShort=Given password is too short\! -exception.PathNotDirectory=Path %s does not denote a directory\! -exception.PathNotExist=Path %s does not exist\! -keystore.KeystoreKeyPassEntry=Please enter key password\: -keystore.KeystoreStorePassEntry=Please enter keystore password\: -keystore_config.KeystoreAlias=Key alias -keystore_config.KeystoreFile=Keystore file -keystore_config.KeystoreFile.Dialog=Choose the keystore -keystore_config.KeystoreFile.Dialog_Title=Keystore selection -keystore_config.KeystoreFile_ToolTip=Path to the keystore file -keystore_config.KeystoreKeyPass=Key password -keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing. -keystore_config.KeystoreStorePass=Keystore password -keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing. -keystore_config.KeystoreType=Keystore type -keystore_config.KeystoreType_JKS=Java keystore -keystore_config.KeystoreType_PKCS12=PKCS12 -keystore_config.Keystore_Title=Keystore -keystore_config.Load=Load keystore -keystore_config.Load_ToolTip=Load keystore to show available key aliases -main.about=About %s -main.configuration=Configuration -main.done=Finish -main.hide=Hide %s -main.position=Positioning -main.quit=Quit %s -main.signature=Signing -mobileBKU.aTrustDisclaimer=This service is provided by A-Trust -mobileBKU.certExpiresSoon=Since the validity of your certificate expires in the next few days, a new activation is necessary (free of charge). Press "Yes" to visit https\://www.handy-signatur.at/ now, and then sign in to your account. -mobileBKU.notice=Notice from server\: -mobileBKU.number=Number\: -mobileBKU.password=Password\: -mobileBKU.show=Show signature data -mobileBKU.show_tooltip=Shows the data to be signed -mobileBKU.tan_tries_exceeded=TAN tries exceeded, request a new TAN? -mobileBKU.wrong_tan=TAN not accepted -output.file_ask_overwrite=File %s already exists, do you want to overwrite it? -output.link_open_message=You can open the signed file here. -output.link_save_message=You can save the signed file -output.save_failed=Saving file %s failed\: %s -output.success_message=Signature was successful -positioning.newPage=Create &new Page -positioning.page=Page %d of %d -positioning.placeholder=Please select the signature placeholder\nfrom the drop down list -positioning.removeNewPage=Undo &new Page -positioning.sign=&Sign -positioning.signature=Signature -simple_config.ClearEmblem=Clea&r -simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button \nto select a signature logo. -simple_config.Emblem_Title=Signature &logo -simple_config.ExampleNumber=+43676123456789 -simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here -simple_config.MobileBKU_Title=&Mobile signature -simple_config.Note=Text\: -simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature. -simple_config.Note_Default_Old=This document is signed with a qualified electronic signature. According to \u00A7\u00A04 art.\u00A01 of the Signature Act it in principle is legally equivalent to a handwritten signature. -simple_config.Note_SetDefault=Restore default -simple_config.Note_Title=Signature &Note -simple_config.Note_Tooltip=Add an optional note to display on your Signature -simple_config.PhoneNumber=Mobile number\: -simple_config.SigBlockLang_Title=Signature block lan&guage\: -simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document -tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature. -tanEnter.QR=QR code\: -tanEnter.ReferenceValue=Reference value\: -tanEnter.SMS=Request &SMS -tanEnter.TAN=TAN\: -tanEnter.tries=%d tries left\! -tanEnter.try=Only 1 try left\! -version_check.UpdateText=Version %s is available.\nOpen download page now? -version_check.UpdateTitle=New version available\! -waiting.message=Signature creation in progress... -waiting_for_app.message=Please open Signature-App\! +#Eclipse messages class +#Mon Dec 02 13:17:21 CET 2019 +BKU.KS=Keystore +BKU.LOCAL=Local CCE +BKU.MOBILE=Mobile CCE +BKU.NONE=no default +BKUSelectionComposite.btnMobile.text=MOBILE +PlaceholderSelectionGui.lblNewLabel.text=New Label +PlaceholderSelectionGui.shlInfo.text=Info +TrustedSocketFactory.FailedToCreateSecureConnection=Failed to create secure network connection +WaitingForAppComposite.btnCancel.text=Cancel +WaitingForAppComposite.btnCancel_1.text=Cancel +WaitingForAppComposite.btnNewButton.text=New Button +WaitingForAppComposite.btnRequestSms.text=Request SMS +WaitingForAppComposite.lblNewLabel.text=New Label +advanced_config.AutoPosition=Automatic positioning +advanced_config.AutoPosition_ToolTip=Activate this option to automatically position the signature +advanced_config.BKUSelection_Title=CC&E Selection +advanced_config.BKUSelection_ToolTip=Select the default CCE to use during signature +advanced_config.KeystoreEnabled=Enable keystore signing +advanced_config.KeystoreEnabled_ToolTip=Enables the possibility to sign with a local keystore +advanced_config.LocaleSelection_Title=Interface &language selection +advanced_config.LocaleSelection_ToolTip=Select the interface language for PDF-Over +advanced_config.OutputFolder=Default output folder\: +advanced_config.OutputFolder.Dialog=Select a folder +advanced_config.OutputFolder.Dialog_Title=Select Output folder +advanced_config.OutputFolder_Title=&Output location +advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory) +advanced_config.PdfACompat=PDF/A compatibility +advanced_config.PdfACompat_ToolTip=Whether to make signature PDF/A compatible (increases pdf size) +advanced_config.ProxyHost=Host\: +advanced_config.ProxyHost_Template=Hostname or IP of the proxy server +advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here +advanced_config.ProxyPass=Password\: +advanced_config.ProxyPass_Template=Password for proxy authentication +advanced_config.ProxyPass_ToolTip=To use proxy authentication enter password here +advanced_config.ProxyPort=Port\: +advanced_config.ProxyPort_Template=Port of the proxy server [1-65535] +advanced_config.ProxyPort_ToolTip=To use a proxy server enter the port number here +advanced_config.ProxyUser=Username\: +advanced_config.ProxyUser_Template=Username for proxy authentication +advanced_config.ProxyUser_ToolTip=To use proxy authentication enter username here +advanced_config.Proxy_Title=&Proxy +advanced_config.SigPHTransparency=Signature placeholder transparency +advanced_config.SigPHTransparencyMax=Opaque +advanced_config.SigPHTransparencyMin=Invisible +advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step +advanced_config.Signature_Title=Si&gnature +advanced_config.Placeholder_Title=Placeholder +advanced_config.Placeholder_Enabled=Enable placeholder search +advanced_config.UpdateCheck=Automatically check for updates +advanced_config.UpdateCheck_Title=Updates +advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available +advanced_config.UseMarker=Search for QR-Code signature markers +advanced_config.UseMarker_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. +advanced_config.UseSignatureFields=Search for signature fields +advanced_config.UseSignatureFields_ToolTip=Activate this option to scan the document for signature markers. In case there is a marker available, you will be asked whether to automatically position your signature according to the marker. +argument.error.output=is not a directory +argument.help.autopos=Enables automatic signature positioning +argument.help.bku=Select the CCE to use. Possible values are\: LOCAL, MOBILE, KS. Example\: -b MOBILE +argument.help.config=Defines which configuration file to use. Example\: -c +argument.help.emblem=Sets the signature logo file to use for the signature. Example\: -e +argument.help.help=Shows this help message +argument.help.input=Sets the document to sign. Example\: -i +argument.help.keystorealias=Sets the keystore key alias. Example \: -ksalias +argument.help.keystorefile=Sets the keystore file. Example \: -ks +argument.help.keystorekeypass=Sets the keystore password. Example \: -kspass +argument.help.keystorestorepass=Sets the keystore key password. Example \: -kskeypass +argument.help.keystoretype=Sets the keystore type. Example \: -kstype [PKCS12|JKS|JCEKS] +argument.help.number=Sets the telephone number to use for mobile CCE. Example\: -n +argument.help.output=Sets the output folder or file to use. Example\: -o +argument.help.password=Sets the password to use for mobile CCE. Example\: -p +argument.help.proxyhost=Sets the proxy host to use. Example\: -proxy +argument.help.proxypass=Sets the proxy password to use. Example\: -proxypass +argument.help.proxyport=Sets the proxy port to use. Example\: -proxyport +argument.help.proxyuser=Sets the proxy username to use. Example\: -proxyuser +argument.help.skipfinish=Enables skipping of the "Finish" dialog (if successfully saved) +argument.help.vis=Sets the visibility of a signature. Example\: -v "true" +argument.info.help=The following options are available\: +argument.invalid.bku=CCE argument invalid\! Usage\: +argument.invalid.config=Configuration file argument invalid\! Usage\: +argument.invalid.emblem=Signature logo argument invalid\! Usage\: +argument.invalid.input=Document to sign argument invalid\! Usage\: +argument.invalid.keystorealias=Keystore alias invalid\! Usage\: +argument.invalid.keystorefile=Keystore file invalid\! Usage\: +argument.invalid.keystorekeypass=Keystore key password invalid\! Usage\: +argument.invalid.keystorestorepass=Keystore password invalid\! Usage\: +argument.invalid.keystoretype=Keystore type invalid\! Usage\: +argument.invalid.number=Phone number argument invalid\! Usage\: +argument.invalid.output=Output folder argument invalid\! Usage\: +argument.invalid.password=Mobile CCE password invalid\! Usage\: +argument.invalid.proxyhost=Proxy host argument invalid\! Usage\: +argument.invalid.proxypass=Proxy password argument invalid\! Usage\: +argument.invalid.proxyport=Proxy port argument invalid\! Usage\: +argument.invalid.proxyuser=Proxy username argument invalid\! Usage\: +argument.invalid.vis=Profile Visbility argument invalid\! Usage\: +bku_selection.card=&Card +bku_selection.ks=&Keystore +bku_selection.mobile=&Mobile +common.AllExtension_Description=All files +common.Cancel=C&ancel +common.GIFExtension_Description=GIF files +common.ImageExtension_Description=All supported image files +common.JPGExtension_Description=JPG files +common.KSExtension_Description=Java keystore files +common.KeystoreExtension_Description=Keystore files +common.Ok=O&K +common.PDFExtension_Description=PDF documents +common.PKCS12Extension_Description=PKCS12 keystore files +common.PNGExtension_Description=PNG files +common.Save=&Save +common.browse=&Browse +common.info=Information +common.open=Open +common.warning=Warning +config.About=A&bout %s +config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at http\://demo.a-sit.at/lizenzbedingungen/.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software. +config.Advanced=Ad&vanced +config.Keystore=&Keystore +config.Simple=Basi&c +dataSourceSelection.DropLabel=Drag document here +dataSourceSelection.DropLabel2=or... +dataSourceSelection.browse=&Browse for PDF on your computer +dataSourceSelection.usePlaceholderText=A marker has been found where the creator of the document wants you to put your signature. Do you want to use it? +dataSourceSelection.usePlaceholderTitle=Info +error.ATrustConnection=Connection to A-Trust could not be established +error.CmdLineArgs=Error parsing the command-line arguments\: +error.Details=Details +error.EnteredReferenceValue=You entered the reference value\! +error.FailedToGetSignedDocument=Failed to get signed document. +error.FailedToLoadEmblem=Failed to load the signature logo +error.FailedToLoadQRCode=Failed to load the QR code +error.FailedToOpenDocument=Failed to open signed document\: %s. +error.FailedToSaveSettings=Failed to save configuration file\! +error.FileNotExist=File %s does not exist\! +error.IOError=Input/Output Error +error.Initialization=Initialization failed. Please check your configuration. +error.InvalidBKU=Invalid CCE selection. Please check. +error.InvalidLocale=Locale not valid +error.InvalidPhoneNumber=Given phone number is invalid\! Example\:+43664123456789 +error.InvalidSettings=Invalid settings are still present. Please check your input. +error.KeyStore=Error loading they keystore. Wrong password? +error.KeyStoreAliasExist=Key alias %s not found in keystore +error.KeyStoreAliasNoKey=Alias %s is not a key +error.KeyStoreFileNotExist=Keystore file %s does not exist\! +error.KeyStoreKeyPass=Key password invalid +error.LocalBKU=Please check if a local CCE (citizen card environment) is running\n\nYou need a CCE to access your citizen card. Further information under www.buergerkarte.at +error.MayNotBeAPDF=This may not be a PDF file +error.NoTan=No TAN entered +error.PDFProtected=This PDF file is encrypted and can therefore not be signed +error.PDFPwdProtected=This PDF file is password protected and can therefore not be signed +error.PositioningNotPossible=Manual positioning currently not possible due to a Java Bug. Using automatic positioning. +error.PrepareDocument=Failed to prepare document for signature. +error.Retry=Retry +error.SWTLib=Error loading SWT library +error.SaveOutputFolder=Failed to save signed document to configured output folder. +error.Signatur=Signature error +error.SignaturePanel.NoPage=No page selected +error.SignaturePanel.NoRender=Could not render page +error.TanTooLong=Entered TAN too long +error.Title=Error +error.TitleFatal=Fatal Error +error.Unexpected=Unexpected Error +exception.InvalidEmblemFile=%s is an invalid signature logo file\! +exception.InvalidPort=%s is invalid\: has to be a number between %d and %d +exception.PasswordTooLong=Given password is too long\! +exception.PasswordTooShort=Given password is too short\! +exception.PathNotDirectory=Path %s does not denote a directory\! +exception.PathNotExist=Path %s does not exist\! +keystore.KeystoreKeyPassEntry=Please enter key password\: +keystore.KeystoreStorePassEntry=Please enter keystore password\: +keystore_config.KeystoreAlias=Key alias +keystore_config.KeystoreFile=Keystore file +keystore_config.KeystoreFile.Dialog=Choose the keystore +keystore_config.KeystoreFile.Dialog_Title=Keystore selection +keystore_config.KeystoreFile_ToolTip=Path to the keystore file +keystore_config.KeystoreKeyPass=Key password +keystore_config.KeystoreKeyPass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing. +keystore_config.KeystoreStorePass=Keystore password +keystore_config.KeystoreStorePass_ToolTip=Warning\: The password is stored in plain text. Leave empty to get prompted for password during signing. +keystore_config.KeystoreType=Keystore type +keystore_config.KeystoreType_JKS=Java keystore +keystore_config.KeystoreType_PKCS12=PKCS12 +keystore_config.Keystore_Title=Keystore +keystore_config.Load=Load keystore +keystore_config.Load_ToolTip=Load keystore to show available key aliases +main.about=About %s +main.configuration=Configuration +main.done=Finish +main.hide=Hide %s +main.position=Positioning +main.quit=Quit %s +main.signature=Signing +mobileBKU.aTrustDisclaimer=This service is provided by A-Trust +mobileBKU.certExpiresSoon=Since the validity of your certificate expires in the next few days, a new activation is necessary (free of charge). Press "Yes" to visit https\://www.handy-signatur.at/ now, and then sign in to your account. +mobileBKU.notice=Notice from server\: +mobileBKU.number=Number\: +mobileBKU.password=Password\: +mobileBKU.show=Show signature data +mobileBKU.show_tooltip=Shows the data to be signed +mobileBKU.tan_tries_exceeded=TAN tries exceeded, request a new TAN? +mobileBKU.wrong_tan=TAN not accepted +output.file_ask_overwrite=File %s already exists, do you want to overwrite it? +output.link_open_message=You can open the signed file here. +output.link_save_message=You can save the signed file +output.save_failed=Saving file %s failed\: %s +output.success_message=Signature was successful +positioning.newPage=Create &new Page +positioning.page=Page %d of %d +positioning.placeholder=Please select the signature placeholder\nfrom the drop down list +positioning.removeNewPage=Undo &new Page +positioning.sign=&Sign +positioning.signature=Signature +simple_config.ClearEmblem=Clea&r +simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button \nto select a signature logo. +simple_config.Emblem_Title=Signature &logo +simple_config.ExampleNumber=+43676123456789 +simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here +simple_config.MobileBKU_Title=&Mobile signature +simple_config.Note=Text\: +simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature. +simple_config.Note_Default_Old=This document is signed with a qualified electronic signature. According to \u00A7\u00A04 art.\u00A01 of the Signature Act it in principle is legally equivalent to a handwritten signature. +simple_config.Note_SetDefault=Restore default +simple_config.Note_Title=Signature &Note +simple_config.Note_Tooltip=Add an optional note to display on your Signature +simple_config.PhoneNumber=Mobile number\: +simple_config.SigBlockLang_Title=Signature block lan&guage\: +simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document +simple_config.SIGNATURBLOCK_SMALL=Standard Signature Block +simple_config.AMTSSIGNATURBLOCK=Official Signature +simple_config.BASE_LOGO=Logo Only +simple_config.INVISIBLE=Invisible Signature +tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature. +tanEnter.QR=QR code\: +tanEnter.ReferenceValue=Reference value\: +tanEnter.SMS=Request &SMS +tanEnter.TAN=TAN\: +tanEnter.tries=%d tries left\! +tanEnter.try=Only 1 try left\! +version_check.UpdateText=Version %s is available.\nOpen download page now? +version_check.UpdateTitle=New version available\! +waiting.message=Signature creation in progress... +waiting_for_app.message=Please open Signature-App\! diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties index d8dc0c42..668f3534 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties @@ -1,231 +1,235 @@ -#Eclipse messages class -#Fri Jun 26 18:01:09 CEST 2015 -BKU.KS=Keystore -BKU.LOCAL=Lokale BKU -BKU.MOBILE=Handy-BKU -BKU.NONE=Keine Voreinstellung -BKUSelectionComposite.btnMobile.text=Handy -TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen -advanced_config.AutoPosition=Automatische Positionierung -advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren -advanced_config.BKUSelection_Title=&BKU-Auswahl -advanced_config.BKUSelection_ToolTip=W\u00E4hlen Sie die BKU, mit der die Signatur durchgef\u00FChrt werden soll -advanced_config.KeystoreEnabled=Keystore-Signatur aktivieren -advanced_config.KeystoreEnabled_ToolTip=Aktiviert die M\u00F6glichkeit, mit einem lokalen Keystore zu signieren -advanced_config.LocaleSelection_Title=S&prachauswahl -advanced_config.LocaleSelection_ToolTip=W\u00E4hlen Sie die Sprache f\u00FCr das Benutzerinterface -advanced_config.OutputFolder=Standard-Ausgabeordner\: -advanced_config.OutputFolder.Dialog=W\u00E4hlen Sie einen Ordner -advanced_config.OutputFolder.Dialog_Title=Ausgabeordner w\u00E4hlen -advanced_config.OutputFolder_Title=Ausgabe&ort -advanced_config.OutputFolder_ToolTip=W\u00E4hlen Sie einen Ordner, in dem signierte Dokumente automatisch abgelegt werden (deaktivert, wenn das Feld leer ist; ein einzelner Punkt (".") w\u00E4hlt das Verzeichnis des Ursprungsdokuments) -advanced_config.PdfACompat=PDF/A-Kompatibilit\u00E4t -advanced_config.PdfACompat_ToolTip=Ob die Signatur PDF/A-kompatibel sein soll (erh\u00F6ht PDF-Gr\u00F6\u00DFe) -advanced_config.ProxyHost=Host\: -advanced_config.ProxyHost_Template=Hostname oder IP des Proxy-Servers -advanced_config.ProxyHost_ToolTip=Um einen Proxy zu verwenden Hostname/IP hier eingeben -advanced_config.ProxyPass=Passwort\: -advanced_config.ProxyPass_Template=Passwort f\u00FCr den Proxy-Server -advanced_config.ProxyPass_ToolTip=F\u00FCr Proxy-Authentifizierung Passwort hier eingeben -advanced_config.ProxyPort=Port\: -advanced_config.ProxyPort_Template=Port des Proxy-Servers [1-65535] -advanced_config.ProxyPort_ToolTip=Um einen Proxy zu verwenden Portnummer hier eingeben -advanced_config.ProxyUser=Benutzer\: -advanced_config.ProxyUser_Template=Benutzername f\u00FCr den Proxy-Server -advanced_config.ProxyUser_ToolTip=F\u00FCr Proxy-Authentifizierung Benutzername hier eingeben -advanced_config.Proxy_Title=&Proxy -advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz -advanced_config.SigPHTransparencyMax=Undurchsichtig -advanced_config.SigPHTransparencyMin=Unsichtbar -advanced_config.SigPHTransparencyTooltip=W\u00E4hlt die Transparenz des Signaturplatzhalters im Schritt "Positionierung" -advanced_config.Signature_Title=Si&gnatur -advanced_config.Placeholder_Title=Platzhalter -advanced_config.Placeholder_Enabled=Platzhalter Suche aktivieren -advanced_config.UpdateCheck=Automatisch auf Updates \u00FCberpr\u00FCfen -advanced_config.UpdateCheck_Title=Updates -advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verf\u00FCgbar ist -advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen -advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. -advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen -advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. -argument.error.output=ist kein Ordner -argument.help.autopos=Aktiviert automatische Positionierung der Signatur -argument.help.bku=W\u00E4hlen Sie die BKU. G\u00FCltige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE -argument.help.config=Auswahl der Konfigurationsdatei. Bsp.\: -c -argument.help.emblem=W\u00E4hlt die Bildmarke f\u00FCr die Signatur. Bsp.\: -e -argument.help.help=Zeigt diese Hilfe an -argument.help.input=W\u00E4hlt das zu signierende Dokument. Bsp.\: -i -argument.help.keystorealias=W\u00E4hlt das Keystore Key-Alias. Bsp.\: -ksalias -argument.help.keystorefile=W\u00E4hlt die Keystore-Datei. Bsp.\: -ks -argument.help.keystorekeypass=W\u00E4hlt das Keystore Key-Password. Bsp.\: -kskeypass -argument.help.keystorestorepass=W\u00E4hlt das Keystore-Password. Bsp.\: -kspass -argument.help.keystoretype=W\u00E4hlt den Keystore-Typ. Bsp.\: -kstype [PKCS12|JKS|JCEKS] -argument.help.number=W\u00E4hlt die Telefonnummer f\u00FCr die Handy-BKU. Bsp.\: -n -argument.help.output=W\u00E4hlt den Ausgabeordner oder die Ausgabedatei. Bsp.\: -o -argument.help.password=W\u00E4hlt das Passwort f\u00FCr die Handy-BKU. Bsp.\: -p -argument.help.proxyhost=W\u00E4hlt den Proxy-Server. Bsp.\: -proxy -argument.help.proxypass=W\u00E4hlt das Proxy-Passwort. Bsp.\: -proxypass -argument.help.proxyport=W\u00E4hlt den Proxy-Server-Port. Bsp.\: -proxyport -argument.help.proxyuser=W\u00E4hlt den Proxy-Benutznamen. Bsp.\: -proxyuser -argument.help.skipfinish=Aktiviert das \u00DCberspringen des "Fertig"-Dialogs (falls Speichern erfolgreich) -argument.info.help=Die folgenden Optionen sind verf\u00FCgbar\: -argument.invalid.bku=BKU-Auswahl ung\u00FCltig\! Verwendung\: -argument.invalid.config=Konfigurationsdatei ung\u00FCltig\! Verwendung\: -argument.invalid.emblem=Bildmarke ung\u00FCltig\! Verwendung\: -argument.invalid.input=Dokument ung\u00FCltig\! Verwendung\: -argument.invalid.keystorealias=Keystore-Alias ung\u00FCltig\! Verwendung\: -argument.invalid.keystorefile=Keystore-Datei ung\u00FCltig\! Verwendung\: -argument.invalid.keystorekeypass=Keystore Key-Passwort ung\u00FCltig\! Verwendung\: -argument.invalid.keystorestorepass=Keystore-Passwort ung\u00FCltig\! Verwendung\: -argument.invalid.keystoretype=Keystore-Typ ung\u00FCltig\! Verwendung\: -argument.invalid.number=Telefonnummer ung\u00FCltig\! Verwendung\: -argument.invalid.output=Ausgabeordner ung\u00FCltig\! Verwendung\: -argument.invalid.password=Handy-BKU Passwort ung\u00FCltig\! Verwendung\: -argument.invalid.proxyhost=Proxy-Host ung\u00FCltig\! Verwendung\: -argument.invalid.proxypass=Proxy-Passwort ung\u00FCltig\! Verwendung\: -argument.invalid.proxyport=Proxy-Port ung\u00FCltig\! Verwendung\: -argument.invalid.proxyuser=Proxy-Benutzername ung\u00FCltig\! Verwendung\: -bku_selection.card=&Karte -bku_selection.ks=Key&Store -bku_selection.mobile=&Handy -common.AllExtension_Description=Alle Dateien -common.Cancel=&Abbrechen -common.GIFExtension_Description=GIF-Bilder -common.ImageExtension_Description=Alle unterst\u00FCtzen Bilder -common.JPGExtension_Description=JPG-Bilder -common.KeystoreExtension_Description=Keystores -common.KSExtension_Description=Java Keystores -common.Ok=O&K -common.PDFExtension_Description=PDF-Dokumente -common.PKCS12Extension_Description=PKCS12 Keystores -common.PNGExtension_Description=PNG-Bilder -common.Save=&Speichern -common.browse=&Durchsuchen -common.info=Information -common.open=\u00D6ffnen -common.warning=Warnung -config.About=\u00DC&ber %s -config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter http://demo.a-sit.at/lizenzbedingungen/.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind. -config.Advanced=Er&weitert -config.Keystore=&Keystore -config.Simple=&Einfach -dataSourceSelection.DropLabel=Dokument hierher ziehen -dataSourceSelection.DropLabel2=oder... -dataSourceSelection.browse=&Durchsuchen um ein Dokument zu w\u00E4hlen -dataSourceSelection.usePlaceholderTitle=Info -dataSourceSelection.usePlaceholderText=Im vorliegenden Dokument wurde ein Signaturplatzhalter gefunden. Soll dieser verwendet werden? -error.CmdLineArgs=Fehler bei den Befehlszeilen-Parametern\: -error.Details=Details -error.EnteredReferenceValue=Sie haben den Vergleichswert eingegeben\! -error.FailedToGetSignedDocument=Konnte signiertes Dokument nicht erhalten. -error.FailedToLoadEmblem=Konnte Bildmarke nicht speichern -error.FailedToLoadQRCode=Konnte den QR code nicht laden -error.FailedToOpenDocument=Konnte signiertes Dokument nicht \u00F6ffnen\: %s. -error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern\! -error.FileNotExist=Datei %s existiert nicht\! -error.IOError=Ein-/Ausgabe-Fehler -error.Initialization=Initialisierung fehlgeschlagen. Bitte \u00FCberpr\u00FCfen Sie Ihre Konfiguration. -error.InvalidBKU=Ung\u00FCltige BKU-Auswahl. Bitte \u00FCberpr\u00FCfen. -error.InvalidLocale=Ung\u00FCltige Sprache -error.InvalidPhoneNumber=Telefonnummer ung\u00FCltig\! Beispiel\: +43664123456789 -error.InvalidSettings=Ung\u00FCltige Einstellungen vorhanden. Bitte \u00FCberpr\u00FCfen. -error.KeyStore=Fehler beim Laden des KeyStores. Falsches Passwort? -error.KeyStoreAliasExist=Key-Alias %s nicht im Keystore gefunden -error.KeyStoreAliasNoKey=Alias %s ist kein Schlüssel -error.KeyStoreFileNotExist=Keystore-Datei %s existiert nicht\! -error.KeyStoreKeyPass=Schl\u00FCssel-Passwort nicht akzeptiert -error.LocalBKU=Bitte pr\u00FCfen sie, ob Ihre lokale BKU (B\u00FCrgerkartenumgebung) l\u00E4uft\n\nSie ben\u00F6tigen eine BKU, um auf Ihre B\u00FCrgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at -error.MayNotBeAPDF=Dies ist m\u00F6glicherweise keine PDF-Datei -error.NoTan=Keine TAN eingeben -error.PDFProtected=Diese PDF-Datei ist verschl\u00FCsselt und kann daher nicht signiert werden -error.PDFPwdProtected=Diese PDF-Datei ist Passwortgesch\u00FCtzt und kann daher nicht signiert werden -error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verf\u00FCgbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt. -error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten. -error.Retry=Wiederholen -error.SWTLib=Fehler beim Laden der SWT-Bibliothek -error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern. -error.Signatur=Signatur-Fehler -error.SignaturePanel.NoPage=Keine Seite gew\u00E4hlt -error.SignaturePanel.NoRender=Konnte Seite nicht darstellen -error.TanTooLong=Eingegebene TAN zu lange -error.Title=Fehler -error.TitleFatal=Fataler Fehler -error.Unexpected=Unerwarteter Fehler -error.ATrustConnection=Verbindung zu A-Trust konnte nicht aufgebaut werden -exception.InvalidEmblemFile=%s ist eine ung\u00FCltige Bildmarken-Datei\! -exception.InvalidPort=%s ist ung\u00FCltig\: muss eine Nummer zwischen %d und %d sein. -exception.PasswordTooLong=Eingegebenes Passwort ist zu lange\! -exception.PasswordTooShort=Eingegebenes Passwort ist zu kurz\! -exception.PathNotDirectory=Pfad %s ist kein g\u00FCltiger Ordner\! -exception.PathNotExist=Pfad %s existiert nicht\! -keystore.KeystoreStorePassEntry=Keystore-Passwort eingeben: -keystore.KeystoreKeyPassEntry=Schl\u00FCssel-Passwort eingeben: -keystore_config.Keystore_Title=Keystore -keystore_config.KeystoreAlias=Schl\u00FCssel-Alias -keystore_config.KeystoreFile=Keystore-Datei -keystore_config.KeystoreFile_ToolTip=Pfad zur Keystore-Datei -keystore_config.KeystoreFile.Dialog=W\u00E4hlen Sie den Keystore -keystore_config.KeystoreFile.Dialog_Title=Keystore w\u00E4hlen -keystore_config.KeystoreKeyPass=Schl\u00FCssel-Passwort -keystore_config.KeystoreKeyPass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden. -keystore_config.KeystoreStorePass=Keystore-Passwort -keystore_config.KeystoreStorePass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden. -keystore_config.KeystoreType=Keystore-Typ -keystore_config.KeystoreType_JKS=Java-Keystore -keystore_config.KeystoreType_PKCS12=PKCS12 -keystore_config.Load=Keystore laden -keystore_config.Load_ToolTip=Keystore laden, um die verf\u00FCgbaren Schl\u00FCssel-Aliases anzuzeigen -main.about=\u00DCber %s -main.configuration=Konfiguration -main.done=Fertig -main.hide=%s ausblenden -main.position=Positionierung -main.quit=%s beenden -main.signature=Signatur -mobileBKU.aTrustDisclaimer=Dieses Service wird von der Fa. A-Trust zu Verf\u00FCgung gestellt -mobileBKU.certExpiresSoon=Da die G\u00FCltigkeit Ihres Zertifikats in den n\u00E4chsten Tagen endet, ist eine erneute Aktivierung erforderlich (geb\u00FChrenfrei). W\u00E4hlen Sie "Ja" um https\://www.handy-signatur.at/ zu \u00F6ffnen, und loggen Sie sich dann in Ihr Konto ein. -mobileBKU.notice=Nachricht vom Server\: -mobileBKU.number=Nummer\: -mobileBKU.password=Passwort\: -mobileBKU.show=Signaturdaten anzeigen -mobileBKU.show_tooltip=Zeigt die zu signierenden Daten an -mobileBKU.tan_tries_exceeded=Zu viele TAN-Versuche, neue TAN anfordern? -mobileBKU.wrong_tan=TAN nicht akzeptiert -output.file_ask_overwrite=Datei %s existiert bereits, wollen Sie sie \u00FCberschreiben? -output.link_open_message=Sie k\u00F6nnen das signierte Dokument hier \u00F6ffnen. -output.link_save_message=Sie k\u00F6nnen das signierte Dokument speichern -output.save_failed=Datei %s konnte nicht gespeichert werden\: %s -output.success_message=Signatur war erfolgreich -positioning.newPage=&Neue Seite anlegen -positioning.page=Seite %d von %d -positioning.removeNewPage=&Neue Seite r\u00FCckg\u00E4ngig -positioning.sign=&Signieren -positioning.signature=Signatur -simple_config.ClearEmblem=Ent&fernen -simple_config.EmblemEmpty=Ziehen Sie ein Bild hierher\noder verwenden sie Durchsuchen \num eine Bildmarke zu w\u00E4hlen. -simple_config.Emblem_Title=&Bildmarke -simple_config.ExampleNumber=+43676123456789 -simple_config.ExampleNumber_ToolTip=Um die Handynummer voreinzustellen hier eingeben -simple_config.MobileBKU_Title=&Handy-Signatur -simple_config.Note=Text\: -simple_config.Note_Default=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument hat gem\u00E4\u00DF Art. 25 Abs. 2 der Verordnung (EU) Nr. 910/2014 vom 23.\u00A0Juli\u00A02014 ("eIDAS-VO") die gleiche Rechtswirkung wie ein handschriftlich unterschriebenes Dokument. -simple_config.Note_Default_Old=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument ist gem\u00E4\u00DF \u00A7\u00A04 Abs.\u00A01 Signaturgesetz einem handschriftlich unterschriebenen Dokument grunds\u00E4tzlich rechtlich gleichgestellt. -simple_config.Note_SetDefault=Standard wiederherstellen -simple_config.Note_Title=Signaturhi&nweis -simple_config.Note_Tooltip=Ein optionaler Hinweis, der in Ihrer Signatur angezeigt wird -simple_config.PhoneNumber=Handynummer\: -simple_config.SigBlockLang_Title=Sp&rache des Signaturblocks\: -simple_config.SigBlockLang_ToolTip=W\u00E4hlen Sie eine Sprache f\u00FCr den Signaturblock, der am signierten Dokument erscheint -tanEnter.QR=QR Code\: -tanEnter.FP=Bitte \u00f6ffnen Sie die Handy-Signatur App\nund best\u00e4tigen Sie die Signatur. -tanEnter.ReferenceValue=Vergleichswert\: -tanEnter.SMS=&SMS anfordern -tanEnter.TAN=TAN\: -tanEnter.APPTAN=Bitte \u00f6ffnen Sie die Handy-Signatur App\nTAN\: -tanEnter.tries=%d Versuche \u00FCbrig\! -tanEnter.try=Nur noch 1 Versuch \u00FCbrig\! -version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u00F6ffnen? -version_check.UpdateTitle=Neue Version verf\u00FCgbar\! -waiting.message=Signaturerstellung l\u00E4uft... -waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App! -positioning.placeholder=Bitte wählen Sie den gewünschte\nPlatzhalter aus der Liste aus +#Eclipse messages class +#Fri Jun 26 18:01:09 CEST 2015 +BKU.KS=Keystore +BKU.LOCAL=Lokale BKU +BKU.MOBILE=Handy-BKU +BKU.NONE=Keine Voreinstellung +BKUSelectionComposite.btnMobile.text=Handy +TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen +advanced_config.AutoPosition=Automatische Positionierung +advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren +advanced_config.BKUSelection_Title=&BKU-Auswahl +advanced_config.BKUSelection_ToolTip=W\u00E4hlen Sie die BKU, mit der die Signatur durchgef\u00FChrt werden soll +advanced_config.KeystoreEnabled=Keystore-Signatur aktivieren +advanced_config.KeystoreEnabled_ToolTip=Aktiviert die M\u00F6glichkeit, mit einem lokalen Keystore zu signieren +advanced_config.LocaleSelection_Title=S&prachauswahl +advanced_config.LocaleSelection_ToolTip=W\u00E4hlen Sie die Sprache f\u00FCr das Benutzerinterface +advanced_config.OutputFolder=Standard-Ausgabeordner\: +advanced_config.OutputFolder.Dialog=W\u00E4hlen Sie einen Ordner +advanced_config.OutputFolder.Dialog_Title=Ausgabeordner w\u00E4hlen +advanced_config.OutputFolder_Title=Ausgabe&ort +advanced_config.OutputFolder_ToolTip=W\u00E4hlen Sie einen Ordner, in dem signierte Dokumente automatisch abgelegt werden (deaktivert, wenn das Feld leer ist; ein einzelner Punkt (".") w\u00E4hlt das Verzeichnis des Ursprungsdokuments) +advanced_config.PdfACompat=PDF/A-Kompatibilit\u00E4t +advanced_config.PdfACompat_ToolTip=Ob die Signatur PDF/A-kompatibel sein soll (erh\u00F6ht PDF-Gr\u00F6\u00DFe) +advanced_config.ProxyHost=Host\: +advanced_config.ProxyHost_Template=Hostname oder IP des Proxy-Servers +advanced_config.ProxyHost_ToolTip=Um einen Proxy zu verwenden Hostname/IP hier eingeben +advanced_config.ProxyPass=Passwort\: +advanced_config.ProxyPass_Template=Passwort f\u00FCr den Proxy-Server +advanced_config.ProxyPass_ToolTip=F\u00FCr Proxy-Authentifizierung Passwort hier eingeben +advanced_config.ProxyPort=Port\: +advanced_config.ProxyPort_Template=Port des Proxy-Servers [1-65535] +advanced_config.ProxyPort_ToolTip=Um einen Proxy zu verwenden Portnummer hier eingeben +advanced_config.ProxyUser=Benutzer\: +advanced_config.ProxyUser_Template=Benutzername f\u00FCr den Proxy-Server +advanced_config.ProxyUser_ToolTip=F\u00FCr Proxy-Authentifizierung Benutzername hier eingeben +advanced_config.Proxy_Title=&Proxy +advanced_config.SigPHTransparency=Signaturplatzhalter-Transparenz +advanced_config.SigPHTransparencyMax=Undurchsichtig +advanced_config.SigPHTransparencyMin=Unsichtbar +advanced_config.SigPHTransparencyTooltip=W\u00E4hlt die Transparenz des Signaturplatzhalters im Schritt "Positionierung" +advanced_config.Signature_Title=Si&gnatur +advanced_config.Placeholder_Title=Platzhalter +advanced_config.Placeholder_Enabled=Platzhalter Suche aktivieren +advanced_config.UpdateCheck=Automatisch auf Updates \u00FCberpr\u00FCfen +advanced_config.UpdateCheck_Title=Updates +advanced_config.UpdateCheck_ToolTip=Zeigt eine Benachrichtigung, wenn eine neue Version verf\u00FCgbar ist +advanced_config.UseMarker=Nach QR-Code Signaturplatzhaltern suchen +advanced_config.UseMarker_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. +advanced_config.UseSignatureFields=Nach Signaturfelder-Platzhaltern suchen +advanced_config.UseSignatureFields_ToolTip=Aktivieren Sie diese Option, um das Dokument nach Signaturplatzhaltern zu durchsuchen. Sollte ein Platzhatler gefunden werden werden Sie gefragt ob Sie die Signatur in den Platzhalter einf\u00FCgen wollen. +argument.error.output=ist kein Ordner +argument.help.autopos=Aktiviert automatische Positionierung der Signatur +argument.help.bku=W\u00E4hlen Sie die BKU. G\u00FCltige Werte\: LOCAL, MOBILE, KS. Bsp.\: -b MOBILE +argument.help.config=Auswahl der Konfigurationsdatei. Bsp.\: -c +argument.help.emblem=W\u00E4hlt die Bildmarke f\u00FCr die Signatur. Bsp.\: -e +argument.help.help=Zeigt diese Hilfe an +argument.help.input=W\u00E4hlt das zu signierende Dokument. Bsp.\: -i +argument.help.keystorealias=W\u00E4hlt das Keystore Key-Alias. Bsp.\: -ksalias +argument.help.keystorefile=W\u00E4hlt die Keystore-Datei. Bsp.\: -ks +argument.help.keystorekeypass=W\u00E4hlt das Keystore Key-Password. Bsp.\: -kskeypass +argument.help.keystorestorepass=W\u00E4hlt das Keystore-Password. Bsp.\: -kspass +argument.help.keystoretype=W\u00E4hlt den Keystore-Typ. Bsp.\: -kstype [PKCS12|JKS|JCEKS] +argument.help.number=W\u00E4hlt die Telefonnummer f\u00FCr die Handy-BKU. Bsp.\: -n +argument.help.output=W\u00E4hlt den Ausgabeordner oder die Ausgabedatei. Bsp.\: -o +argument.help.password=W\u00E4hlt das Passwort f\u00FCr die Handy-BKU. Bsp.\: -p +argument.help.proxyhost=W\u00E4hlt den Proxy-Server. Bsp.\: -proxy +argument.help.proxypass=W\u00E4hlt das Proxy-Passwort. Bsp.\: -proxypass +argument.help.proxyport=W\u00E4hlt den Proxy-Server-Port. Bsp.\: -proxyport +argument.help.proxyuser=W\u00E4hlt den Proxy-Benutznamen. Bsp.\: -proxyuser +argument.help.skipfinish=Aktiviert das \u00DCberspringen des "Fertig"-Dialogs (falls Speichern erfolgreich) +argument.info.help=Die folgenden Optionen sind verf\u00FCgbar\: +argument.invalid.bku=BKU-Auswahl ung\u00FCltig\! Verwendung\: +argument.invalid.config=Konfigurationsdatei ung\u00FCltig\! Verwendung\: +argument.invalid.emblem=Bildmarke ung\u00FCltig\! Verwendung\: +argument.invalid.input=Dokument ung\u00FCltig\! Verwendung\: +argument.invalid.keystorealias=Keystore-Alias ung\u00FCltig\! Verwendung\: +argument.invalid.keystorefile=Keystore-Datei ung\u00FCltig\! Verwendung\: +argument.invalid.keystorekeypass=Keystore Key-Passwort ung\u00FCltig\! Verwendung\: +argument.invalid.keystorestorepass=Keystore-Passwort ung\u00FCltig\! Verwendung\: +argument.invalid.keystoretype=Keystore-Typ ung\u00FCltig\! Verwendung\: +argument.invalid.number=Telefonnummer ung\u00FCltig\! Verwendung\: +argument.invalid.output=Ausgabeordner ung\u00FCltig\! Verwendung\: +argument.invalid.password=Handy-BKU Passwort ung\u00FCltig\! Verwendung\: +argument.invalid.proxyhost=Proxy-Host ung\u00FCltig\! Verwendung\: +argument.invalid.proxypass=Proxy-Passwort ung\u00FCltig\! Verwendung\: +argument.invalid.proxyport=Proxy-Port ung\u00FCltig\! Verwendung\: +argument.invalid.proxyuser=Proxy-Benutzername ung\u00FCltig\! Verwendung\: +bku_selection.card=&Karte +bku_selection.ks=Key&Store +bku_selection.mobile=&Handy +common.AllExtension_Description=Alle Dateien +common.Cancel=&Abbrechen +common.GIFExtension_Description=GIF-Bilder +common.ImageExtension_Description=Alle unterst\u00FCtzen Bilder +common.JPGExtension_Description=JPG-Bilder +common.KeystoreExtension_Description=Keystores +common.KSExtension_Description=Java Keystores +common.Ok=O&K +common.PDFExtension_Description=PDF-Dokumente +common.PKCS12Extension_Description=PKCS12 Keystores +common.PNGExtension_Description=PNG-Bilder +common.Save=&Speichern +common.browse=&Durchsuchen +common.info=Information +common.open=\u00D6ffnen +common.warning=Warnung +config.About=\u00DC&ber %s +config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter http://demo.a-sit.at/lizenzbedingungen/.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind. +config.Advanced=Er&weitert +config.Keystore=&Keystore +config.Simple=&Einfach +dataSourceSelection.DropLabel=Dokument hierher ziehen +dataSourceSelection.DropLabel2=oder... +dataSourceSelection.browse=&Durchsuchen um ein Dokument zu w\u00E4hlen +dataSourceSelection.usePlaceholderTitle=Info +dataSourceSelection.usePlaceholderText=Im vorliegenden Dokument wurde ein Signaturplatzhalter gefunden. Soll dieser verwendet werden? +error.CmdLineArgs=Fehler bei den Befehlszeilen-Parametern\: +error.Details=Details +error.EnteredReferenceValue=Sie haben den Vergleichswert eingegeben\! +error.FailedToGetSignedDocument=Konnte signiertes Dokument nicht erhalten. +error.FailedToLoadEmblem=Konnte Bildmarke nicht speichern +error.FailedToLoadQRCode=Konnte den QR code nicht laden +error.FailedToOpenDocument=Konnte signiertes Dokument nicht \u00F6ffnen\: %s. +error.FailedToSaveSettings=Konnte Konfigurationsdatei nicht speichern\! +error.FileNotExist=Datei %s existiert nicht\! +error.IOError=Ein-/Ausgabe-Fehler +error.Initialization=Initialisierung fehlgeschlagen. Bitte \u00FCberpr\u00FCfen Sie Ihre Konfiguration. +error.InvalidBKU=Ung\u00FCltige BKU-Auswahl. Bitte \u00FCberpr\u00FCfen. +error.InvalidLocale=Ung\u00FCltige Sprache +error.InvalidPhoneNumber=Telefonnummer ung\u00FCltig\! Beispiel\: +43664123456789 +error.InvalidSettings=Ung\u00FCltige Einstellungen vorhanden. Bitte \u00FCberpr\u00FCfen. +error.KeyStore=Fehler beim Laden des KeyStores. Falsches Passwort? +error.KeyStoreAliasExist=Key-Alias %s nicht im Keystore gefunden +error.KeyStoreAliasNoKey=Alias %s ist kein Schlüssel +error.KeyStoreFileNotExist=Keystore-Datei %s existiert nicht\! +error.KeyStoreKeyPass=Schl\u00FCssel-Passwort nicht akzeptiert +error.LocalBKU=Bitte pr\u00FCfen sie, ob Ihre lokale BKU (B\u00FCrgerkartenumgebung) l\u00E4uft\n\nSie ben\u00F6tigen eine BKU, um auf Ihre B\u00FCrgerkarte zuzugreifen. Weitere Informationen unter www.buergerkarte.at +error.MayNotBeAPDF=Dies ist m\u00F6glicherweise keine PDF-Datei +error.NoTan=Keine TAN eingeben +error.PDFProtected=Diese PDF-Datei ist verschl\u00FCsselt und kann daher nicht signiert werden +error.PDFPwdProtected=Diese PDF-Datei ist Passwortgesch\u00FCtzt und kann daher nicht signiert werden +error.PositioningNotPossible=Positionsauswahl ist im Moment nicht verf\u00FCgbar wegen eines Java Fehlers. Die Position wird automatisch bestimmt. +error.PrepareDocument=Konnte Dokument nicht zur Signatur vorbereiten. +error.Retry=Wiederholen +error.SWTLib=Fehler beim Laden der SWT-Bibliothek +error.SaveOutputFolder=Konnte Dokument nicht in den konfigurierten Ausgabeordner speichern. +error.Signatur=Signatur-Fehler +error.SignaturePanel.NoPage=Keine Seite gew\u00E4hlt +error.SignaturePanel.NoRender=Konnte Seite nicht darstellen +error.TanTooLong=Eingegebene TAN zu lange +error.Title=Fehler +error.TitleFatal=Fataler Fehler +error.Unexpected=Unerwarteter Fehler +error.ATrustConnection=Verbindung zu A-Trust konnte nicht aufgebaut werden +exception.InvalidEmblemFile=%s ist eine ung\u00FCltige Bildmarken-Datei\! +exception.InvalidPort=%s ist ung\u00FCltig\: muss eine Nummer zwischen %d und %d sein. +exception.PasswordTooLong=Eingegebenes Passwort ist zu lange\! +exception.PasswordTooShort=Eingegebenes Passwort ist zu kurz\! +exception.PathNotDirectory=Pfad %s ist kein g\u00FCltiger Ordner\! +exception.PathNotExist=Pfad %s existiert nicht\! +keystore.KeystoreStorePassEntry=Keystore-Passwort eingeben: +keystore.KeystoreKeyPassEntry=Schl\u00FCssel-Passwort eingeben: +keystore_config.Keystore_Title=Keystore +keystore_config.KeystoreAlias=Schl\u00FCssel-Alias +keystore_config.KeystoreFile=Keystore-Datei +keystore_config.KeystoreFile_ToolTip=Pfad zur Keystore-Datei +keystore_config.KeystoreFile.Dialog=W\u00E4hlen Sie den Keystore +keystore_config.KeystoreFile.Dialog_Title=Keystore w\u00E4hlen +keystore_config.KeystoreKeyPass=Schl\u00FCssel-Passwort +keystore_config.KeystoreKeyPass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden. +keystore_config.KeystoreStorePass=Keystore-Passwort +keystore_config.KeystoreStorePass_ToolTip=Achtung: das Passwort wird im Klartext gespeichert. Leer lassen, um beim Signieren zur Eingabe aufgefordert zu werden. +keystore_config.KeystoreType=Keystore-Typ +keystore_config.KeystoreType_JKS=Java-Keystore +keystore_config.KeystoreType_PKCS12=PKCS12 +keystore_config.Load=Keystore laden +keystore_config.Load_ToolTip=Keystore laden, um die verf\u00FCgbaren Schl\u00FCssel-Aliases anzuzeigen +main.about=\u00DCber %s +main.configuration=Konfiguration +main.done=Fertig +main.hide=%s ausblenden +main.position=Positionierung +main.quit=%s beenden +main.signature=Signatur +mobileBKU.aTrustDisclaimer=Dieses Service wird von der Fa. A-Trust zu Verf\u00FCgung gestellt +mobileBKU.certExpiresSoon=Da die G\u00FCltigkeit Ihres Zertifikats in den n\u00E4chsten Tagen endet, ist eine erneute Aktivierung erforderlich (geb\u00FChrenfrei). W\u00E4hlen Sie "Ja" um https\://www.handy-signatur.at/ zu \u00F6ffnen, und loggen Sie sich dann in Ihr Konto ein. +mobileBKU.notice=Nachricht vom Server\: +mobileBKU.number=Nummer\: +mobileBKU.password=Passwort\: +mobileBKU.show=Signaturdaten anzeigen +mobileBKU.show_tooltip=Zeigt die zu signierenden Daten an +mobileBKU.tan_tries_exceeded=Zu viele TAN-Versuche, neue TAN anfordern? +mobileBKU.wrong_tan=TAN nicht akzeptiert +output.file_ask_overwrite=Datei %s existiert bereits, wollen Sie sie \u00FCberschreiben? +output.link_open_message=Sie k\u00F6nnen das signierte Dokument hier \u00F6ffnen. +output.link_save_message=Sie k\u00F6nnen das signierte Dokument speichern +output.save_failed=Datei %s konnte nicht gespeichert werden\: %s +output.success_message=Signatur war erfolgreich +positioning.newPage=&Neue Seite anlegen +positioning.page=Seite %d von %d +positioning.removeNewPage=&Neue Seite r\u00FCckg\u00E4ngig +positioning.sign=&Signieren +positioning.signature=Signatur +simple_config.ClearEmblem=Ent&fernen +simple_config.EmblemEmpty=Ziehen Sie ein Bild hierher\noder verwenden sie Durchsuchen \num eine Bildmarke zu w\u00E4hlen. +simple_config.Emblem_Title=&Bildmarke +simple_config.ExampleNumber=+43676123456789 +simple_config.ExampleNumber_ToolTip=Um die Handynummer voreinzustellen hier eingeben +simple_config.MobileBKU_Title=&Handy-Signatur +simple_config.Note=Text\: +simple_config.Note_Default=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument hat gem\u00E4\u00DF Art. 25 Abs. 2 der Verordnung (EU) Nr. 910/2014 vom 23.\u00A0Juli\u00A02014 ("eIDAS-VO") die gleiche Rechtswirkung wie ein handschriftlich unterschriebenes Dokument. +simple_config.Note_Default_Old=Dieses mit einer qualifizierten elektronischen Signatur versehene Dokument ist gem\u00E4\u00DF \u00A7\u00A04 Abs.\u00A01 Signaturgesetz einem handschriftlich unterschriebenen Dokument grunds\u00E4tzlich rechtlich gleichgestellt. +simple_config.Note_SetDefault=Standard wiederherstellen +simple_config.Note_Title=Signaturhi&nweis +simple_config.Note_Tooltip=Ein optionaler Hinweis, der in Ihrer Signatur angezeigt wird +simple_config.PhoneNumber=Handynummer\: +simple_config.SigBlockLang_Title=Sp&rache des Signaturblocks\: +simple_config.SigBlockLang_ToolTip=W\u00E4hlen Sie eine Sprache f\u00FCr den Signaturblock, der am signierten Dokument erscheint +simple_config.SIGNATURBLOCK_SMALL=Standard Signaturblock +simple_config.AMTSSIGNATURBLOCK=Amtssignatur +simple_config.BASE_LOGO=Nur Bildmarke +simple_config.INVISIBLE=Unsichtbar +tanEnter.QR=QR Code\: +tanEnter.FP=Bitte \u00f6ffnen Sie die Handy-Signatur App\nund best\u00e4tigen Sie die Signatur. +tanEnter.ReferenceValue=Vergleichswert\: +tanEnter.SMS=&SMS anfordern +tanEnter.TAN=TAN\: +tanEnter.APPTAN=Bitte \u00f6ffnen Sie die Handy-Signatur App\nTAN\: +tanEnter.tries=%d Versuche \u00FCbrig\! +tanEnter.try=Nur noch 1 Versuch \u00FCbrig\! +version_check.UpdateText=Version %s ist verf\u00FCgbar\nJetzt Download-Seite \u00F6ffnen? +version_check.UpdateTitle=Neue Version verf\u00FCgbar\! +waiting.message=Signaturerstellung l\u00E4uft... +waiting_for_app.message=Bitte \u00f6ffnen Sie die Handy-Signatur App! +positioning.placeholder=Bitte wählen Sie den gewünschte\nPlatzhalter aus der Liste aus -- cgit v1.2.3 From 21540b68c6e2088435bd1aa643d1ae543c5e5337 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 11:30:08 +0100 Subject: AdvancedConfig extended --- .../composites/AdvancedConfigurationComposite.java | 45 ++++++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) 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 3d8d7726..c29abb33 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 @@ -94,12 +94,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { List bkuStrings; Button btnKeystoreEnabled; - private Group grpSpeicherort; - private Label lblDefaultOutputFolder; + private final Group grpSpeicherort; + private final Label lblDefaultOutputFolder; Text txtOutputFolder; - private Button btnBrowse; + private final Button btnBrowse; + private final Label lblSaveFilePostFix; + private final Text txtSaveFilePostFix; - private Group grpLocaleAuswahl; + private final Group grpLocaleAuswahl; Combo cmbLocaleAuswahl; private Group grpUpdateCheck; @@ -500,6 +502,41 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { } } }); + + + this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE); + FormData fd_lblSaveFilePostFix = new FormData(); + fd_lblSaveFilePostFix.top = new FormAttachment(this.lblDefaultOutputFolder); + fd_lblSaveFilePostFix.left = new FormAttachment(0, 5); + this.lblSaveFilePostFix.setLayoutData(fd_lblSaveFilePostFix); + + FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont() + .getFontData(); + fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), + fD_lblSaveFilePostFix[0])); + + this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.NONE); + FormData fd_PostFix = new FormData(); + fd_PostFix.top = new FormAttachment(this.lblSaveFilePostFix, 5); + fd_PostFix.left = new FormAttachment(0, 15); + this.txtSaveFilePostFix.setLayoutData(fd_text); + + FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont() + .getFontData(); + fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), + fD_txtOutputFolder[0])); + + this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + //performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix + //.getText()); + } + }); + this.grpLocaleAuswahl = new Group(this, SWT.NONE); FormLayout layout_grpLocaleAuswahl = new FormLayout(); -- cgit v1.2.3 From ba13450bf503469436b63789553163746bab7e43 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 13:53:31 +0100 Subject: New grid layout implemented to support postfix file names --- pdf-over-gui/.gitignore | 29 +-- .../composites/AdvancedConfigurationComposite.java | 197 ++++++++++----------- .../at/asit/pdfover/gui/messages.properties | 15 +- 3 files changed, 114 insertions(+), 127 deletions(-) diff --git a/pdf-over-gui/.gitignore b/pdf-over-gui/.gitignore index cc8bf14e..d344eef6 100644 --- a/pdf-over-gui/.gitignore +++ b/pdf-over-gui/.gitignore @@ -1,14 +1,15 @@ -# SVN repo files -.svn/ - -# Eclipse project files -.project -.classpath -.settings/ -.euml2 -.umlproject - -# Other -target/ -log/ -*~ +# SVN repo files +.svn/ + +# Eclipse project files +.project +.classpath +.settings/ +.euml2 +.umlproject + +# Other +target/ +log/ +*~ +/bin/ 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 c29abb33..34b6535a 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 @@ -412,13 +412,11 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { }); this.grpSpeicherort = new Group(this, SWT.NONE); - layout = new FormLayout(); - layout.marginHeight = 10; - layout.marginWidth = 5; - this.grpSpeicherort.setLayout(layout); + GridLayout gl_grpSpeicherort = new GridLayout(3, false); + grpSpeicherort.setLayout(gl_grpSpeicherort); FormData fd_grpSpeicherort = new FormData(); + fd_grpSpeicherort.left = new FormAttachment(100, -499); fd_grpSpeicherort.top = new FormAttachment(this.grpBkuAuswahl, 5); - fd_grpSpeicherort.left = new FormAttachment(0, 5); fd_grpSpeicherort.right = new FormAttachment(100, -5); this.grpSpeicherort.setLayoutData(fd_grpSpeicherort); @@ -428,114 +426,101 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fD_grpSpeicherort[0])); this.lblDefaultOutputFolder = new Label(this.grpSpeicherort, SWT.NONE); - FormData fd_lblDefaultOutputFolder = new FormData(); - fd_lblDefaultOutputFolder.top = new FormAttachment(0); - fd_lblDefaultOutputFolder.left = new FormAttachment(0, 5); - this.lblDefaultOutputFolder.setLayoutData(fd_lblDefaultOutputFolder); FontData[] fD_lblDefaultOutputFolder = this.lblDefaultOutputFolder.getFont() .getFontData(); fD_lblDefaultOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), fD_lblDefaultOutputFolder[0])); - - this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); - FormData fd_text = new FormData(); - fd_text.top = new FormAttachment(this.lblDefaultOutputFolder, 5); - fd_text.left = new FormAttachment(0, 15); - this.txtOutputFolder.setLayoutData(fd_text); - - FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont() - .getFontData(); + + this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); + GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); + gd_txtOutputFolder.widthHint = 291; + txtOutputFolder.setLayoutData(gd_txtOutputFolder); + + FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont() + .getFontData(); + this.txtOutputFolder.setFont(new Font(Display.getCurrent(), + fD_txtOutputFolder[0])); + + this.txtOutputFolder.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder + .getText()); + } + }); fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.txtOutputFolder.setFont(new Font(Display.getCurrent(), - fD_txtOutputFolder[0])); - - this.txtOutputFolder.addFocusListener(new FocusAdapter() { - - @Override - public void focusLost(FocusEvent e) { - performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder - .getText()); - } - }); - - this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE); - fd_text.right = new FormAttachment(this.btnBrowse, -5); - - FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData(); - fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0])); - - FormData fd_btnBrowse = new FormData(); - fd_btnBrowse.top = new FormAttachment(this.lblDefaultOutputFolder, 5); - fd_btnBrowse.right = new FormAttachment(100, -5); - this.btnBrowse.setLayoutData(fd_btnBrowse); - - this.btnBrowse.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent e) { - DirectoryDialog dlg = new DirectoryDialog( - AdvancedConfigurationComposite.this.getShell()); - - // Set the initial filter path according - // to anything they've selected or typed in - dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder - .getText()); - - // Change the title bar text - dlg.setText(Messages - .getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$ - - // Customizable message displayed in the dialog - dlg.setMessage(Messages - .getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$ - - // Calling open() will open and run the dialog. - // It will return the selected directory, or - // null if user cancels - String dir = dlg.open(); - if (dir != null) { - // Set the text box to the new selection - performOutputFolderChanged(dir); - } - } - }); - - - this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE); - FormData fd_lblSaveFilePostFix = new FormData(); - fd_lblSaveFilePostFix.top = new FormAttachment(this.lblDefaultOutputFolder); - fd_lblSaveFilePostFix.left = new FormAttachment(0, 5); - this.lblSaveFilePostFix.setLayoutData(fd_lblSaveFilePostFix); - - FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont() - .getFontData(); +// fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); + + this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE); + btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); + + FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData(); + this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0])); + + this.btnBrowse.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + DirectoryDialog dlg = new DirectoryDialog( + AdvancedConfigurationComposite.this.getShell()); + + // Set the initial filter path according + // to anything they've selected or typed in + dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder + .getText()); + + // Change the title bar text + dlg.setText(Messages + .getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$ + + // Customizable message displayed in the dialog + dlg.setMessage(Messages + .getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$ + + // Calling open() will open and run the dialog. + // It will return the selected directory, or + // null if user cancels + String dir = dlg.open(); + if (dir != null) { + // Set the text box to the new selection + performOutputFolderChanged(dir); + } + } + }); + + + this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE); + lblSaveFilePostFix.setText(Messages.getString("AdvancedConfigurationComposite.lblSaveFilePostFix.text")); + + FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont() + .getFontData(); + this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), + fD_lblSaveFilePostFix[0])); + + this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER); + GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); + gd_txtSaveFilePostFix.widthHint = 256; + txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix); + + FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont() + .getFontData(); + this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), + fD_txtPostFix[0])); + + this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + //performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix + //.getText()); + } + }); + new Label(grpSpeicherort, SWT.NONE); fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), - fD_lblSaveFilePostFix[0])); - - this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.NONE); - FormData fd_PostFix = new FormData(); - fd_PostFix.top = new FormAttachment(this.lblSaveFilePostFix, 5); - fd_PostFix.left = new FormAttachment(0, 15); - this.txtSaveFilePostFix.setLayoutData(fd_text); - - FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont() - .getFontData(); - fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), - fD_txtOutputFolder[0])); - - this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { - - @Override - public void focusLost(FocusEvent e) { - //performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix - //.getText()); - } - }); + fD_txtPostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.grpLocaleAuswahl = new Group(this, SWT.NONE); @@ -544,7 +529,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { layout_grpLocaleAuswahl.marginWidth = 5; this.grpLocaleAuswahl.setLayout(layout_grpLocaleAuswahl); FormData fd_grpLocaleAuswahl = new FormData(); - fd_grpLocaleAuswahl.top = new FormAttachment(this.grpSpeicherort, 5); + fd_grpLocaleAuswahl.top = new FormAttachment(grpSpeicherort, 5); fd_grpLocaleAuswahl.left = new FormAttachment(0, 5); fd_grpLocaleAuswahl.right = new FormAttachment(100, -5); this.grpLocaleAuswahl.setLayoutData(fd_grpLocaleAuswahl); diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 4764a1af..2fc0713e 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -1,5 +1,6 @@ #Eclipse messages class -#Mon Dec 02 13:17:21 CET 2019 +#Thu Nov 19 13:14:07 CET 2020 +AdvancedConfigurationComposite.lblSaveFilePostFix.text=Save File Postfix BKU.KS=Keystore BKU.LOCAL=Local CCE BKU.MOBILE=Mobile CCE @@ -28,6 +29,8 @@ advanced_config.OutputFolder_Title=&Output location advanced_config.OutputFolder_ToolTip=Select the folder where the signed document will be saved automatically (clear this field to disable automatic saving, enter a single dot (".") to denote the input document directory) advanced_config.PdfACompat=PDF/A compatibility advanced_config.PdfACompat_ToolTip=Whether to make signature PDF/A compatible (increases pdf size) +advanced_config.Placeholder_Enabled=Enable placeholder search +advanced_config.Placeholder_Title=Placeholder advanced_config.ProxyHost=Host\: advanced_config.ProxyHost_Template=Hostname or IP of the proxy server advanced_config.ProxyHost_ToolTip=To use a proxy server enter the hostname or the IP here @@ -46,8 +49,6 @@ advanced_config.SigPHTransparencyMax=Opaque advanced_config.SigPHTransparencyMin=Invisible advanced_config.SigPHTransparencyTooltip=Set the transparency of the signature placeholder in the positioning step advanced_config.Signature_Title=Si&gnature -advanced_config.Placeholder_Title=Placeholder -advanced_config.Placeholder_Enabled=Enable placeholder search advanced_config.UpdateCheck=Automatically check for updates advanced_config.UpdateCheck_Title=Updates advanced_config.UpdateCheck_ToolTip=Shows a notification when a new version is available @@ -211,11 +212,14 @@ positioning.placeholder=Please select the signature placeholder\nfrom the drop d positioning.removeNewPage=Undo &new Page positioning.sign=&Sign positioning.signature=Signature +simple_config.AMTSSIGNATURBLOCK=Official Signature +simple_config.BASE_LOGO=Logo Only simple_config.ClearEmblem=Clea&r simple_config.EmblemEmpty=Drag and Drop an image here\nor use the browse button \nto select a signature logo. simple_config.Emblem_Title=Signature &logo simple_config.ExampleNumber=+43676123456789 simple_config.ExampleNumber_ToolTip=To use a default mobile phone number enter it here +simple_config.INVISIBLE=Invisible Signature simple_config.MobileBKU_Title=&Mobile signature simple_config.Note=Text\: simple_config.Note_Default=This document is signed with a qualified electronic signature. According to Art.\u00A025 para.\u00A02 of the Regulation (EU) No 910/2014 of 23. July 2014 ("eIDAS-Regulation") it shall have the equivalent legal effect of a handwritten signature. @@ -224,12 +228,9 @@ simple_config.Note_SetDefault=Restore default simple_config.Note_Title=Signature &Note simple_config.Note_Tooltip=Add an optional note to display on your Signature simple_config.PhoneNumber=Mobile number\: +simple_config.SIGNATURBLOCK_SMALL=Standard Signature Block simple_config.SigBlockLang_Title=Signature block lan&guage\: simple_config.SigBlockLang_ToolTip=Select the language to be used in the signature block displayed on the signed document -simple_config.SIGNATURBLOCK_SMALL=Standard Signature Block -simple_config.AMTSSIGNATURBLOCK=Official Signature -simple_config.BASE_LOGO=Logo Only -simple_config.INVISIBLE=Invisible Signature tanEnter.FP=Please open the Handy-Signature app\nand confirm the signature. tanEnter.QR=QR code\: tanEnter.ReferenceValue=Reference value\: -- cgit v1.2.3 From 4a77926f1ccfe2aed8c04dc7eb6180511e9920a3 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 14:07:46 +0100 Subject: Small improvement in Advanced GUI --- .../composites/AdvancedConfigurationComposite.java | 693 +++++++++------------ .../at/asit/pdfover/gui/messages.properties | 4 +- 2 files changed, 293 insertions(+), 404 deletions(-) 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 34b6535a..94474c66 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 @@ -71,19 +71,17 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { /** * SLF4J Logger instance **/ - private static final Logger log = LoggerFactory - .getLogger(AdvancedConfigurationComposite.class); - + private static final Logger log = LoggerFactory.getLogger(AdvancedConfigurationComposite.class); private ConfigurationComposite configurationComposite; private Group grpSignatur; - private Group grpPlaceholder; + private Group grpPlaceholder; Button btnAutomatischePositionierung; Button btnPdfACompat; Button btnPlatzhalterVerwenden; - Button btnSignatureFieldsUsage; - Button btnEnablePlaceholderUsage; + Button btnSignatureFieldsUsage; + Button btnEnablePlaceholderUsage; private Label lblTransparenz; private Label lblTransparenzLinks; private Label lblTransparenzRechts; @@ -117,7 +115,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FormData fd_txtProxyPort; FormData fd_txtProxyPortErrorMarker; - /** * @param parent * @param style @@ -125,8 +122,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { * @param container * @param config */ - public AdvancedConfigurationComposite(Composite parent, int style, - State state, ConfigurationContainer container, + public AdvancedConfigurationComposite(Composite parent, int style, State state, ConfigurationContainer container, ConfigurationComposite config) { super(parent, style, state, container); this.configurationComposite = config; @@ -145,73 +141,55 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_grpSignaturPosition = this.grpSignatur.getFont().getFontData(); fD_grpSignaturPosition[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpSignatur.setFont(new Font(Display.getCurrent(), - fD_grpSignaturPosition[0])); + this.grpSignatur.setFont(new Font(Display.getCurrent(), fD_grpSignaturPosition[0])); this.btnAutomatischePositionierung = new Button(this.grpSignatur, SWT.CHECK); FormData fd_btnAutomatischePositionierung = new FormData(); fd_btnAutomatischePositionierung.right = new FormAttachment(100, -5); fd_btnAutomatischePositionierung.top = new FormAttachment(0); fd_btnAutomatischePositionierung.left = new FormAttachment(0, 5); - this.btnAutomatischePositionierung - .setLayoutData(fd_btnAutomatischePositionierung); - - FontData[] fD_btnAutomatischePositionierung = this.btnAutomatischePositionierung - .getFont().getFontData(); - fD_btnAutomatischePositionierung[0] - .setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnAutomatischePositionierung.setFont(new Font(Display - .getCurrent(), fD_btnAutomatischePositionierung[0])); - - this.btnAutomatischePositionierung - .addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - AdvancedConfigurationComposite.this - .performPositionSelection(AdvancedConfigurationComposite.this.btnAutomatischePositionierung - .getSelection()); - } - }); - - + this.btnAutomatischePositionierung.setLayoutData(fd_btnAutomatischePositionierung); + + FontData[] fD_btnAutomatischePositionierung = this.btnAutomatischePositionierung.getFont().getFontData(); + fD_btnAutomatischePositionierung[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnAutomatischePositionierung.setFont(new Font(Display.getCurrent(), fD_btnAutomatischePositionierung[0])); + + this.btnAutomatischePositionierung.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + AdvancedConfigurationComposite.this.performPositionSelection( + AdvancedConfigurationComposite.this.btnAutomatischePositionierung.getSelection()); + } + }); this.btnPdfACompat = new Button(this.grpSignatur, SWT.CHECK); FormData fd_btnPdfACompat = new FormData(); fd_btnPdfACompat.right = new FormAttachment(100, -5); - fd_btnPdfACompat.top = new FormAttachment( - this.btnAutomatischePositionierung, 5); + fd_btnPdfACompat.top = new FormAttachment(this.btnAutomatischePositionierung, 5); fd_btnPdfACompat.left = new FormAttachment(0, 5); - this.btnPdfACompat - .setLayoutData(fd_btnPdfACompat); - - FontData[] fD_btnPdfACompat = this.btnPdfACompat - .getFont().getFontData(); - fD_btnPdfACompat[0] - .setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnPdfACompat.setFont(new Font(Display - .getCurrent(), fD_btnPdfACompat[0])); - - this.btnPdfACompat - .addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - AdvancedConfigurationComposite.this - .performPdfACompatSelection(AdvancedConfigurationComposite.this.btnPdfACompat - .getSelection()); - } - }); + this.btnPdfACompat.setLayoutData(fd_btnPdfACompat); + + FontData[] fD_btnPdfACompat = this.btnPdfACompat.getFont().getFontData(); + fD_btnPdfACompat[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnPdfACompat.setFont(new Font(Display.getCurrent(), fD_btnPdfACompat[0])); + + this.btnPdfACompat.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + AdvancedConfigurationComposite.this + .performPdfACompatSelection(AdvancedConfigurationComposite.this.btnPdfACompat.getSelection()); + } + }); this.lblTransparenz = new Label(this.grpSignatur, SWT.HORIZONTAL); FormData fd_lblTransparenz = new FormData(); - fd_lblTransparenz.top = new FormAttachment( - this.btnPdfACompat, 5); + fd_lblTransparenz.top = new FormAttachment(this.btnPdfACompat, 5); fd_lblTransparenz.left = new FormAttachment(0, 5); this.lblTransparenz.setLayoutData(fd_lblTransparenz); FontData[] fD_lblTransparenz = this.lblTransparenz.getFont().getFontData(); fD_lblTransparenz[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblTransparenz.setFont(new Font(Display.getCurrent(), - fD_lblTransparenz[0])); + this.lblTransparenz.setFont(new Font(Display.getCurrent(), fD_lblTransparenz[0])); this.lblTransparenzLinks = new Label(this.grpSignatur, SWT.HORIZONTAL); FormData fd_lblTransparenzLinks = new FormData(); @@ -219,11 +197,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fd_lblTransparenzLinks.left = new FormAttachment(0, 15); this.lblTransparenzLinks.setLayoutData(fd_lblTransparenzLinks); - FontData[] fD_lblTransparenzLinks = this.lblTransparenzLinks.getFont() - .getFontData(); + FontData[] fD_lblTransparenzLinks = this.lblTransparenzLinks.getFont().getFontData(); fD_lblTransparenzLinks[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblTransparenzLinks.setFont(new Font(Display.getCurrent(), - fD_lblTransparenzLinks[0])); + this.lblTransparenzLinks.setFont(new Font(Display.getCurrent(), fD_lblTransparenzLinks[0])); this.lblTransparenzRechts = new Label(this.grpSignatur, SWT.HORIZONTAL); FormData fd_lblTransparenzRechts = new FormData(); @@ -231,11 +207,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fd_lblTransparenzRechts.right = new FormAttachment(100, -5); this.lblTransparenzRechts.setLayoutData(fd_lblTransparenzRechts); - FontData[] fD_lblTransparenzRechts = this.lblTransparenzRechts.getFont() - .getFontData(); + FontData[] fD_lblTransparenzRechts = this.lblTransparenzRechts.getFont().getFontData(); fD_lblTransparenzRechts[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblTransparenzRechts.setFont(new Font(Display.getCurrent(), - fD_lblTransparenzRechts[0])); + this.lblTransparenzRechts.setFont(new Font(Display.getCurrent(), fD_lblTransparenzRechts[0])); this.sclTransparenz = new Scale(this.grpSignatur, SWT.HORIZONTAL); FormData fd_sldTransparenz = new FormData(); @@ -250,30 +224,26 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.sclTransparenz.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - performPlaceholderTransparency(AdvancedConfigurationComposite.this.sclTransparenz - .getSelection()); + performPlaceholderTransparency(AdvancedConfigurationComposite.this.sclTransparenz.getSelection()); } }); - - + this.grpPlaceholder = new Group(this, SWT.NONE); FormLayout layout_grpPlaceholder = new FormLayout(); layout_grpPlaceholder.marginHeight = 10; layout_grpPlaceholder.marginWidth = 5; this.grpPlaceholder.setLayout(layout_grpPlaceholder); - + FormData fd_grpPlaceholder = new FormData(); fd_grpPlaceholder.top = new FormAttachment(this.grpSignatur, 5); fd_grpPlaceholder.right = new FormAttachment(100, -5); fd_grpPlaceholder.left = new FormAttachment(0, 5); this.grpPlaceholder.setLayoutData(fd_grpPlaceholder); - + FontData[] fD_grpPlaceholder = this.grpPlaceholder.getFont().getFontData(); fD_grpPlaceholder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpPlaceholder.setFont(new Font(Display.getCurrent(), - fD_grpPlaceholder[0])); - - + this.grpPlaceholder.setFont(new Font(Display.getCurrent(), fD_grpPlaceholder[0])); + this.btnEnablePlaceholderUsage = new Button(this.grpPlaceholder, SWT.CHECK); FormData fd_btnEnablePlaceholderUsage = new FormData(); fd_btnEnablePlaceholderUsage.right = new FormAttachment(100, -5); @@ -311,19 +281,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { AdvancedConfigurationComposite.this.btnPlatzhalterVerwenden.getSelection()); } }); - + this.btnSignatureFieldsUsage = new Button(this.grpPlaceholder, SWT.RADIO); FormData fd_btnSignatureFieldsUsage = new FormData(); fd_btnSignatureFieldsUsage.right = new FormAttachment(100, -5); fd_btnSignatureFieldsUsage.top = new FormAttachment(this.btnPlatzhalterVerwenden, 5); fd_btnSignatureFieldsUsage.left = new FormAttachment(0, 5); this.btnSignatureFieldsUsage.setLayoutData(fd_btnSignatureFieldsUsage); - - + FontData[] fD_btnSignatureFieldsUsage = this.btnSignatureFieldsUsage.getFont().getFontData(); fD_btnSignatureFieldsUsage[0].setHeight(Constants.TEXT_SIZE_BUTTON); this.btnSignatureFieldsUsage.setFont(new Font(Display.getCurrent(), fD_btnSignatureFieldsUsage[0])); - + this.btnSignatureFieldsUsage.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -331,7 +300,6 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { AdvancedConfigurationComposite.this.btnSignatureFieldsUsage.getSelection()); } }); - this.grpBkuAuswahl = new Group(this, SWT.NONE); layout = new FormLayout(); @@ -346,8 +314,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_grpBkuAuswahl = this.grpBkuAuswahl.getFont().getFontData(); fD_grpBkuAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpBkuAuswahl.setFont(new Font(Display.getCurrent(), - fD_grpBkuAuswahl[0])); + this.grpBkuAuswahl.setFont(new Font(Display.getCurrent(), fD_grpBkuAuswahl[0])); this.cmbBKUAuswahl = new Combo(this.grpBkuAuswahl, SWT.READ_ONLY); FormData fd_cmbBKUAuswahl = new FormData(); @@ -356,11 +323,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fd_cmbBKUAuswahl.left = new FormAttachment(0, 5); this.cmbBKUAuswahl.setLayoutData(fd_cmbBKUAuswahl); - FontData[] fD_cmbBKUAuswahl = this.cmbBKUAuswahl.getFont() - .getFontData(); + FontData[] fD_cmbBKUAuswahl = this.cmbBKUAuswahl.getFont().getFontData(); fD_cmbBKUAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.cmbBKUAuswahl.setFont(new Font(Display.getCurrent(), - fD_cmbBKUAuswahl[0])); + this.cmbBKUAuswahl.setFont(new Font(Display.getCurrent(), fD_cmbBKUAuswahl[0])); int blen = BKUs.values().length; this.bkuStrings = new ArrayList<>(blen); @@ -374,15 +339,11 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { @Override public void widgetSelected(SelectionEvent e) { int selectionIndex = getBKUElementIndex( - AdvancedConfigurationComposite.this.configurationContainer - .getDefaultBKU()); - if (AdvancedConfigurationComposite.this.cmbBKUAuswahl - .getSelectionIndex() != selectionIndex) { - selectionIndex = AdvancedConfigurationComposite.this.cmbBKUAuswahl - .getSelectionIndex(); + AdvancedConfigurationComposite.this.configurationContainer.getDefaultBKU()); + if (AdvancedConfigurationComposite.this.cmbBKUAuswahl.getSelectionIndex() != selectionIndex) { + selectionIndex = AdvancedConfigurationComposite.this.cmbBKUAuswahl.getSelectionIndex(); performBKUSelectionChanged( - AdvancedConfigurationComposite.this.cmbBKUAuswahl - .getItem(selectionIndex)); + AdvancedConfigurationComposite.this.cmbBKUAuswahl.getItem(selectionIndex)); } } }); @@ -390,18 +351,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.btnKeystoreEnabled = new Button(this.grpBkuAuswahl, SWT.CHECK); FormData fd_btnKeystoreEnabled = new FormData(); fd_btnKeystoreEnabled.right = new FormAttachment(100, -5); - fd_btnKeystoreEnabled.top = new FormAttachment( - this.cmbBKUAuswahl, 5); + fd_btnKeystoreEnabled.top = new FormAttachment(this.cmbBKUAuswahl, 5); fd_btnKeystoreEnabled.left = new FormAttachment(0, 5); - this.btnKeystoreEnabled - .setLayoutData(fd_btnKeystoreEnabled); + this.btnKeystoreEnabled.setLayoutData(fd_btnKeystoreEnabled); - FontData[] fD_btnKeystoreEnabled = this.btnKeystoreEnabled - .getFont().getFontData(); - fD_btnKeystoreEnabled[0] - .setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnKeystoreEnabled.setFont(new Font(Display - .getCurrent(), fD_btnKeystoreEnabled[0])); + FontData[] fD_btnKeystoreEnabled = this.btnKeystoreEnabled.getFont().getFontData(); + fD_btnKeystoreEnabled[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnKeystoreEnabled.setFont(new Font(Display.getCurrent(), fD_btnKeystoreEnabled[0])); this.btnKeystoreEnabled.addSelectionListener(new SelectionAdapter() { @Override @@ -422,107 +378,92 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_grpSpeicherort = this.grpSpeicherort.getFont().getFontData(); fD_grpSpeicherort[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpSpeicherort.setFont(new Font(Display.getCurrent(), - fD_grpSpeicherort[0])); + this.grpSpeicherort.setFont(new Font(Display.getCurrent(), fD_grpSpeicherort[0])); this.lblDefaultOutputFolder = new Label(this.grpSpeicherort, SWT.NONE); - FontData[] fD_lblDefaultOutputFolder = this.lblDefaultOutputFolder.getFont() - .getFontData(); + FontData[] fD_lblDefaultOutputFolder = this.lblDefaultOutputFolder.getFont().getFontData(); fD_lblDefaultOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), - fD_lblDefaultOutputFolder[0])); - - this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); - GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); - gd_txtOutputFolder.widthHint = 291; - txtOutputFolder.setLayoutData(gd_txtOutputFolder); - - FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont() - .getFontData(); - this.txtOutputFolder.setFont(new Font(Display.getCurrent(), - fD_txtOutputFolder[0])); - - this.txtOutputFolder.addFocusListener(new FocusAdapter() { - - @Override - public void focusLost(FocusEvent e) { - performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder - .getText()); - } - }); + this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), fD_lblDefaultOutputFolder[0])); + + this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); + GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); + gd_txtOutputFolder.widthHint = 291; + txtOutputFolder.setLayoutData(gd_txtOutputFolder); + + FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont().getFontData(); + this.txtOutputFolder.setFont(new Font(Display.getCurrent(), fD_txtOutputFolder[0])); + + this.txtOutputFolder.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + performOutputFolderChanged(AdvancedConfigurationComposite.this.txtOutputFolder.getText()); + } + }); fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); -// fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); - - this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE); - btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); - - FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData(); - this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0])); - - this.btnBrowse.addSelectionListener(new SelectionAdapter() { - - @Override - public void widgetSelected(SelectionEvent e) { - DirectoryDialog dlg = new DirectoryDialog( - AdvancedConfigurationComposite.this.getShell()); - - // Set the initial filter path according - // to anything they've selected or typed in - dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder - .getText()); - - // Change the title bar text - dlg.setText(Messages - .getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$ - - // Customizable message displayed in the dialog - dlg.setMessage(Messages - .getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$ - - // Calling open() will open and run the dialog. - // It will return the selected directory, or - // null if user cancels - String dir = dlg.open(); - if (dir != null) { - // Set the text box to the new selection - performOutputFolderChanged(dir); - } - } - }); - - - this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE); - lblSaveFilePostFix.setText(Messages.getString("AdvancedConfigurationComposite.lblSaveFilePostFix.text")); - - FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont() - .getFontData(); - this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), - fD_lblSaveFilePostFix[0])); - - this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER); - GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); - gd_txtSaveFilePostFix.widthHint = 256; - txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix); - - FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont() - .getFontData(); - this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), - fD_txtPostFix[0])); - - this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { - - @Override - public void focusLost(FocusEvent e) { - //performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix - //.getText()); - } - }); + // fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); + + this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE); + btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); + + FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData(); + this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0])); + + this.btnBrowse.addSelectionListener(new SelectionAdapter() { + + @Override + public void widgetSelected(SelectionEvent e) { + DirectoryDialog dlg = new DirectoryDialog(AdvancedConfigurationComposite.this.getShell()); + + // Set the initial filter path according + // to anything they've selected or typed in + dlg.setFilterPath(AdvancedConfigurationComposite.this.txtOutputFolder.getText()); + + // Change the title bar text + dlg.setText(Messages.getString("advanced_config.OutputFolder.Dialog_Title")); //$NON-NLS-1$ + + // Customizable message displayed in the dialog + dlg.setMessage(Messages.getString("advanced_config.OutputFolder.Dialog")); //$NON-NLS-1$ + + // Calling open() will open and run the dialog. + // It will return the selected directory, or + // null if user cancels + String dir = dlg.open(); + if (dir != null) { + // Set the text box to the new selection + performOutputFolderChanged(dir); + } + } + }); + + this.lblSaveFilePostFix = new Label(this.grpSpeicherort, SWT.NONE); + lblSaveFilePostFix.setText(Messages.getString("AdvancedConfigurationComposite.lblSaveFilePostFix.text")); + + FontData[] fD_lblSaveFilePostFix = this.lblSaveFilePostFix.getFont().getFontData(); + fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_lblSaveFilePostFix[0])); + + this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER); + GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); +// gd_txtSaveFilePostFix.widthHint = 256; + txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix); + + FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont().getFontData(); + this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_txtPostFix[0])); + + this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { + + @Override + public void focusLost(FocusEvent e) { + // performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix + // .getText()); + } + }); new Label(grpSpeicherort, SWT.NONE); fD_lblSaveFilePostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); fD_txtPostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpLocaleAuswahl = new Group(this, SWT.NONE); FormLayout layout_grpLocaleAuswahl = new FormLayout(); layout_grpLocaleAuswahl.marginHeight = 10; @@ -536,8 +477,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_grpLocaleAuswahl = this.grpLocaleAuswahl.getFont().getFontData(); fD_grpLocaleAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpLocaleAuswahl.setFont(new Font(Display.getCurrent(), - fD_grpLocaleAuswahl[0])); + this.grpLocaleAuswahl.setFont(new Font(Display.getCurrent(), fD_grpLocaleAuswahl[0])); this.cmbLocaleAuswahl = new Combo(this.grpLocaleAuswahl, SWT.READ_ONLY); FormData fd_cmbLocaleAuswahl = new FormData(); @@ -546,11 +486,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { fd_cmbLocaleAuswahl.left = new FormAttachment(0, 5); this.cmbLocaleAuswahl.setLayoutData(fd_cmbLocaleAuswahl); - FontData[] fD_cmbLocaleAuswahl = this.cmbLocaleAuswahl.getFont() - .getFontData(); + FontData[] fD_cmbLocaleAuswahl = this.cmbLocaleAuswahl.getFont().getFontData(); fD_cmbLocaleAuswahl[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.cmbLocaleAuswahl.setFont(new Font(Display.getCurrent(), - fD_cmbLocaleAuswahl[0])); + this.cmbLocaleAuswahl.setFont(new Font(Display.getCurrent(), fD_cmbLocaleAuswahl[0])); String[] localeStrings = new String[Constants.SUPPORTED_LOCALES.length]; for (int i = 0; i < Constants.SUPPORTED_LOCALES.length; ++i) { @@ -560,11 +498,9 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.cmbLocaleAuswahl.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - Locale currentLocale = AdvancedConfigurationComposite.this.configurationContainer - .getLocale(); - Locale selectedLocale = Constants. - SUPPORTED_LOCALES[AdvancedConfigurationComposite.this.cmbLocaleAuswahl - .getSelectionIndex()]; + Locale currentLocale = AdvancedConfigurationComposite.this.configurationContainer.getLocale(); + Locale selectedLocale = Constants.SUPPORTED_LOCALES[AdvancedConfigurationComposite.this.cmbLocaleAuswahl + .getSelectionIndex()]; if (!currentLocale.equals(selectedLocale)) { performLocaleSelectionChanged(selectedLocale); } @@ -584,33 +520,26 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_grpUpdateCheck = this.grpUpdateCheck.getFont().getFontData(); fD_grpUpdateCheck[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.grpUpdateCheck.setFont(new Font(Display.getCurrent(), - fD_grpUpdateCheck[0])); + this.grpUpdateCheck.setFont(new Font(Display.getCurrent(), fD_grpUpdateCheck[0])); this.btnUpdateCheck = new Button(this.grpUpdateCheck, SWT.CHECK); FormData fd_btnUpdateCheck = new FormData(); fd_btnUpdateCheck.right = new FormAttachment(100, -5); fd_btnUpdateCheck.top = new FormAttachment(0); fd_btnUpdateCheck.left = new FormAttachment(0, 5); - this.btnUpdateCheck - .setLayoutData(fd_btnUpdateCheck); - - FontData[] fD_btnUpdateCheck = this.btnUpdateCheck - .getFont().getFontData(); - fD_btnUpdateCheck[0] - .setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnUpdateCheck.setFont(new Font(Display - .getCurrent(), fD_btnUpdateCheck[0])); - - this.btnUpdateCheck - .addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - AdvancedConfigurationComposite.this - .performUpdateCheckSelection(AdvancedConfigurationComposite.this.btnUpdateCheck - .getSelection()); - } - }); + this.btnUpdateCheck.setLayoutData(fd_btnUpdateCheck); + + FontData[] fD_btnUpdateCheck = this.btnUpdateCheck.getFont().getFontData(); + fD_btnUpdateCheck[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnUpdateCheck.setFont(new Font(Display.getCurrent(), fD_btnUpdateCheck[0])); + + this.btnUpdateCheck.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + AdvancedConfigurationComposite.this + .performUpdateCheckSelection(AdvancedConfigurationComposite.this.btnUpdateCheck.getSelection()); + } + }); this.grpProxy = new Group(this, SWT.NONE); FormData fd_grpProxy = new FormData(); @@ -625,21 +554,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.grpProxy.setFont(new Font(Display.getCurrent(), fD_grpProxy[0])); this.lblProxyHost = new Label(this.grpProxy, SWT.NONE); - GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false, - false, 1, 1); + GridData gd_lblProxyHost = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1); gd_lblProxyHost.widthHint = 66; this.lblProxyHost.setLayoutData(gd_lblProxyHost); this.lblProxyHost.setBounds(0, 0, 57, 15); FontData[] fD_lblProxyHost = this.lblProxyHost.getFont().getFontData(); fD_lblProxyHost[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblProxyHost.setFont(new Font(Display.getCurrent(), - fD_lblProxyHost[0])); + this.lblProxyHost.setFont(new Font(Display.getCurrent(), fD_lblProxyHost[0])); Composite compProxyHostContainer = new Composite(this.grpProxy, SWT.NONE); compProxyHostContainer.setLayout(new FormLayout()); - compProxyHostContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, - 1, 1)); + compProxyHostContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); this.txtProxyHost = new Text(compProxyHostContainer, SWT.BORDER); FormData fd_txtProxyHost = new FormData(); fd_txtProxyHost.right = new FormAttachment(100, -42); @@ -648,8 +574,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_txtProxyHost = this.txtProxyHost.getFont().getFontData(); fD_txtProxyHost[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.txtProxyHost.setFont(new Font(Display.getCurrent(), - fD_txtProxyHost[0])); + this.txtProxyHost.setFont(new Font(Display.getCurrent(), fD_txtProxyHost[0])); this.proxyHostErrorMarker = new ErrorMarker(compProxyHostContainer, SWT.NONE, ""); //$NON-NLS-1$ @@ -680,16 +605,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.lblProxyPort = new Label(this.grpProxy, SWT.NONE); this.lblProxyPort.setBounds(0, 0, 57, 15); - FontData[] fD_lblProxyPort = this.lblProxyPort.getFont() - .getFontData(); + FontData[] fD_lblProxyPort = this.lblProxyPort.getFont().getFontData(); fD_lblProxyPort[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lblProxyPort.setFont(new Font(Display.getCurrent(), - fD_lblProxyPort[0])); + this.lblProxyPort.setFont(new Font(Display.getCurrent(), fD_lblProxyPort[0])); Composite compProxyPortContainer = new Composite(this.grpProxy, SWT.NONE); compProxyPortContainer.setLayout(new FormLayout()); - compProxyPortContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, - 1, 1)); + compProxyPortContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1)); this.txtProxyPort = new Text(compProxyPortContainer, SWT.BORDER); this.fd_txtProxyPort = new FormData(); @@ -700,8 +622,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { FontData[] fD_txtProxyPort = this.txtProxyPort.getFont().getFontData(); fD_txtProxyPort[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.txtProxyPort.setFont(new Font(Display.getCurrent(), - fD_txtProxyPort[0])); + this.txtProxyPort.setFont(new Font(Display.getCurrent(), fD_txtProxyPort[0])); this.txtProxyPort.addTraverseListener(e -> { if (e.detail == SWT.TRAVERSE_RETURN) { @@ -715,8 +636,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.fd_txtProxyPortErrorMarker.right = new FormAttachment(100); this.fd_txtProxyPortErrorMarker.top = new FormAttachment(0); this.fd_txtProxyPortErrorMarker.bottom = new FormAttachment(0, 32); - this.txtProxyPortErrorMarker - .setLayoutData(this.fd_txtProxyPortErrorMarker); + this.txtProxyPortErrorMarker.setLayoutData(this.fd_txtProxyPortErrorMarker); this.txtProxyPortErrorMarker.setVisible(false); this.txtProxyPort.addFocusListener(new FocusAdapter() { @@ -770,8 +690,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.performBKUSelectionChanged(bkuvalue); } catch (Exception ex) { log.error("Failed to parse BKU value: {} {}", selected, ex); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), Messages.getString("error.InvalidBKU"), BUTTONS.OK); //$NON-NLS-1$ dialog.open(); } } @@ -800,7 +719,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { log.warn("NO Locale match for {}", locale); //$NON-NLS-1$ return 0; } - + void performLocaleSelectionChanged(Locale selected) { log.debug("Selected Locale: {}", selected); //$NON-NLS-1$ this.configurationContainer.setLocale(selected); @@ -823,14 +742,14 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.configurationContainer.setUseSignatureFields(useFields); this.btnSignatureFieldsUsage.setSelection(useFields); } - + void performEnableUsePlaceholder(boolean enable) { this.btnPlatzhalterVerwenden.setEnabled(enable); this.btnSignatureFieldsUsage.setEnabled(enable); this.configurationContainer.setEnablePlaceholderUsage(enable); this.btnEnablePlaceholderUsage.setSelection(enable); } - + void performPdfACompatSelection(boolean compat) { this.configurationContainer.setSignaturePdfACompat(compat); this.btnPdfACompat.setSelection(compat); @@ -915,6 +834,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { /* * (non-Javadoc) + * * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() */ @Override @@ -922,78 +842,68 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { // Nothing to do here } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#initConfiguration(at.asit.pdfover.gui.workflow.config.PersistentConfigProvider) + /* + * (non-Javadoc) + * + * @see + * at.asit.pdfover.gui.composites.BaseConfigurationComposite#initConfiguration( + * at.asit.pdfover.gui.workflow.config.PersistentConfigProvider) */ @Override public void initConfiguration(PersistentConfigProvider provider) { - this.configurationContainer.setDefaultSignaturePosition( - provider.getDefaultSignaturePositionPersistent()); + this.configurationContainer.setDefaultSignaturePosition(provider.getDefaultSignaturePositionPersistent()); this.configurationContainer.setUseMarker(provider.getUseMarker()); this.configurationContainer.setUseSignatureFields(provider.getUseSignatureFields()); this.configurationContainer.setEnablePlaceholderUsage(provider.getEnablePlaceholderUsage()); - this.configurationContainer.setSignaturePdfACompat( - provider.getSignaturePdfACompat()); - this.configurationContainer.setPlaceholderTransparency( - provider.getPlaceholderTransparency()); + this.configurationContainer.setSignaturePdfACompat(provider.getSignaturePdfACompat()); + this.configurationContainer.setPlaceholderTransparency(provider.getPlaceholderTransparency()); - this.configurationContainer.setDefaultBKU( - provider.getDefaultBKUPersistent()); - this.configurationContainer.setKeyStoreEnabled( - provider.getKeyStoreEnabledPersistent()); + this.configurationContainer.setDefaultBKU(provider.getDefaultBKUPersistent()); + this.configurationContainer.setKeyStoreEnabled(provider.getKeyStoreEnabledPersistent()); - this.configurationContainer.setOutputFolder( - provider.getDefaultOutputFolderPersistent()); + this.configurationContainer.setOutputFolder(provider.getDefaultOutputFolderPersistent()); this.configurationContainer.setLocale(provider.getLocale()); - this.configurationContainer.setUpdateCheck( - provider.getUpdateCheck()); + this.configurationContainer.setUpdateCheck(provider.getUpdateCheck()); - this.configurationContainer.setProxyHost( - provider.getProxyHostPersistent()); + this.configurationContainer.setProxyHost(provider.getProxyHostPersistent()); try { - this.configurationContainer.setProxyPort( - provider.getProxyPortPersistent()); + this.configurationContainer.setProxyPort(provider.getProxyPortPersistent()); } catch (InvalidPortException e) { log.error("Failed to set proxy port!", e); //$NON-NLS-1$ } - this.configurationContainer.setProxyUser( - provider.getProxyUserPersistent()); - this.configurationContainer.setProxyPass( - provider.getProxyPassPersistent()); + this.configurationContainer.setProxyUser(provider.getProxyUserPersistent()); + this.configurationContainer.setProxyPass(provider.getProxyPassPersistent()); this.configurationContainer.setSignatureProfile(Profile.getProfile(provider.getSignatureProfile())); } /* * (non-Javadoc) - * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration() + * + * @see + * at.asit.pdfover.gui.composites.BaseConfigurationComposite#loadConfiguration() */ @Override public void loadConfiguration() { // load advanced settings - performBKUSelectionChanged(this.configurationContainer - .getDefaultBKU()); + performBKUSelectionChanged(this.configurationContainer.getDefaultBKU()); String outputFolder = this.configurationContainer.getOutputFolder(); if (outputFolder != null) { performOutputFolderChanged(outputFolder); } - SignaturePosition pos = this.configurationContainer - .getDefaultSignaturePosition(); + SignaturePosition pos = this.configurationContainer.getDefaultSignaturePosition(); performPositionSelection(pos != null && pos.useAutoPositioning()); performUseMarkerSelection(this.configurationContainer.getUseMarker()); performUseSignatureFieldsSelection(this.configurationContainer.getUseSignatureFields()); performEnableUsePlaceholder(this.configurationContainer.getEnablePlaceholderUsage()); - this.sclTransparenz.setSelection(this.configurationContainer - .getPlaceholderTransparency()); + this.sclTransparenz.setSelection(this.configurationContainer.getPlaceholderTransparency()); performLocaleSelectionChanged(this.configurationContainer.getLocale()); performPdfACompatSelection(this.configurationContainer.getSignaturePdfACompat()); performKeystoreEnabledSelection(this.configurationContainer.getKeyStoreEnabled()); performUpdateCheckSelection(this.configurationContainer.getUpdateCheck()); performSetSignatureProfile(this.configurationContainer.getSignatureProfile()); - int port = this.configurationContainer.getProxyPort(); if (port > 0) { this.txtProxyPort.setText(Integer.toString(port)); @@ -1003,44 +913,44 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { if (host != null) { this.txtProxyHost.setText(host); } - -} + } /** - * @param profile + * @param profile * */ public void performSetSignatureProfile(Profile profile) { - switch (profile){ - case INVISIBLE: - case AMTSSIGNATURBLOCK: - this.performPositionSelection(true); - this.btnAutomatischePositionierung.setEnabled(false); - this.btnEnablePlaceholderUsage.setEnabled(true); - this.performEnableUsePlaceholder(false); - break; - default: - this.btnAutomatischePositionierung.setEnabled(true); - this.btnEnablePlaceholderUsage.setEnabled(true); + switch (profile) { + case INVISIBLE: + case AMTSSIGNATURBLOCK: + this.performPositionSelection(true); + this.btnAutomatischePositionierung.setEnabled(false); + this.btnEnablePlaceholderUsage.setEnabled(true); + this.performEnableUsePlaceholder(false); + break; + default: + this.btnAutomatischePositionierung.setEnabled(true); + this.btnEnablePlaceholderUsage.setEnabled(true); } } - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration(at.asit.pdfover.gui.workflow.config.ConfigManipulator, at.asit.pdfover.gui.workflow.config.PersistentConfigProvider) + /* + * (non-Javadoc) + * + * @see + * at.asit.pdfover.gui.composites.BaseConfigurationComposite#storeConfiguration( + * at.asit.pdfover.gui.workflow.config.ConfigManipulator, + * at.asit.pdfover.gui.workflow.config.PersistentConfigProvider) */ @Override - public void storeConfiguration(ConfigManipulator store, - PersistentConfigProvider provider) { - store.setDefaultSignaturePosition( - this.configurationContainer.getDefaultSignaturePosition()); + public void storeConfiguration(ConfigManipulator store, PersistentConfigProvider provider) { + store.setDefaultSignaturePosition(this.configurationContainer.getDefaultSignaturePosition()); store.setUseMarker(this.configurationContainer.getUseMarker()); store.setUseSignatureFields(this.configurationContainer.getUseSignatureFields()); store.setEnablePlaceholderUsage(this.configurationContainer.getEnablePlaceholderUsage()); - store.setSignaturePdfACompat( - this.configurationContainer.getSignaturePdfACompat()); - store.setPlaceholderTransparency( - this.configurationContainer.getPlaceholderTransparency()); + store.setSignaturePdfACompat(this.configurationContainer.getSignaturePdfACompat()); + store.setPlaceholderTransparency(this.configurationContainer.getPlaceholderTransparency()); store.setDefaultBKU(this.configurationContainer.getDefaultBKU()); store.setKeyStoreEnabled(this.configurationContainer.getKeyStoreEnabled()); @@ -1050,13 +960,12 @@ 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(); - if (hostOld != null && !hostOld.isEmpty() && - (hostNew == null || hostNew.isEmpty())) { + if (hostOld != null && !hostOld.isEmpty() && (hostNew == null || hostNew.isEmpty())) { // Proxy has been removed, let's clear the system properties // Otherwise, the proxy settings wouldn't get removed System.clearProperty("http.proxyHost"); //$NON-NLS-1$ @@ -1075,8 +984,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { String userOld = provider.getProxyUserPersistent(); String userNew = this.configurationContainer.getProxyUser(); - if (userOld != null && !userOld.isEmpty() && - (userNew == null || userNew.isEmpty())) { + if (userOld != null && !userOld.isEmpty() && (userNew == null || userNew.isEmpty())) { // cf. above System.clearProperty("http.proxyUser"); //$NON-NLS-1$ System.clearProperty("https.proxyUser"); //$NON-NLS-1$ @@ -1092,121 +1000,102 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { } store.setProxyPass(passNew); } + /* * (non-Javadoc) - * @see at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings() + * + * @see + * at.asit.pdfover.gui.composites.BaseConfigurationComposite#validateSettings() */ @Override public void validateSettings(int resumeIndex) throws Exception { - + String foldername = this.configurationContainer.getOutputFolder(); - + switch (resumeIndex) { - case 0: - if (foldername != null && !foldername.isEmpty()) { - File outputFolder = new File(foldername); - if (!outputFolder.exists()) { - throw new OutputfolderDoesntExistException(outputFolder, 1); - } - if (!outputFolder.isDirectory()) { - throw new OutputfolderNotADirectoryException(outputFolder); - } + case 0: + if (foldername != null && !foldername.isEmpty()) { + File outputFolder = new File(foldername); + if (!outputFolder.exists()) { + throw new OutputfolderDoesntExistException(outputFolder, 1); } - // Fall through - case 1: - this.plainProxyHostSetter(); - // Fall through - case 2: - this.plainProxyPortSetter(); - // Fall through -// case 3: -// this.plainProxyUserSetter(); -// // Fall through -// case 4: -// this.plainProxyPassSetter(); + if (!outputFolder.isDirectory()) { + throw new OutputfolderNotADirectoryException(outputFolder); + } + } + // Fall through + case 1: + this.plainProxyHostSetter(); + // Fall through + case 2: + this.plainProxyPortSetter(); + // Fall through + // case 3: + // this.plainProxyUserSetter(); + // // Fall through + // case 4: + // this.plainProxyPassSetter(); } } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() */ @Override public void reloadResources() { - this.grpSignatur.setText(Messages - .getString("advanced_config.Signature_Title")); //$NON-NLS-1$ - this.btnAutomatischePositionierung.setText(Messages - .getString("advanced_config.AutoPosition")); //$NON-NLS-1$ - this.btnAutomatischePositionierung.setToolTipText(Messages - .getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$ + this.grpSignatur.setText(Messages.getString("advanced_config.Signature_Title")); //$NON-NLS-1$ + this.btnAutomatischePositionierung.setText(Messages.getString("advanced_config.AutoPosition")); //$NON-NLS-1$ + this.btnAutomatischePositionierung.setToolTipText(Messages.getString("advanced_config.AutoPosition_ToolTip")); //$NON-NLS-1$ this.grpPlaceholder.setText(Messages.getString("advanced_config.Placeholder_Title")); //$NON-NLS-1$ this.btnPlatzhalterVerwenden.setText(Messages.getString("advanced_config.UseMarker")); //$NON-NLS-1$ this.btnPlatzhalterVerwenden.setToolTipText(Messages.getString("advanced_config.UseMarker_ToolTip")); //$NON-NLS-1$ this.btnSignatureFieldsUsage.setText(Messages.getString("advanced_config.UseSignatureFields")); //$NON-NLS-1$ this.btnSignatureFieldsUsage.setToolTipText(Messages.getString("advanced_config.UseSignatureFields_ToolTip")); //$NON-NLS-1$ this.btnEnablePlaceholderUsage.setText(Messages.getString("advanced_config.Placeholder_Enabled")); - this.btnPdfACompat.setText(Messages - .getString("advanced_config.PdfACompat")); //$NON-NLS-1$ - this.btnPdfACompat.setToolTipText(Messages - .getString("advanced_config.PdfACompat_ToolTip")); //$NON-NLS-1$ - this.lblTransparenz.setText(Messages - .getString("advanced_config.SigPHTransparency")); //$NON-NLS-1$ - this.lblTransparenzLinks.setText(Messages - .getString("advanced_config.SigPHTransparencyMin")); //$NON-NLS-1$ - this.lblTransparenzRechts.setText(Messages - .getString("advanced_config.SigPHTransparencyMax")); //$NON-NLS-1$ - this.sclTransparenz.setToolTipText(Messages - .getString("advanced_config.SigPHTransparencyTooltip")); //$NON-NLS-1$ - - this.grpBkuAuswahl.setText(Messages - .getString("advanced_config.BKUSelection_Title")); //$NON-NLS-1$ - this.cmbBKUAuswahl.setToolTipText(Messages - .getString("advanced_config.BKUSelection_ToolTip")); //$NON-NLS-1$ - this.btnKeystoreEnabled.setText(Messages - .getString("advanced_config.KeystoreEnabled")); //$NON-NLS-1$ - this.btnKeystoreEnabled.setToolTipText(Messages - .getString("advanced_config.KeystoreEnabled_ToolTip")); //$NON-NLS-1$ - - this.grpSpeicherort.setText(Messages - .getString("advanced_config.OutputFolder_Title")); //$NON-NLS-1$ - this.lblDefaultOutputFolder.setText(Messages - .getString("advanced_config.OutputFolder")); //$NON-NLS-1$ - this.txtOutputFolder.setToolTipText(Messages - .getString("advanced_config.OutputFolder_ToolTip")); //$NON-NLS-1$ + this.btnPdfACompat.setText(Messages.getString("advanced_config.PdfACompat")); //$NON-NLS-1$ + this.btnPdfACompat.setToolTipText(Messages.getString("advanced_config.PdfACompat_ToolTip")); //$NON-NLS-1$ + this.lblTransparenz.setText(Messages.getString("advanced_config.SigPHTransparency")); //$NON-NLS-1$ + this.lblTransparenzLinks.setText(Messages.getString("advanced_config.SigPHTransparencyMin")); //$NON-NLS-1$ + this.lblTransparenzRechts.setText(Messages.getString("advanced_config.SigPHTransparencyMax")); //$NON-NLS-1$ + this.sclTransparenz.setToolTipText(Messages.getString("advanced_config.SigPHTransparencyTooltip")); //$NON-NLS-1$ + + this.grpBkuAuswahl.setText(Messages.getString("advanced_config.BKUSelection_Title")); //$NON-NLS-1$ + this.cmbBKUAuswahl.setToolTipText(Messages.getString("advanced_config.BKUSelection_ToolTip")); //$NON-NLS-1$ + this.btnKeystoreEnabled.setText(Messages.getString("advanced_config.KeystoreEnabled")); //$NON-NLS-1$ + this.btnKeystoreEnabled.setToolTipText(Messages.getString("advanced_config.KeystoreEnabled_ToolTip")); //$NON-NLS-1$ + + this.grpSpeicherort.setText(Messages.getString("advanced_config.OutputFolder_Title")); //$NON-NLS-1$ + this.lblDefaultOutputFolder.setText(Messages.getString("advanced_config.OutputFolder")); //$NON-NLS-1$ + this.txtOutputFolder.setToolTipText(Messages.getString("advanced_config.OutputFolder_ToolTip")); //$NON-NLS-1$ this.btnBrowse.setText(Messages.getString("common.browse")); //$NON-NLS-1$ - this.grpLocaleAuswahl.setText(Messages - .getString("advanced_config.LocaleSelection_Title")); //$NON-NLS-1$ - this.cmbLocaleAuswahl.setToolTipText(Messages - .getString("advanced_config.LocaleSelection_ToolTip")); //$NON-NLS-1$ + this.grpLocaleAuswahl.setText(Messages.getString("advanced_config.LocaleSelection_Title")); //$NON-NLS-1$ + this.cmbLocaleAuswahl.setToolTipText(Messages.getString("advanced_config.LocaleSelection_ToolTip")); //$NON-NLS-1$ - this.grpUpdateCheck.setText(Messages - .getString("advanced_config.UpdateCheck_Title")); //$NON-NLS-1$ - this.btnUpdateCheck.setText(Messages - .getString("advanced_config.UpdateCheck")); //$NON-NLS-1$ - this.btnUpdateCheck.setToolTipText(Messages - .getString("advanced_config.UpdateCheck_ToolTip")); //$NON-NLS-1$ + this.grpUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck_Title")); //$NON-NLS-1$ + this.btnUpdateCheck.setText(Messages.getString("advanced_config.UpdateCheck")); //$NON-NLS-1$ + this.btnUpdateCheck.setToolTipText(Messages.getString("advanced_config.UpdateCheck_ToolTip")); //$NON-NLS-1$ this.grpProxy.setText(Messages.getString("advanced_config.Proxy_Title")); //$NON-NLS-1$ this.lblProxyHost.setText(Messages.getString("advanced_config.ProxyHost")); //$NON-NLS-1$ - this.txtProxyHost.setToolTipText(Messages - .getString("advanced_config.ProxyHost_ToolTip")); //$NON-NLS-1$ - this.txtProxyHost.setMessage(Messages - .getString("advanced_config.ProxyHost_Template")); //$NON-NLS-1$ - this.lblProxyPort.setText(Messages - .getString("advanced_config.ProxyPort")); //$NON-NLS-1$ - this.txtProxyPort.setToolTipText(Messages - .getString("advanced_config.ProxyPort_ToolTip")); //$NON-NLS-1$ - this.txtProxyPort.setMessage(Messages - .getString("advanced_config.ProxyPort_Template")); //$NON-NLS-1$ -// this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser")); //$NON-NLS-1$ -// this.txtProxyUser.setToolTipText(Messages -// .getString("advanced_config.ProxyUser_ToolTip")); //$NON-NLS-1$ -// this.txtProxyUser.setMessage(Messages -// .getString("advanced_config.ProxyUser_Template")); //$NON-NLS-1$ -// this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass")); //$NON-NLS-1$ -// this.txtProxyPass.setToolTipText(Messages -// .getString("advanced_config.ProxyPass_ToolTip")); //$NON-NLS-1$ -// this.txtProxyPass.setMessage(Messages -// .getString("advanced_config.ProxyPass_Template")); //$NON-NLS-1$ + this.txtProxyHost.setToolTipText(Messages.getString("advanced_config.ProxyHost_ToolTip")); //$NON-NLS-1$ + this.txtProxyHost.setMessage(Messages.getString("advanced_config.ProxyHost_Template")); //$NON-NLS-1$ + this.lblProxyPort.setText(Messages.getString("advanced_config.ProxyPort")); //$NON-NLS-1$ + this.txtProxyPort.setToolTipText(Messages.getString("advanced_config.ProxyPort_ToolTip")); //$NON-NLS-1$ + this.txtProxyPort.setMessage(Messages.getString("advanced_config.ProxyPort_Template")); //$NON-NLS-1$ + // this.lblProxyUser.setText(Messages.getString("advanced_config.ProxyUser")); + // //$NON-NLS-1$ + // this.txtProxyUser.setToolTipText(Messages + // .getString("advanced_config.ProxyUser_ToolTip")); //$NON-NLS-1$ + // this.txtProxyUser.setMessage(Messages + // .getString("advanced_config.ProxyUser_Template")); //$NON-NLS-1$ + // this.lblProxyPass.setText(Messages.getString("advanced_config.ProxyPass")); + // //$NON-NLS-1$ + // this.txtProxyPass.setToolTipText(Messages + // .getString("advanced_config.ProxyPass_ToolTip")); //$NON-NLS-1$ + // this.txtProxyPass.setMessage(Messages + // .getString("advanced_config.ProxyPass_Template")); //$NON-NLS-1$ } } diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 2fc0713e..58909231 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -1,6 +1,6 @@ #Eclipse messages class -#Thu Nov 19 13:14:07 CET 2020 -AdvancedConfigurationComposite.lblSaveFilePostFix.text=Save File Postfix +#Thu Nov 19 14:06:37 CET 2020 +AdvancedConfigurationComposite.lblSaveFilePostFix.text=Save File Postfix\: BKU.KS=Keystore BKU.LOCAL=Local CCE BKU.MOBILE=Mobile CCE -- cgit v1.2.3 From 6bb81343ac29b50a4dd3539ec2ceb007a732954c Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 15:29:31 +0100 Subject: AdvancedConfig extended --- .../composites/AdvancedConfigurationComposite.java | 21 ++++++++++++++------- .../gui/workflow/config/ConfigurationContainer.java | 5 +++++ .../workflow/config/ConfigurationContainerImpl.java | 17 +++++++++++++++-- 3 files changed, 34 insertions(+), 9 deletions(-) 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 94474c66..4b32f59f 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 @@ -371,11 +371,12 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { GridLayout gl_grpSpeicherort = new GridLayout(3, false); grpSpeicherort.setLayout(gl_grpSpeicherort); FormData fd_grpSpeicherort = new FormData(); - fd_grpSpeicherort.left = new FormAttachment(100, -499); + fd_grpSpeicherort.left = new FormAttachment(0,5); fd_grpSpeicherort.top = new FormAttachment(this.grpBkuAuswahl, 5); fd_grpSpeicherort.right = new FormAttachment(100, -5); this.grpSpeicherort.setLayoutData(fd_grpSpeicherort); + FontData[] fD_grpSpeicherort = this.grpSpeicherort.getFont().getFontData(); fD_grpSpeicherort[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.grpSpeicherort.setFont(new Font(Display.getCurrent(), fD_grpSpeicherort[0])); @@ -388,10 +389,10 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); - gd_txtOutputFolder.widthHint = 291; txtOutputFolder.setLayoutData(gd_txtOutputFolder); FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont().getFontData(); + fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.txtOutputFolder.setFont(new Font(Display.getCurrent(), fD_txtOutputFolder[0])); this.txtOutputFolder.addFocusListener(new FocusAdapter() { @@ -402,14 +403,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { } }); fD_txtOutputFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - // fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); this.btnBrowse = new Button(this.grpSpeicherort, SWT.NONE); btnBrowse.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); FontData[] fD_btnBrowse = this.btnBrowse.getFont().getFontData(); + fD_btnBrowse[0].setHeight(Constants.TEXT_SIZE_BUTTON); this.btnBrowse.setFont(new Font(Display.getCurrent(), fD_btnBrowse[0])); - this.btnBrowse.addSelectionListener(new SelectionAdapter() { @Override @@ -446,18 +446,18 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER); GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); -// gd_txtSaveFilePostFix.widthHint = 256; + txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix); FontData[] fD_txtPostFix = this.txtSaveFilePostFix.getFont().getFontData(); + fD_txtPostFix[0].setHeight(Constants.TEXT_SIZE_NORMAL); this.txtSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_txtPostFix[0])); this.txtSaveFilePostFix.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { - // performOutputFolderChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix - // .getText()); + performPostFixChanged(AdvancedConfigurationComposite.this.txtSaveFilePostFix.getText()); } }); new Label(grpSpeicherort, SWT.NONE); @@ -649,6 +649,13 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { reloadResources(); } + private void performPostFixChanged(String postfix) { + + log.debug("Save file postfix changed to : {}", postfix); //$NON-NLS-1$ + this.configurationContainer.setSaveFilePostFix(postfix); + AdvancedConfigurationComposite.this.txtSaveFilePostFix.setText(postfix); + } + /* * (non-Javadoc) * diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/config/ConfigurationContainer.java index bed44da1..4c634fd6 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 @@ -421,4 +421,9 @@ public interface ConfigurationContainer { * @return selected signature profile as string */ public Profile getSignatureProfile(); + + + public void setSaveFilePostFix(String postFix); + + public String getSaveFilePostFix(); } 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 e00e04d6..47094aa7 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 @@ -149,6 +149,8 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { /** The Signature Profile */ protected Profile signatureProfile = null; + protected String saveFilePostFix = "_signed"; + /* (non-Javadoc) * @see at.asit.pdfover.gui.composites.ConfigurationContainer#getEmblem() */ @@ -735,8 +737,19 @@ public class ConfigurationContainerImpl implements ConfigurationContainer { } return this.signatureProfile; } - - @Override + + @Override + public String getSaveFilePostFix() { + return this.saveFilePostFix; + } + + @Override + public void setSaveFilePostFix(String postfix){ + this.saveFilePostFix = postfix; + } + + + @Override public void setSignatureProfile(Profile profile) { this.signatureProfile = profile; } -- cgit v1.2.3 From 0ac178bebfeed95af88de462f2c463f7569be9dd Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 15:42:02 +0100 Subject: Fixed GUI --- .../asit/pdfover/gui/composites/AdvancedConfigurationComposite.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4b32f59f..0cb26983 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 @@ -388,7 +388,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.lblDefaultOutputFolder.setFont(new Font(Display.getCurrent(), fD_lblDefaultOutputFolder[0])); this.txtOutputFolder = new Text(this.grpSpeicherort, SWT.BORDER); - GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); + GridData gd_txtOutputFolder = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); txtOutputFolder.setLayoutData(gd_txtOutputFolder); FontData[] fD_txtOutputFolder = this.txtOutputFolder.getFont().getFontData(); @@ -445,7 +445,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { this.lblSaveFilePostFix.setFont(new Font(Display.getCurrent(), fD_lblSaveFilePostFix[0])); this.txtSaveFilePostFix = new Text(this.grpSpeicherort, SWT.BORDER); - GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1); + GridData gd_txtSaveFilePostFix = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1); txtSaveFilePostFix.setLayoutData(gd_txtSaveFilePostFix); -- 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(-) 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 814c7e0b71985621b2d307fa52bb35de7886946b Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 16:33:07 +0100 Subject: Small fix when postfix is null set default value --- .../at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 9dc19be4..0a507b19 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,7 +114,13 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, setDefaultOutputFolder(config .getProperty(Constants.CFG_OUTPUT_FOLDER)); - setSaveFilePostFix(config.getProperty(Constants.CFG_POSTFIX)); + String postFix = config.getProperty(Constants.CFG_POSTFIX); + if (postFix == null){ + setSaveFilePostFix(Constants.DEFAULT_POSTFIX); + } else { + setSaveFilePostFix(postFix); + } + String localeString = config.getProperty(Constants.CFG_LOCALE); -- cgit v1.2.3 From 7d14456b0727294921699a623526b1fe36df26d3 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 16:38:40 +0100 Subject: Added German label description --- .../java/at/asit/pdfover/gui/workflow/config/ConfigProviderImpl.java | 1 - .../src/main/resources/at/asit/pdfover/gui/messages_de.properties | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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 0a507b19..c3a15cb3 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 @@ -121,7 +121,6 @@ public class ConfigProviderImpl implements ConfigProvider, ConfigManipulator, setSaveFilePostFix(postFix); } - String localeString = config.getProperty(Constants.CFG_LOCALE); Locale targetLocale = LocaleSerializer.parseFromString(localeString); diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties index 668f3534..4067ffdb 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties @@ -6,6 +6,7 @@ BKU.MOBILE=Handy-BKU BKU.NONE=Keine Voreinstellung BKUSelectionComposite.btnMobile.text=Handy TrustedSocketFactory.FailedToCreateSecureConnection=Konnte keine sichere Verbindung erstellen +AdvancedConfigurationComposite.lblSaveFilePostFix.text=Ausgabedatei Postfix\: advanced_config.AutoPosition=Automatische Positionierung advanced_config.AutoPosition_ToolTip=Aktivieren Sie diese Option, um die Signatur automatisch zu positionieren advanced_config.BKUSelection_Title=&BKU-Auswahl -- cgit v1.2.3 From 0428f794d1d53a2b573afa260896eb59f4c3bf01 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 16:52:11 +0100 Subject: Postfix is now applied to the file to save --- .../pdfover/gui/composites/OutputComposite.java | 985 +++++++++++---------- .../pdfover/gui/workflow/states/OutputState.java | 1 + 2 files changed, 500 insertions(+), 486 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index f879f82c..31bf6f93 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java @@ -1,486 +1,499 @@ -/* - * Copyright 2012 by A-SIT, Secure Information Technology Center Austria - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://joinup.ec.europa.eu/software/page/eupl - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - */ -package at.asit.pdfover.gui.composites; - -// Imports -import java.awt.Desktop; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - -import org.apache.commons.io.FilenameUtils; -import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.program.Program; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.FileDialog; -import org.eclipse.swt.widgets.Label; -import org.eclipse.swt.widgets.Link; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.controls.Dialog; -import at.asit.pdfover.gui.controls.Dialog.BUTTONS; -import at.asit.pdfover.gui.controls.Dialog.ICON; -import at.asit.pdfover.gui.controls.ErrorDialog; -import at.asit.pdfover.gui.utils.Messages; -import at.asit.pdfover.gui.workflow.states.State; -import at.asit.pdfover.signator.DocumentSource; - -/** - * GUI component for Output State - */ -public class OutputComposite extends StateComposite { - - /** - * SLF4J Logger instance - **/ - static final Logger log = LoggerFactory.getLogger(OutputComposite.class); - - private Link lnk_saved_file; - - private Button btn_save; - - private Label lbl_success_message; - - private DocumentSource signedDocument; - - private File inputFile; - - String outputDir = null; - - String tempDirectory = null; - - File outputFile = null; - - private boolean saveFailed = false; - - /** - * Create the composite. - * - * @param parent - * The parent composite - * @param style - * The swt style - * @param state - * The owning state - */ - public OutputComposite(Composite parent, int style, State state) { - super(parent, style, state); - - this.setLayout(new FormLayout()); - - this.lbl_success_message = new Label(this, SWT.NATIVE | SWT.RESIZE); - FormData fd_lbl_success_message = new FormData(); - fd_lbl_success_message.top = new FormAttachment(40, 0); - fd_lbl_success_message.left = new FormAttachment(0); - fd_lbl_success_message.right = new FormAttachment(100); - this.lbl_success_message.setLayoutData(fd_lbl_success_message); - this.lbl_success_message.setAlignment(SWT.CENTER); - - FontData[] fD1 = this.lbl_success_message.getFont().getFontData(); - fD1[0].setHeight(Constants.TEXT_SIZE_BIG); - this.lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0])); - - this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE); - FormData fd_lnk_saved_file = new FormData(); - fd_lnk_saved_file.top = new FormAttachment(this.lbl_success_message, 10); - fd_lnk_saved_file.left = new FormAttachment(this.lbl_success_message, 0, - SWT.CENTER); - // fd_lnk_saved_file.right = new FormAttachment(100); - this.lnk_saved_file.setLayoutData(fd_lnk_saved_file); - - this.lnk_saved_file.addSelectionListener(new OpenSelectionListener()); - - FontData[] fD2 = this.lnk_saved_file.getFont().getFontData(); - fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0])); - - this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE); - - FontData[] fD_btn_save = this.btn_save.getFont().getFontData(); - fD_btn_save[0].setHeight(Constants.TEXT_SIZE_BUTTON); - this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0])); - - FormData fd_btn_save = new FormData(); - fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10); - fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0, - SWT.CENTER); - this.btn_save.setLayoutData(fd_btn_save); - - this.btn_save.addSelectionListener(new SaveSelectionListener()); - enableSaveButton(false); - - reloadResources(); - } - - /** - * @param outputDir - * the outputDir to set - */ - public void setOutputDir(String outputDir) { - this.outputDir = outputDir; - } - - /** - * @return the outputDir - */ - public String getOutputDir() { - return this.outputDir; - } - - /** - * Sets the input file - * - * @param inputFile - * the input file - */ - public void setInputFile(File inputFile) { - this.inputFile = inputFile; - } - - /** - * Gets the input file - * - * @return the input file - */ - public File getInputFile() { - return this.inputFile; - } - - /** - * @param tempDirectory - */ - public void setTempDir(String tempDirectory) { - this.tempDirectory = tempDirectory; - } - - /** - * Gets the signed document - * - * @return the signed document - */ - public DocumentSource getSignedDocument() { - return this.signedDocument; - } - - /** - * Sets the signed document - * - * @param signedDocument - * the signed document - */ - public void setSignedDocument(final DocumentSource signedDocument) { - this.signedDocument = signedDocument; - } - - /** - * Return whether the last save was successful - * @return whether the last save was successful - */ - public boolean getSaveSuccessful() { - return !this.saveFailed; - } - - private void enableSaveButton(boolean doEnable) - { - this.btn_save.setEnabled(doEnable); - this.btn_save.setVisible(doEnable); - } - - /** - * Saves the signed document. - * - * If user has a default output directory set, try to save there. - * If not (or if directory unavailable), ask user for location. - */ - public void saveDocument() { - File inputFolder = getInputFile().getAbsoluteFile().getParentFile(); - String fileName = getInputFile().getName(); - String proposedName = getSignedFileName(fileName); - String outputFileName; - - String outputFolder = getOutputDir(); - if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) { - // Output folder configured, try to save there - - File f = new File(outputFolder); - if (f.isDirectory()) { - if (!outputFolder.endsWith(File.separator)) { - outputFolder += File.separator; - } - outputFileName = outputFolder + proposedName; - } else { - outputFileName = outputFolder; - } - } else { - // Ask user where to save - - FileDialog save = new FileDialog(this.getShell(), - SWT.SAVE | SWT.NATIVE); - save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ - save.setFilterNames(new String[] { - Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$ - Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$ - save.setFilterPath(inputFolder.getAbsolutePath()); - save.setFileName(proposedName); - - outputFileName = save.open(); - inputFolder = null; - } - log.debug("Trying to save to '" + outputFileName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ - - this.outputFile = saveResultAsFile(inputFolder, outputFileName); - this.saveFailed = (this.outputFile == null); - - // If saving failed, enable save button - enableSaveButton(this.saveFailed); - reloadResources(); - layout(true); - } - - /** - * Save the signed document under the given filename - * @param inputFolder the Folder the original document is located at - * @param target the filename to save the document as - * - * @return saved File (or null if unsuccessful) - * @throws FileNotFoundException - * @throws IOException - */ - private File saveResultAsFile(File inputFolder, String target) { - if (target == null) - return null; - - File targetFile = new File(target); - if (!targetFile.isAbsolute()) - targetFile = new File(inputFolder, target); - - if (targetFile.exists()) { - Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //$NON-NLS-1$ - String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$ - BUTTONS.OK_CANCEL, ICON.QUESTION); - if (dialog.open() == SWT.CANCEL) - { - return null; - } - } - - DocumentSource source = this.getSignedDocument(); - boolean retry; - - do { - retry = false; - try { - FileOutputStream outstream = new FileOutputStream(targetFile); - outstream.write(source.getByteArray(), 0, - source.getByteArray().length); - outstream.close(); - } catch (FileNotFoundException e) { - log.error("File not found", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$ - targetFile.getName(), e.getLocalizedMessage()), - BUTTONS.RETRY_CANCEL); - if (dialog.open() == SWT.CANCEL) - return null; - retry = true; - } catch (IOException e) { - log.error("IO Error", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$ - targetFile.getName(), e.getLocalizedMessage()), - BUTTONS.RETRY_CANCEL); - if (dialog.open() == SWT.CANCEL) - return null; - retry = true; - } - } while (retry); - - if (!targetFile.exists()) - { - log.error("Tried to save file " + targetFile.getName() + //$NON-NLS-1$ - ", but it doesn't exist"); //$NON-NLS-1$ - return null; - } - return targetFile; - } - - /** - * Get the proposed filename of a signed document for a given input filename - * @param name input filename - * @return proposed output filename - */ - private static String getSignedFileName(String name) { - name = FilenameUtils.getName(name); - String extension = FilenameUtils.getExtension(name); - name = FilenameUtils.removeExtension(name); - return name + Constants.SIGNED_SUFFIX + FilenameUtils.EXTENSION_SEPARATOR + extension; - } - - /** - * SelectionListener for save button - */ - private final class SaveSelectionListener extends SelectionAdapter { - /** - * Empty constructor - */ - public SaveSelectionListener() { - } - - @Override - public void widgetSelected(SelectionEvent e) { - try { - OutputComposite.this.saveDocument(); - } catch (Exception ex) { - log.error("SaveSelectionListener: ", ex); //$NON-NLS-1$ - } - } - } - - /** - * Selection Listener for open button - */ - private final class OpenSelectionListener extends SelectionAdapter { - /** - * Empty constructor - */ - public OpenSelectionListener() { - } - - @Override - public void widgetSelected(SelectionEvent e) { - try { - if (OutputComposite.this.outputFile == null) - return; - - if (!OutputComposite.this.outputFile.exists()) - return; - - // Normalize filename - File f = new File(FilenameUtils.normalize( - OutputComposite.this.outputFile.getAbsolutePath())); - log.debug("Trying to open " + f.toString()); //$NON-NLS-1$ - // work around for the case of Linux and Java version 8 - if (isSpecialCase()) { - reReloadResources(f.toString()); - return; - } - else if (Desktop.isDesktopSupported()) { - Desktop.getDesktop().open(f); - } else { - log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$ - Program.launch(f.getAbsolutePath()); - } - } catch (IOException ex) { - log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$ - ErrorDialog error = new ErrorDialog(getShell(), - String.format(Messages.getString("error.FailedToOpenDocument"), //$NON-NLS-1$ - ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL); - if (error.open() == SWT.RETRY) - widgetSelected(e); - } - } - } - - @Override - protected void checkSubclass() { - // Disable the check that prevents subclassing of SWT components - } - - /* - * (non-Javadoc) - * - * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() - */ - @Override - public void doLayout() { - // Nothing to do - this.layout(true); - } - - /** - * @return true when linux and java version <= 8 - * - */ - public boolean isSpecialCase() { - - boolean isSCase = false; - try { - String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$ - if (os.contains("linux")) { //$NON-NLS-1$ - String version = System.getProperty("java.version"); //$NON-NLS-1$ - if (version.contains(".")) { //$NON-NLS-1$ - String[] parts = version.split("\\."); //$NON-NLS-1$ - isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false; - } else { - isSCase = Integer.valueOf(version) <= 8 ? true : false; - } - } - } catch (Exception e) { - log.debug("Error: " + e.getMessage()); //$NON-NLS-1$ - isSCase = false; - } - return isSCase; - } - - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() - */ - @Override - public void reloadResources() { - this.lbl_success_message.setText(Messages - .getString("output.success_message")); //$NON-NLS-1$ - if (this.outputFile == null) { - this.lnk_saved_file.setText(Messages - .getString("output.link_save_message")); //$NON-NLS-1$ - } else { - this.lnk_saved_file.setText(Messages - .getString("output.link_open_message")); //$NON-NLS-1$ - } - this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$ - } - - /** - * @param str - */ - public void reReloadResources(String str) { - this.lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$ - if (this.outputFile == null) { - this.lnk_saved_file.setText(Messages - .getString("output.link_save_message")); //$NON-NLS-1$ - } else { - String str2 = "File location: " + str; //$NON-NLS-1$ - this.lbl_success_message.setText(str2); - this.lnk_saved_file.setText(""); //$NON-NLS-1$ - } - this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$ - } - - - -} +/* + * Copyright 2012 by A-SIT, Secure Information Technology Center Austria + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://joinup.ec.europa.eu/software/page/eupl + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + */ +package at.asit.pdfover.gui.composites; + +// Imports +import java.awt.Desktop; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.program.Program; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.gui.controls.Dialog; +import at.asit.pdfover.gui.controls.Dialog.BUTTONS; +import at.asit.pdfover.gui.controls.Dialog.ICON; +import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.utils.Messages; +import at.asit.pdfover.gui.workflow.states.State; +import at.asit.pdfover.signator.DocumentSource; + +/** + * GUI component for Output State + */ +public class OutputComposite extends StateComposite { + + /** + * SLF4J Logger instance + **/ + static final Logger log = LoggerFactory.getLogger(OutputComposite.class); + + private Link lnk_saved_file; + + private Button btn_save; + + private Label lbl_success_message; + + private DocumentSource signedDocument; + + private File inputFile; + + String outputDir = null; + + String tempDirectory = null; + + File outputFile = null; + + private boolean saveFailed = false; + + private String postFix = null; + + /** + * Create the composite. + * + * @param parent + * The parent composite + * @param style + * The swt style + * @param state + * The owning state + */ + public OutputComposite(Composite parent, int style, State state) { + super(parent, style, state); + + this.setLayout(new FormLayout()); + + this.lbl_success_message = new Label(this, SWT.NATIVE | SWT.RESIZE); + FormData fd_lbl_success_message = new FormData(); + fd_lbl_success_message.top = new FormAttachment(40, 0); + fd_lbl_success_message.left = new FormAttachment(0); + fd_lbl_success_message.right = new FormAttachment(100); + this.lbl_success_message.setLayoutData(fd_lbl_success_message); + this.lbl_success_message.setAlignment(SWT.CENTER); + + FontData[] fD1 = this.lbl_success_message.getFont().getFontData(); + fD1[0].setHeight(Constants.TEXT_SIZE_BIG); + this.lbl_success_message.setFont(new Font(Display.getCurrent(), fD1[0])); + + this.lnk_saved_file = new Link(this, SWT.NATIVE | SWT.RESIZE); + FormData fd_lnk_saved_file = new FormData(); + fd_lnk_saved_file.top = new FormAttachment(this.lbl_success_message, 10); + fd_lnk_saved_file.left = new FormAttachment(this.lbl_success_message, 0, + SWT.CENTER); + // fd_lnk_saved_file.right = new FormAttachment(100); + this.lnk_saved_file.setLayoutData(fd_lnk_saved_file); + + this.lnk_saved_file.addSelectionListener(new OpenSelectionListener()); + + FontData[] fD2 = this.lnk_saved_file.getFont().getFontData(); + fD2[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.lnk_saved_file.setFont(new Font(Display.getCurrent(), fD2[0])); + + this.btn_save = new Button(this, SWT.NATIVE | SWT.RESIZE); + + FontData[] fD_btn_save = this.btn_save.getFont().getFontData(); + fD_btn_save[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btn_save.setFont(new Font(Display.getCurrent(), fD_btn_save[0])); + + FormData fd_btn_save = new FormData(); + fd_btn_save.top = new FormAttachment(this.lnk_saved_file, 10); + fd_btn_save.left = new FormAttachment(this.lnk_saved_file, 0, + SWT.CENTER); + this.btn_save.setLayoutData(fd_btn_save); + + this.btn_save.addSelectionListener(new SaveSelectionListener()); + enableSaveButton(false); + + reloadResources(); + } + + /** + * @param outputDir + * the outputDir to set + */ + public void setOutputDir(String outputDir) { + this.outputDir = outputDir; + } + + /** + * @return the outputDir + */ + public String getOutputDir() { + return this.outputDir; + } + + /** + * Sets the input file + * + * @param inputFile + * the input file + */ + public void setInputFile(File inputFile) { + this.inputFile = inputFile; + } + + /** + * Gets the input file + * + * @return the input file + */ + public File getInputFile() { + return this.inputFile; + } + + /** + * @param tempDirectory + */ + public void setTempDir(String tempDirectory) { + this.tempDirectory = tempDirectory; + } + + /** + * Gets the signed document + * + * @return the signed document + */ + public DocumentSource getSignedDocument() { + return this.signedDocument; + } + + /** + * Sets the signed document + * + * @param signedDocument + * the signed document + */ + public void setSignedDocument(final DocumentSource signedDocument) { + this.signedDocument = signedDocument; + } + + /** + * Return whether the last save was successful + * @return whether the last save was successful + */ + public boolean getSaveSuccessful() { + return !this.saveFailed; + } + + private void enableSaveButton(boolean doEnable) + { + this.btn_save.setEnabled(doEnable); + this.btn_save.setVisible(doEnable); + } + + public void setSaveFilePostFix(String postFix){ + this.postFix = postFix; + } + + public String getSaveFilePostFix(){ + if (this.postFix == null){ + this.postFix = Constants.DEFAULT_POSTFIX; + } + return this.postFix; + } + + /** + * Saves the signed document. + * + * If user has a default output directory set, try to save there. + * If not (or if directory unavailable), ask user for location. + */ + public void saveDocument() { + File inputFolder = getInputFile().getAbsoluteFile().getParentFile(); + String fileName = getInputFile().getName(); + String proposedName = getSignedFileName(fileName); + String outputFileName; + + String outputFolder = getOutputDir(); + if (!this.saveFailed && outputFolder != null && !outputFolder.trim().isEmpty()) { + // Output folder configured, try to save there + + File f = new File(outputFolder); + if (f.isDirectory()) { + if (!outputFolder.endsWith(File.separator)) { + outputFolder += File.separator; + } + outputFileName = outputFolder + proposedName; + } else { + outputFileName = outputFolder; + } + } else { + // Ask user where to save + + FileDialog save = new FileDialog(this.getShell(), + SWT.SAVE | SWT.NATIVE); + save.setFilterExtensions(new String[] { "*.pdf", "*" }); //$NON-NLS-1$ //$NON-NLS-2$ + save.setFilterNames(new String[] { + Messages.getString("common.PDFExtension_Description"), //$NON-NLS-1$ + Messages.getString("common.AllExtension_Description")}); //$NON-NLS-1$ + save.setFilterPath(inputFolder.getAbsolutePath()); + save.setFileName(proposedName); + + outputFileName = save.open(); + inputFolder = null; + } + log.debug("Trying to save to '" + outputFileName + "'"); //$NON-NLS-1$ //$NON-NLS-2$ + + this.outputFile = saveResultAsFile(inputFolder, outputFileName); + this.saveFailed = (this.outputFile == null); + + // If saving failed, enable save button + enableSaveButton(this.saveFailed); + reloadResources(); + layout(true); + } + + /** + * Save the signed document under the given filename + * @param inputFolder the Folder the original document is located at + * @param target the filename to save the document as + * + * @return saved File (or null if unsuccessful) + * @throws FileNotFoundException + * @throws IOException + */ + private File saveResultAsFile(File inputFolder, String target) { + if (target == null) + return null; + + File targetFile = new File(target); + if (!targetFile.isAbsolute()) + targetFile = new File(inputFolder, target); + + if (targetFile.exists()) { + Dialog dialog = new Dialog(getShell(), Messages.getString("common.warning"), //$NON-NLS-1$ + String.format(Messages.getString("output.file_ask_overwrite"), targetFile.getName()), //$NON-NLS-1$ + BUTTONS.OK_CANCEL, ICON.QUESTION); + if (dialog.open() == SWT.CANCEL) + { + return null; + } + } + + DocumentSource source = this.getSignedDocument(); + boolean retry; + + do { + retry = false; + try { + FileOutputStream outstream = new FileOutputStream(targetFile); + outstream.write(source.getByteArray(), 0, + source.getByteArray().length); + outstream.close(); + } catch (FileNotFoundException e) { + log.error("File not found", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$ + targetFile.getName(), e.getLocalizedMessage()), + BUTTONS.RETRY_CANCEL); + if (dialog.open() == SWT.CANCEL) + return null; + retry = true; + } catch (IOException e) { + log.error("IO Error", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + String.format(Messages.getString("output.save_failed"), //$NON-NLS-1$ + targetFile.getName(), e.getLocalizedMessage()), + BUTTONS.RETRY_CANCEL); + if (dialog.open() == SWT.CANCEL) + return null; + retry = true; + } + } while (retry); + + if (!targetFile.exists()) + { + log.error("Tried to save file " + targetFile.getName() + //$NON-NLS-1$ + ", but it doesn't exist"); //$NON-NLS-1$ + return null; + } + return targetFile; + } + + /** + * Get the proposed filename of a signed document for a given input filename + * @param name input filename + * @return proposed output filename + */ + private String getSignedFileName(String name) { + name = FilenameUtils.getName(name); + String extension = FilenameUtils.getExtension(name); + name = FilenameUtils.removeExtension(name); + return name + getSaveFilePostFix() + FilenameUtils.EXTENSION_SEPARATOR + extension; + } + + /** + * SelectionListener for save button + */ + private final class SaveSelectionListener extends SelectionAdapter { + /** + * Empty constructor + */ + public SaveSelectionListener() { + } + + @Override + public void widgetSelected(SelectionEvent e) { + try { + OutputComposite.this.saveDocument(); + } catch (Exception ex) { + log.error("SaveSelectionListener: ", ex); //$NON-NLS-1$ + } + } + } + + /** + * Selection Listener for open button + */ + private final class OpenSelectionListener extends SelectionAdapter { + /** + * Empty constructor + */ + public OpenSelectionListener() { + } + + @Override + public void widgetSelected(SelectionEvent e) { + try { + if (OutputComposite.this.outputFile == null) + return; + + if (!OutputComposite.this.outputFile.exists()) + return; + + // Normalize filename + File f = new File(FilenameUtils.normalize( + OutputComposite.this.outputFile.getAbsolutePath())); + log.debug("Trying to open " + f.toString()); //$NON-NLS-1$ + // work around for the case of Linux and Java version 8 + if (isSpecialCase()) { + reReloadResources(f.toString()); + return; + } + else if (Desktop.isDesktopSupported()) { + Desktop.getDesktop().open(f); + } else { + log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$ + Program.launch(f.getAbsolutePath()); + } + } catch (IOException ex) { + log.error("OpenSelectionListener: ", ex); //$NON-NLS-1$ + ErrorDialog error = new ErrorDialog(getShell(), + String.format(Messages.getString("error.FailedToOpenDocument"), //$NON-NLS-1$ + ex.getLocalizedMessage()), BUTTONS.RETRY_CANCEL); + if (error.open() == SWT.RETRY) + widgetSelected(e); + } + } + } + + @Override + protected void checkSubclass() { + // Disable the check that prevents subclassing of SWT components + } + + /* + * (non-Javadoc) + * + * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() + */ + @Override + public void doLayout() { + // Nothing to do + this.layout(true); + } + + /** + * @return true when linux and java version <= 8 + * + */ + public boolean isSpecialCase() { + + boolean isSCase = false; + try { + String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$ + if (os.contains("linux")) { //$NON-NLS-1$ + String version = System.getProperty("java.version"); //$NON-NLS-1$ + if (version.contains(".")) { //$NON-NLS-1$ + String[] parts = version.split("\\."); //$NON-NLS-1$ + isSCase = Integer.valueOf(parts[0]) <= 8 ? true : false; + } else { + isSCase = Integer.valueOf(version) <= 8 ? true : false; + } + } + } catch (Exception e) { + log.debug("Error: " + e.getMessage()); //$NON-NLS-1$ + isSCase = false; + } + return isSCase; + } + + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() + */ + @Override + public void reloadResources() { + this.lbl_success_message.setText(Messages + .getString("output.success_message")); //$NON-NLS-1$ + if (this.outputFile == null) { + this.lnk_saved_file.setText(Messages + .getString("output.link_save_message")); //$NON-NLS-1$ + } else { + this.lnk_saved_file.setText(Messages + .getString("output.link_open_message")); //$NON-NLS-1$ + } + this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + } + + /** + * @param str + */ + public void reReloadResources(String str) { + this.lbl_success_message.setText(Messages.getString("output.success_message")); //$NON-NLS-1$ + if (this.outputFile == null) { + this.lnk_saved_file.setText(Messages + .getString("output.link_save_message")); //$NON-NLS-1$ + } else { + String str2 = "File location: " + str; //$NON-NLS-1$ + this.lbl_success_message.setText(str2); + this.lnk_saved_file.setText(""); //$NON-NLS-1$ + } + this.btn_save.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + } + + + +} diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java index 7b88f887..3b3c2098 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java @@ -59,6 +59,7 @@ public class OutputState extends State { } this.outputComposite.setOutputDir(config.getDefaultOutputFolder()); + this.outputComposite.setSaveFilePostFix(config.getSaveFilePostFix()); this.outputComposite.setTempDir(tmpDir.getAbsolutePath()); this.outputComposite.setInputFile(status.getDocument()); -- cgit v1.2.3 From 2d807da4f451b0b320c28193fe019680139f6840 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 17:03:10 +0100 Subject: Adopted UI behaviour --- .../at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java | 2 +- .../at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 8ed1b640..d2dabc5f 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 @@ -940,7 +940,7 @@ public class AdvancedConfigurationComposite extends BaseConfigurationComposite { case AMTSSIGNATURBLOCK: this.performPositionSelection(true); this.btnAutomatischePositionierung.setEnabled(false); - this.btnEnablePlaceholderUsage.setEnabled(true); + this.btnEnablePlaceholderUsage.setEnabled(false); this.performEnableUsePlaceholder(false); break; default: 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 84078fbf..75482b60 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 @@ -739,7 +739,7 @@ public class SimpleConfigurationComposite extends BaseConfigurationComposite { this.configurationContainer.setSignatureProfile(selected); this.cmbSignatureProfiles.select(selected.ordinal()); - if (selected.equals(Profile.AMTSSIGNATURBLOCK)){ + if (selected.equals(Profile.AMTSSIGNATURBLOCK) || selected.equals(Profile.INVISIBLE)){ this.configurationContainer.setDefaultSignaturePosition(new SignaturePosition()); } -- cgit v1.2.3 From f84a935379a6fa77d43c3365889072dab15a5314 Mon Sep 17 00:00:00 2001 From: Andreas Abraham Date: Thu, 19 Nov 2020 17:23:32 +0100 Subject: Fixed license url to A-SIT --- .../gui/composites/ConfigurationComposite.java | 1202 ++++++++++---------- .../at/asit/pdfover/gui/messages.properties | 3 +- .../at/asit/pdfover/gui/messages_de.properties | 3 +- 3 files changed, 605 insertions(+), 603 deletions(-) diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index dc88834b..0940ea67 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -1,601 +1,601 @@ -/* - * Copyright 2012 by A-SIT, Secure Information Technology Center Austria - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://joinup.ec.europa.eu/software/page/eupl - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - */ -package at.asit.pdfover.gui.composites; - -// Imports -import java.awt.Desktop; -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.ScrolledComposite; -import org.eclipse.swt.custom.StackLayout; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.graphics.Font; -import org.eclipse.swt.graphics.FontData; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.layout.FormLayout; -import org.eclipse.swt.program.Program; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Link; -import org.eclipse.swt.widgets.TabFolder; -import org.eclipse.swt.widgets.TabItem; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.controls.Dialog.BUTTONS; -import at.asit.pdfover.gui.controls.ErrorDialog; -import at.asit.pdfover.gui.exceptions.ResumableException; -import at.asit.pdfover.gui.utils.Messages; -import at.asit.pdfover.gui.workflow.PDFSigner; -import at.asit.pdfover.gui.workflow.config.ConfigManipulator; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; -import at.asit.pdfover.gui.workflow.config.ConfigurationContainerImpl; -import at.asit.pdfover.gui.workflow.config.PersistentConfigProvider; -import at.asit.pdfover.gui.workflow.states.State; - -/** - * Composite for hosting configuration composites - */ -public class ConfigurationComposite extends StateComposite { - - /** - * The PDF Signer used to produce signature block preview - */ - protected PDFSigner signer; - - /** - * SLF4J Logger instance - **/ - static final Logger log = LoggerFactory - .getLogger(ConfigurationComposite.class); - - /** - * configuration manipulator - */ - ConfigManipulator configManipulator = null; - - /** - * configuration provider - */ - PersistentConfigProvider configProvider = null; - - /** - * simple configuration composite - */ - BaseConfigurationComposite simpleConfigComposite; - - /** - * advanced configuration composite - */ - BaseConfigurationComposite advancedConfigComposite; - - /** - * advanced configuration composite - */ - BaseConfigurationComposite keystoreConfigComposite = null; - - /** - * The TabFolder - */ - TabFolder tabFolder; - - /** - * configuration container Keeps state for current configuration changes - */ - ConfigurationContainer configurationContainer = new ConfigurationContainerImpl(); - - /** - * The stack layout - */ - StackLayout compositeStack = new StackLayout(); - - /** - * SWT style - */ - int style; - - /** - * base configuration container - */ - Composite containerComposite; - - /** - * checks whether the user is done - */ - boolean userDone = false; - - private TabItem simpleTabItem; - - private TabItem advancedTabItem; - - private TabItem keystoreTabItem; - - private TabItem aboutTabItem; - - private Button btnSpeichern; - - private Button btnAbbrechen; - - /** - * @return the signer - */ - public PDFSigner getSigner() { - return this.signer; - } - - /** - * Create the composite. - * - * @param parent - * @param style - * @param state - */ - public ConfigurationComposite(Composite parent, int style, State state) { - super(parent, SWT.FILL | style, state); - this.style = SWT.FILL | style; - - this.setLayout(new FormLayout()); - - this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE); - - this.tabFolder = new TabFolder(this.containerComposite, SWT.NONE); - FormData fd_tabFolder = new FormData(); - fd_tabFolder.bottom = new FormAttachment(100, -5); - fd_tabFolder.right = new FormAttachment(100, -5); - fd_tabFolder.top = new FormAttachment(0, 5); - fd_tabFolder.left = new FormAttachment(0, 5); - this.tabFolder.setLayoutData(fd_tabFolder); - - FontData[] fD_tabFolder = this.tabFolder.getFont().getFontData(); - fD_tabFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0])); - - this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE); - this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ - System.out.println(Messages.getString("config.Simple")); - - ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, - SWT.H_SCROLL | SWT.V_SCROLL); - this.simpleTabItem.setControl(simpleCompositeScr); - this.simpleConfigComposite = new SimpleConfigurationComposite( - simpleCompositeScr, SWT.NONE, state, - this.configurationContainer); - simpleCompositeScr.setContent(this.simpleConfigComposite); - simpleCompositeScr.setExpandHorizontal(true); - simpleCompositeScr.setExpandVertical(true); - simpleCompositeScr.setMinSize(this.simpleConfigComposite.computeSize( - SWT.DEFAULT, SWT.DEFAULT)); - - this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE); - this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ - System.out.print(Messages.getString("config.Advanced")); - - ScrolledComposite advancedCompositeScr = new ScrolledComposite( - this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); - this.advancedTabItem.setControl(advancedCompositeScr); - this.advancedConfigComposite = new AdvancedConfigurationComposite( - advancedCompositeScr, SWT.NONE, state, - this.configurationContainer, this); - advancedCompositeScr.setContent(this.advancedConfigComposite); - advancedCompositeScr.setExpandHorizontal(true); - advancedCompositeScr.setExpandVertical(true); - advancedCompositeScr.setMinSize(this.advancedConfigComposite - .computeSize(SWT.DEFAULT, SWT.DEFAULT)); - - this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE); - this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$ - - ScrolledComposite aboutCompositeScr = new ScrolledComposite( - this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); - this.aboutTabItem.setControl(aboutCompositeScr); - AboutComposite aboutConfigComposite = new AboutComposite( - aboutCompositeScr, SWT.NONE); - aboutCompositeScr.setContent(aboutConfigComposite); - aboutCompositeScr.setExpandHorizontal(true); - aboutCompositeScr.setExpandVertical(true); - aboutCompositeScr.setMinSize(aboutConfigComposite - .computeSize(SWT.DEFAULT, SWT.DEFAULT)); - - this.tabFolder.setSelection(this.simpleTabItem); - - this.btnSpeichern = new Button(this, SWT.NONE); - FormData fd_btnSpeichern = new FormData(); - fd_btnSpeichern.right = new FormAttachment(100, -5); - fd_btnSpeichern.bottom = new FormAttachment(100); - this.btnSpeichern.setLayoutData(fd_btnSpeichern); - this.btnSpeichern.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - getShell().setText(Constants.APP_NAME); - if (ConfigurationComposite.this.storeConfiguration()) { - ConfigurationComposite.this.userDone = true; - ConfigurationComposite.this.state.updateStateMachine(); - } - } - }); - this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ - getShell().setDefaultButton(this.btnSpeichern); - - FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData(); - fD_btnSpeichern[0].setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnSpeichern - .setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0])); - - this.btnAbbrechen = new Button(this, SWT.NONE); - FormData fd_btnAbrechen = new FormData(); - fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10); - fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM); - this.btnAbbrechen.setLayoutData(fd_btnAbrechen); - this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ - this.btnAbbrechen.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - getShell().setText(Constants.APP_NAME); - ConfigurationComposite.this.userDone = true; - ConfigurationComposite.this.state.updateStateMachine(); - } - }); - - FontData[] fD_btnAbbrechen = this.btnAbbrechen.getFont().getFontData(); - fD_btnAbbrechen[0].setHeight(Constants.TEXT_SIZE_BUTTON); - this.btnAbbrechen - .setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0])); - - FormData fd_composite = new FormData(); - fd_composite.top = new FormAttachment(0, 5); - fd_composite.bottom = new FormAttachment(this.btnSpeichern, -10); - fd_composite.left = new FormAttachment(0, 5); - fd_composite.right = new FormAttachment(100, -5); - this.containerComposite.setLayoutData(fd_composite); - this.containerComposite.setLayout(this.compositeStack); - this.compositeStack.topControl = this.tabFolder; - - getShell().setText(Constants.APP_NAME_VERSION); - - this.doLayout(); - } - - /** - * @param signer - * the signer to set - */ - public void setSigner(PDFSigner signer) { - this.signer = signer; - if (this.simpleConfigComposite != null) { - this.simpleConfigComposite.setSigner(getSigner()); - } - if (this.advancedConfigComposite != null) { - // not needed at the moment - this.advancedConfigComposite.setSigner(getSigner()); - } - if (this.keystoreConfigComposite != null) { - // not needed at the moment - this.keystoreConfigComposite.setSigner(getSigner()); - } - } - - private class AboutComposite extends StateComposite { - private Link lnkAbout; - /** - * @param parent - * @param style - */ - public AboutComposite(Composite parent, int style) { - super(parent, style, null); - - setLayout(new FormLayout()); - - this.lnkAbout = new Link(this, SWT.WRAP); - - FormData fd_lnkAbout = new FormData(); - fd_lnkAbout.right = new FormAttachment(100, -5); - fd_lnkAbout.left = new FormAttachment(0, 5); - fd_lnkAbout.top = new FormAttachment(0, 5); - fd_lnkAbout.width = 100; - this.lnkAbout.setLayoutData(fd_lnkAbout); - - FontData[] fD_lnkAbout = this.lnkAbout.getFont().getFontData(); - fD_lnkAbout[0].setHeight(Constants.TEXT_SIZE_NORMAL); - this.lnkAbout.setFont(new Font(Display.getCurrent(), - fD_lnkAbout[0])); - - this.lnkAbout.addSelectionListener(new SelectionAdapter() { - @Override - public void widgetSelected(SelectionEvent e) { - try { - URI url = new URI("https://technology.a-sit.at/lizenzbedingungen/"); //$NON-NLS-1$ - log.debug("Trying to open " + url.toString()); //$NON-NLS-1$ - if (Desktop.isDesktopSupported()) { - Desktop.getDesktop().browse(url); - } else { - log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$ - Program.launch(url.toString()); - } - } catch (IOException ex) { - log.error("AboutComposite: ", ex); //$NON-NLS-1$ - } catch (URISyntaxException ex) { - log.error("AboutComposite: ", ex); //$NON-NLS-1$ - } - } - }); - - // Load localized strings - reloadResources(); - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() - */ - @Override - public void doLayout() { - // Nothing to do here - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() - */ - @Override - public void reloadResources() { - this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$ - } - } - - private boolean keystoreInitialized = false; - - /** - * Set whether keystore tab is enabled - * @param enabled whether keystore tab is enabled - */ - public void keystoreEnabled(boolean enabled) { - if (enabled && this.keystoreConfigComposite == null) { - this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2); - this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //$NON-NLS-1$ - - ScrolledComposite keystoreCompositeScr = new ScrolledComposite( - this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); - this.keystoreTabItem.setControl(keystoreCompositeScr); - this.keystoreConfigComposite = new KeystoreConfigurationComposite( - keystoreCompositeScr, SWT.NONE, this.state, - this.configurationContainer); - keystoreCompositeScr.setContent(this.keystoreConfigComposite); - keystoreCompositeScr.setExpandHorizontal(true); - keystoreCompositeScr.setExpandVertical(true); - keystoreCompositeScr.setMinSize(this.keystoreConfigComposite - .computeSize(SWT.DEFAULT, SWT.DEFAULT)); - if (!this.keystoreInitialized) { - this.keystoreConfigComposite.initConfiguration(this.configProvider); - this.keystoreInitialized = true; - } - this.keystoreConfigComposite.loadConfiguration(); - } else if (!enabled && this.keystoreConfigComposite != null){ - this.keystoreTabItem.dispose(); - this.keystoreConfigComposite = null; - } - } - - /** - * Sets the configuration manipulator - * - * @param manipulator - */ - public void setConfigManipulator(ConfigManipulator manipulator) { - this.configManipulator = manipulator; - } - - /** - * Sets the configuration provider - * - * @param provider - */ - public void setConfigProvider(PersistentConfigProvider provider) { - this.configProvider = provider; - if (this.configProvider != null) { - // Initialize Configuration Container - this.simpleConfigComposite.initConfiguration(this.configProvider); - this.advancedConfigComposite.initConfiguration(this.configProvider); - - this.simpleConfigComposite.loadConfiguration(); - this.advancedConfigComposite.loadConfiguration(); - if (this.keystoreConfigComposite != null) - this.keystoreConfigComposite.loadConfiguration(); - } - } - - boolean storeConfiguration() { - boolean status = false; - boolean redo = false; - int resumeIndex = 0; - try { - do { - try { - this.simpleConfigComposite.validateSettings(resumeIndex); - - redo = false; - status = true; - } catch (ResumableException e) { - log.error("Settings validation failed!", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); - int rc = dialog.open(); - - redo = (rc == SWT.RETRY); - if (rc == SWT.IGNORE) - { - resumeIndex = e.getResumeIndex(); - redo = true; - } - } - } while (redo); - - if (!status) { - return false; - } - - status = false; - redo = false; - resumeIndex = 0; - - do { - try { - this.advancedConfigComposite.validateSettings(resumeIndex); - - redo = false; - status = true; - } catch (ResumableException e) { - log.error("Settings validation failed!", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); - int rc = dialog.open(); - - redo = (rc == SWT.RETRY); - if (rc == SWT.IGNORE) - { - resumeIndex = e.getResumeIndex(); - redo = true; - } - } - } while (redo); - - if (!status) { - return false; - } - - if (this.keystoreConfigComposite != null) { - status = false; - redo = false; - resumeIndex = 0; - - do { - try { - this.keystoreConfigComposite.validateSettings(resumeIndex); - - redo = false; - status = true; - } catch (ResumableException e) { - log.error("Settings validation failed!", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); - int rc = dialog.open(); - - redo = (rc == SWT.RETRY); - if (rc == SWT.IGNORE) - { - resumeIndex = e.getResumeIndex(); - redo = true; - } - } - } while (redo); - - if (!status) { - return false; - } - } - } catch (Exception e) { - log.error("Settings validation failed!", e); //$NON-NLS-1$ - String message = e.getMessage(); - if (message == null) - message = Messages.getString("error.Unexpected"); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), message, - BUTTONS.OK); - dialog.open(); - return false; - } - - if (!status) { - return false; - } - - // Write current Configuration - this.simpleConfigComposite.storeConfiguration( - this.configManipulator, this.configProvider); - this.advancedConfigComposite.storeConfiguration( - this.configManipulator, this.configProvider); - if (this.keystoreConfigComposite != null) - this.keystoreConfigComposite.storeConfiguration( - this.configManipulator, this.configProvider); - - status = false; - redo = false; - do { - // Save current config to file - try { - this.configManipulator.saveCurrentConfiguration(); - redo = false; - status = true; - } catch (IOException e) { - log.error("Failed to save configuration to file!", e); //$NON-NLS-1$ - ErrorDialog dialog = new ErrorDialog(getShell(), - Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$ - redo = (dialog.open() == SWT.RETRY); - - // return false; - } - } while (redo); - - return status; - } - - /** - * Checks if the user has finished working with the configuration composite - * - * @return if the user is done - */ - public boolean isUserDone() { - return this.userDone; - } - - @Override - protected void checkSubclass() { - // Disable the check that prevents subclassing of SWT components - } - - /* - * (non-Javadoc) - * - * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() - */ - @Override - public void doLayout() { - Control ctrl = this.compositeStack.topControl; - this.containerComposite.layout(true, true); - getShell().layout(true, true); - // Note: SWT only layouts children! No grandchildren! - if (ctrl instanceof StateComposite) { - ((StateComposite) ctrl).doLayout(); - } - setFocus(); - } - - /* (non-Javadoc) - * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() - */ - @Override - public void reloadResources() { - this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ - this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ - this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$ - this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ - this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ - } -} +/* + * Copyright 2012 by A-SIT, Secure Information Technology Center Austria + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://joinup.ec.europa.eu/software/page/eupl + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + */ +package at.asit.pdfover.gui.composites; + +// Imports +import java.awt.Desktop; +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.custom.StackLayout; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.FormLayout; +import org.eclipse.swt.program.Program; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.TabFolder; +import org.eclipse.swt.widgets.TabItem; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import at.asit.pdfover.gui.Constants; +import at.asit.pdfover.gui.controls.Dialog.BUTTONS; +import at.asit.pdfover.gui.controls.ErrorDialog; +import at.asit.pdfover.gui.exceptions.ResumableException; +import at.asit.pdfover.gui.utils.Messages; +import at.asit.pdfover.gui.workflow.PDFSigner; +import at.asit.pdfover.gui.workflow.config.ConfigManipulator; +import at.asit.pdfover.gui.workflow.config.ConfigurationContainer; +import at.asit.pdfover.gui.workflow.config.ConfigurationContainerImpl; +import at.asit.pdfover.gui.workflow.config.PersistentConfigProvider; +import at.asit.pdfover.gui.workflow.states.State; + +/** + * Composite for hosting configuration composites + */ +public class ConfigurationComposite extends StateComposite { + + /** + * The PDF Signer used to produce signature block preview + */ + protected PDFSigner signer; + + /** + * SLF4J Logger instance + **/ + static final Logger log = LoggerFactory + .getLogger(ConfigurationComposite.class); + + /** + * configuration manipulator + */ + ConfigManipulator configManipulator = null; + + /** + * configuration provider + */ + PersistentConfigProvider configProvider = null; + + /** + * simple configuration composite + */ + BaseConfigurationComposite simpleConfigComposite; + + /** + * advanced configuration composite + */ + BaseConfigurationComposite advancedConfigComposite; + + /** + * advanced configuration composite + */ + BaseConfigurationComposite keystoreConfigComposite = null; + + /** + * The TabFolder + */ + TabFolder tabFolder; + + /** + * configuration container Keeps state for current configuration changes + */ + ConfigurationContainer configurationContainer = new ConfigurationContainerImpl(); + + /** + * The stack layout + */ + StackLayout compositeStack = new StackLayout(); + + /** + * SWT style + */ + int style; + + /** + * base configuration container + */ + Composite containerComposite; + + /** + * checks whether the user is done + */ + boolean userDone = false; + + private TabItem simpleTabItem; + + private TabItem advancedTabItem; + + private TabItem keystoreTabItem; + + private TabItem aboutTabItem; + + private Button btnSpeichern; + + private Button btnAbbrechen; + + /** + * @return the signer + */ + public PDFSigner getSigner() { + return this.signer; + } + + /** + * Create the composite. + * + * @param parent + * @param style + * @param state + */ + public ConfigurationComposite(Composite parent, int style, State state) { + super(parent, SWT.FILL | style, state); + this.style = SWT.FILL | style; + + this.setLayout(new FormLayout()); + + this.containerComposite = new Composite(this, SWT.FILL | SWT.RESIZE); + + this.tabFolder = new TabFolder(this.containerComposite, SWT.NONE); + FormData fd_tabFolder = new FormData(); + fd_tabFolder.bottom = new FormAttachment(100, -5); + fd_tabFolder.right = new FormAttachment(100, -5); + fd_tabFolder.top = new FormAttachment(0, 5); + fd_tabFolder.left = new FormAttachment(0, 5); + this.tabFolder.setLayoutData(fd_tabFolder); + + FontData[] fD_tabFolder = this.tabFolder.getFont().getFontData(); + fD_tabFolder[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.tabFolder.setFont(new Font(Display.getCurrent(), fD_tabFolder[0])); + + this.simpleTabItem = new TabItem(this.tabFolder, SWT.NONE); + this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + System.out.println(Messages.getString("config.Simple")); + + ScrolledComposite simpleCompositeScr = new ScrolledComposite(this.tabFolder, + SWT.H_SCROLL | SWT.V_SCROLL); + this.simpleTabItem.setControl(simpleCompositeScr); + this.simpleConfigComposite = new SimpleConfigurationComposite( + simpleCompositeScr, SWT.NONE, state, + this.configurationContainer); + simpleCompositeScr.setContent(this.simpleConfigComposite); + simpleCompositeScr.setExpandHorizontal(true); + simpleCompositeScr.setExpandVertical(true); + simpleCompositeScr.setMinSize(this.simpleConfigComposite.computeSize( + SWT.DEFAULT, SWT.DEFAULT)); + + this.advancedTabItem = new TabItem(this.tabFolder, SWT.NONE); + this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ + System.out.print(Messages.getString("config.Advanced")); + + ScrolledComposite advancedCompositeScr = new ScrolledComposite( + this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); + this.advancedTabItem.setControl(advancedCompositeScr); + this.advancedConfigComposite = new AdvancedConfigurationComposite( + advancedCompositeScr, SWT.NONE, state, + this.configurationContainer, this); + advancedCompositeScr.setContent(this.advancedConfigComposite); + advancedCompositeScr.setExpandHorizontal(true); + advancedCompositeScr.setExpandVertical(true); + advancedCompositeScr.setMinSize(this.advancedConfigComposite + .computeSize(SWT.DEFAULT, SWT.DEFAULT)); + + this.aboutTabItem = new TabItem(this.tabFolder, SWT.NONE); + this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$ + + ScrolledComposite aboutCompositeScr = new ScrolledComposite( + this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); + this.aboutTabItem.setControl(aboutCompositeScr); + AboutComposite aboutConfigComposite = new AboutComposite( + aboutCompositeScr, SWT.NONE); + aboutCompositeScr.setContent(aboutConfigComposite); + aboutCompositeScr.setExpandHorizontal(true); + aboutCompositeScr.setExpandVertical(true); + aboutCompositeScr.setMinSize(aboutConfigComposite + .computeSize(SWT.DEFAULT, SWT.DEFAULT)); + + this.tabFolder.setSelection(this.simpleTabItem); + + this.btnSpeichern = new Button(this, SWT.NONE); + FormData fd_btnSpeichern = new FormData(); + fd_btnSpeichern.right = new FormAttachment(100, -5); + fd_btnSpeichern.bottom = new FormAttachment(100); + this.btnSpeichern.setLayoutData(fd_btnSpeichern); + this.btnSpeichern.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + getShell().setText(Constants.APP_NAME); + if (ConfigurationComposite.this.storeConfiguration()) { + ConfigurationComposite.this.userDone = true; + ConfigurationComposite.this.state.updateStateMachine(); + } + } + }); + this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + getShell().setDefaultButton(this.btnSpeichern); + + FontData[] fD_btnSpeichern = this.btnSpeichern.getFont().getFontData(); + fD_btnSpeichern[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnSpeichern + .setFont(new Font(Display.getCurrent(), fD_btnSpeichern[0])); + + this.btnAbbrechen = new Button(this, SWT.NONE); + FormData fd_btnAbrechen = new FormData(); + fd_btnAbrechen.right = new FormAttachment(this.btnSpeichern, -10); + fd_btnAbrechen.bottom = new FormAttachment(this.btnSpeichern, 0, SWT.BOTTOM); + this.btnAbbrechen.setLayoutData(fd_btnAbrechen); + this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ + this.btnAbbrechen.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + getShell().setText(Constants.APP_NAME); + ConfigurationComposite.this.userDone = true; + ConfigurationComposite.this.state.updateStateMachine(); + } + }); + + FontData[] fD_btnAbbrechen = this.btnAbbrechen.getFont().getFontData(); + fD_btnAbbrechen[0].setHeight(Constants.TEXT_SIZE_BUTTON); + this.btnAbbrechen + .setFont(new Font(Display.getCurrent(), fD_btnAbbrechen[0])); + + FormData fd_composite = new FormData(); + fd_composite.top = new FormAttachment(0, 5); + fd_composite.bottom = new FormAttachment(this.btnSpeichern, -10); + fd_composite.left = new FormAttachment(0, 5); + fd_composite.right = new FormAttachment(100, -5); + this.containerComposite.setLayoutData(fd_composite); + this.containerComposite.setLayout(this.compositeStack); + this.compositeStack.topControl = this.tabFolder; + + getShell().setText(Constants.APP_NAME_VERSION); + + this.doLayout(); + } + + /** + * @param signer + * the signer to set + */ + public void setSigner(PDFSigner signer) { + this.signer = signer; + if (this.simpleConfigComposite != null) { + this.simpleConfigComposite.setSigner(getSigner()); + } + if (this.advancedConfigComposite != null) { + // not needed at the moment + this.advancedConfigComposite.setSigner(getSigner()); + } + if (this.keystoreConfigComposite != null) { + // not needed at the moment + this.keystoreConfigComposite.setSigner(getSigner()); + } + } + + private class AboutComposite extends StateComposite { + private Link lnkAbout; + /** + * @param parent + * @param style + */ + public AboutComposite(Composite parent, int style) { + super(parent, style, null); + + setLayout(new FormLayout()); + + this.lnkAbout = new Link(this, SWT.WRAP); + + FormData fd_lnkAbout = new FormData(); + fd_lnkAbout.right = new FormAttachment(100, -5); + fd_lnkAbout.left = new FormAttachment(0, 5); + fd_lnkAbout.top = new FormAttachment(0, 5); + fd_lnkAbout.width = 100; + this.lnkAbout.setLayoutData(fd_lnkAbout); + + FontData[] fD_lnkAbout = this.lnkAbout.getFont().getFontData(); + fD_lnkAbout[0].setHeight(Constants.TEXT_SIZE_NORMAL); + this.lnkAbout.setFont(new Font(Display.getCurrent(), + fD_lnkAbout[0])); + + this.lnkAbout.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + try { + URI url = new URI(Messages.getString("config.LicenseURL")); //$NON-NLS-1$ + log.debug("Trying to open " + url.toString()); //$NON-NLS-1$ + if (Desktop.isDesktopSupported()) { + Desktop.getDesktop().browse(url); + } else { + log.info("AWT Desktop is not supported on this platform"); //$NON-NLS-1$ + Program.launch(url.toString()); + } + } catch (IOException ex) { + log.error("AboutComposite: ", ex); //$NON-NLS-1$ + } catch (URISyntaxException ex) { + log.error("AboutComposite: ", ex); //$NON-NLS-1$ + } + } + }); + + // Load localized strings + reloadResources(); + } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() + */ + @Override + public void doLayout() { + // Nothing to do here + } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() + */ + @Override + public void reloadResources() { + this.lnkAbout.setText(Messages.getString("config.AboutText")); //$NON-NLS-1$ + } + } + + private boolean keystoreInitialized = false; + + /** + * Set whether keystore tab is enabled + * @param enabled whether keystore tab is enabled + */ + public void keystoreEnabled(boolean enabled) { + if (enabled && this.keystoreConfigComposite == null) { + this.keystoreTabItem = new TabItem(this.tabFolder, SWT.NONE, 2); + this.keystoreTabItem.setText(Messages.getString("config.Keystore")); //$NON-NLS-1$ + + ScrolledComposite keystoreCompositeScr = new ScrolledComposite( + this.tabFolder, SWT.H_SCROLL | SWT.V_SCROLL); + this.keystoreTabItem.setControl(keystoreCompositeScr); + this.keystoreConfigComposite = new KeystoreConfigurationComposite( + keystoreCompositeScr, SWT.NONE, this.state, + this.configurationContainer); + keystoreCompositeScr.setContent(this.keystoreConfigComposite); + keystoreCompositeScr.setExpandHorizontal(true); + keystoreCompositeScr.setExpandVertical(true); + keystoreCompositeScr.setMinSize(this.keystoreConfigComposite + .computeSize(SWT.DEFAULT, SWT.DEFAULT)); + if (!this.keystoreInitialized) { + this.keystoreConfigComposite.initConfiguration(this.configProvider); + this.keystoreInitialized = true; + } + this.keystoreConfigComposite.loadConfiguration(); + } else if (!enabled && this.keystoreConfigComposite != null){ + this.keystoreTabItem.dispose(); + this.keystoreConfigComposite = null; + } + } + + /** + * Sets the configuration manipulator + * + * @param manipulator + */ + public void setConfigManipulator(ConfigManipulator manipulator) { + this.configManipulator = manipulator; + } + + /** + * Sets the configuration provider + * + * @param provider + */ + public void setConfigProvider(PersistentConfigProvider provider) { + this.configProvider = provider; + if (this.configProvider != null) { + // Initialize Configuration Container + this.simpleConfigComposite.initConfiguration(this.configProvider); + this.advancedConfigComposite.initConfiguration(this.configProvider); + + this.simpleConfigComposite.loadConfiguration(); + this.advancedConfigComposite.loadConfiguration(); + if (this.keystoreConfigComposite != null) + this.keystoreConfigComposite.loadConfiguration(); + } + } + + boolean storeConfiguration() { + boolean status = false; + boolean redo = false; + int resumeIndex = 0; + try { + do { + try { + this.simpleConfigComposite.validateSettings(resumeIndex); + + redo = false; + status = true; + } catch (ResumableException e) { + log.error("Settings validation failed!", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); + int rc = dialog.open(); + + redo = (rc == SWT.RETRY); + if (rc == SWT.IGNORE) + { + resumeIndex = e.getResumeIndex(); + redo = true; + } + } + } while (redo); + + if (!status) { + return false; + } + + status = false; + redo = false; + resumeIndex = 0; + + do { + try { + this.advancedConfigComposite.validateSettings(resumeIndex); + + redo = false; + status = true; + } catch (ResumableException e) { + log.error("Settings validation failed!", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); + int rc = dialog.open(); + + redo = (rc == SWT.RETRY); + if (rc == SWT.IGNORE) + { + resumeIndex = e.getResumeIndex(); + redo = true; + } + } + } while (redo); + + if (!status) { + return false; + } + + if (this.keystoreConfigComposite != null) { + status = false; + redo = false; + resumeIndex = 0; + + do { + try { + this.keystoreConfigComposite.validateSettings(resumeIndex); + + redo = false; + status = true; + } catch (ResumableException e) { + log.error("Settings validation failed!", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + e.getMessage(), BUTTONS.ABORT_RETRY_IGNORE); + int rc = dialog.open(); + + redo = (rc == SWT.RETRY); + if (rc == SWT.IGNORE) + { + resumeIndex = e.getResumeIndex(); + redo = true; + } + } + } while (redo); + + if (!status) { + return false; + } + } + } catch (Exception e) { + log.error("Settings validation failed!", e); //$NON-NLS-1$ + String message = e.getMessage(); + if (message == null) + message = Messages.getString("error.Unexpected"); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), message, + BUTTONS.OK); + dialog.open(); + return false; + } + + if (!status) { + return false; + } + + // Write current Configuration + this.simpleConfigComposite.storeConfiguration( + this.configManipulator, this.configProvider); + this.advancedConfigComposite.storeConfiguration( + this.configManipulator, this.configProvider); + if (this.keystoreConfigComposite != null) + this.keystoreConfigComposite.storeConfiguration( + this.configManipulator, this.configProvider); + + status = false; + redo = false; + do { + // Save current config to file + try { + this.configManipulator.saveCurrentConfiguration(); + redo = false; + status = true; + } catch (IOException e) { + log.error("Failed to save configuration to file!", e); //$NON-NLS-1$ + ErrorDialog dialog = new ErrorDialog(getShell(), + Messages.getString("error.FailedToSaveSettings"), BUTTONS.RETRY_CANCEL); //$NON-NLS-1$ + redo = (dialog.open() == SWT.RETRY); + + // return false; + } + } while (redo); + + return status; + } + + /** + * Checks if the user has finished working with the configuration composite + * + * @return if the user is done + */ + public boolean isUserDone() { + return this.userDone; + } + + @Override + protected void checkSubclass() { + // Disable the check that prevents subclassing of SWT components + } + + /* + * (non-Javadoc) + * + * @see at.asit.pdfover.gui.composites.StateComposite#doLayout() + */ + @Override + public void doLayout() { + Control ctrl = this.compositeStack.topControl; + this.containerComposite.layout(true, true); + getShell().layout(true, true); + // Note: SWT only layouts children! No grandchildren! + if (ctrl instanceof StateComposite) { + ((StateComposite) ctrl).doLayout(); + } + setFocus(); + } + + /* (non-Javadoc) + * @see at.asit.pdfover.gui.composites.StateComposite#reloadResources() + */ + @Override + public void reloadResources() { + this.simpleTabItem.setText(Messages.getString("config.Simple")); //$NON-NLS-1$ + this.advancedTabItem.setText(Messages.getString("config.Advanced")); //$NON-NLS-1$ + this.aboutTabItem.setText(String.format(Messages.getString("config.About"), Constants.APP_NAME)); //$NON-NLS-1$ + this.btnSpeichern.setText(Messages.getString("common.Save")); //$NON-NLS-1$ + this.btnAbbrechen.setText(Messages.getString("common.Cancel")); //$NON-NLS-1$ + } +} diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties index 58909231..66cc2986 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages.properties @@ -115,7 +115,8 @@ common.info=Information common.open=Open common.warning=Warning config.About=A&bout %s -config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at http\://demo.a-sit.at/lizenzbedingungen/.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software. +config.AboutText=This software is freely provided by A-SIT under the conditions of the EUPL.\nTerms and details at https\://technology.a-sit.at/en/terms-of-a-license/.\n\nNotice that components can have different licenses, partly restricting their free use to EUPL-licensed software. +config.LicenseURL=https://technology.a-sit.at/en/terms-of-a-license/ config.Advanced=Ad&vanced config.Keystore=&Keystore config.Simple=Basi&c diff --git a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties index 4067ffdb..5cc55387 100644 --- a/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties +++ b/pdf-over-gui/src/main/resources/at/asit/pdfover/gui/messages_de.properties @@ -106,7 +106,8 @@ common.info=Information common.open=\u00D6ffnen common.warning=Warnung config.About=\u00DC&ber %s -config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter http://demo.a-sit.at/lizenzbedingungen/.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind. +config.AboutText=Diese Software wird von A-SIT unter den Bedingungen der EUPL frei zur Verfügung gestellt.\nLizenbedingungen unter https://technology.a-sit.at/lizenzbedingungen/.\n\nBeachten Sie, dass Komponenten unter eigenen Lizenzen zur Verfügung gestellt werden, die teilweise nur für EUPL-lizensierte Software zur freien Verwendung vorgesehen sind. +config.LicenseURL=https://technology.a-sit.at/lizenzbedingungen/ config.Advanced=Er&weitert config.Keystore=&Keystore config.Simple=&Einfach -- 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(-) 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