From e0baed2c6ef75b87afb3fc73c326bd2a6c38ae19 Mon Sep 17 00:00:00 2001 From: Tobias Kellner Date: Mon, 12 Nov 2012 22:00:37 +0100 Subject: Move Messages to utils package --- .../src/main/java/at/asit/pdfover/gui/Main.java | 1 + .../main/java/at/asit/pdfover/gui/MainWindow.java | 1 + .../main/java/at/asit/pdfover/gui/Messages.java | 119 -------------------- .../asit/pdfover/gui/cliarguments/BKUArgument.java | 2 +- .../gui/cliarguments/ConfigFileArgument.java | 2 +- .../pdfover/gui/cliarguments/EmblemArgument.java | 2 +- .../pdfover/gui/cliarguments/HelpArgument.java | 2 +- .../gui/cliarguments/InputDocumentArgument.java | 2 +- .../gui/cliarguments/OutputFolderArgument.java | 2 +- .../pdfover/gui/cliarguments/PasswordArgument.java | 2 +- .../gui/cliarguments/PhoneNumberArgument.java | 2 +- .../gui/cliarguments/ProxyHostArgument.java | 2 +- .../gui/cliarguments/ProxyPortArgument.java | 2 +- .../composites/AdvancedConfigurationComposite.java | 2 +- .../gui/composites/BKUSelectionComposite.java | 2 +- .../gui/composites/ConfigurationComposite.java | 2 +- .../gui/composites/DataSourceSelectComposite.java | 2 +- .../composites/MobileBKUEnterNumberComposite.java | 2 +- .../gui/composites/MobileBKUEnterTANComposite.java | 2 +- .../pdfover/gui/composites/OutputComposite.java | 2 +- .../gui/composites/PositioningComposite.java | 2 +- .../pdfover/gui/composites/SignaturePanel.java | 2 +- .../composites/SimpleConfigurationComposite.java | 2 +- .../pdfover/gui/composites/WaitingComposite.java | 2 +- .../at/asit/pdfover/gui/controls/ErrorDialog.java | 2 +- .../pdfover/gui/exceptions/InvalidEmblemFile.java | 2 +- .../gui/exceptions/InvalidPortException.java | 2 +- .../exceptions/OutputfolderDontExistException.java | 2 +- .../OutputfolderNotADirectoryException.java | 2 +- .../gui/exceptions/PasswordTooLongException.java | 2 +- .../gui/exceptions/PasswordTooShortException.java | 2 +- .../java/at/asit/pdfover/gui/utils/Messages.java | 121 +++++++++++++++++++++ .../pdfover/gui/workflow/ConfigProviderImpl.java | 2 +- .../pdfover/gui/workflow/StateMachineImpl.java | 2 +- .../pdfover/gui/workflow/states/LocalBKUState.java | 2 +- .../gui/workflow/states/MobileBKUState.java | 2 +- .../pdfover/gui/workflow/states/OutputState.java | 2 +- .../gui/workflow/states/PositioningState.java | 2 +- .../workflow/states/PrepareConfigurationState.java | 2 +- .../gui/workflow/states/PrepareSigningState.java | 2 +- .../pdfover/gui/workflow/states/SigningState.java | 2 +- .../states/mobilebku/TrustedSocketFactory.java | 2 +- 42 files changed, 161 insertions(+), 157 deletions(-) delete mode 100644 trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java create mode 100644 trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java (limited to 'trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui') diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java index c84f28cf..35fc6b5e 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java @@ -24,6 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.utils.SWTLoader; import at.asit.pdfover.gui.workflow.StateMachineImpl; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index a35ee59e..f3de78af 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java @@ -45,6 +45,7 @@ import at.asit.pdfover.gui.controls.MainBarEndButton; import at.asit.pdfover.gui.controls.MainBarMiddleButton; import at.asit.pdfover.gui.controls.MainBarRectangleButton; import at.asit.pdfover.gui.controls.MainBarStartButton; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.BKUSelectionState; import at.asit.pdfover.gui.workflow.states.ConfigurationUIState; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java deleted file mode 100644 index b17e168a..00000000 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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; - -// Imports -import java.util.HashMap; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Localizes string messages for PDFOver GUI - */ -public class Messages { - - /** - * SFL4J Logger instance - **/ - static final Logger log = LoggerFactory.getLogger(Messages.class); - - 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 Locale currentLocale = getDefaultLocale(); - - private Messages() { - } - - /** - * Get the closest match to the system default Locale out of the supported locales - * @return the default locale - */ - public static Locale getDefaultLocale() { - Locale ld = Locale.getDefault(); - for (Locale l : Constants.SUPPORTED_LOCALES) { - if (l.equals(ld) || l.getLanguage().equals(ld.getLanguage())) - return l; - } - return Constants.SUPPORTED_LOCALES[0]; - } - - /** - * Sets the currently used locals - * @param locale - */ - public static void setLocale(Locale locale) { - currentLocale = locale; - } - - private static ResourceBundle getBundle(Locale locale) { - if(!bundles.containsKey(locale)) { - 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$ - } catch(Exception e) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString(), e); //$NON-NLS-1$ - tmp = ResourceBundle.getBundle(BUNDLE_NAME); - } - if(tmp == null) { - log.error("NO RESOURCE BUNDLE FOR " + locale.toString()); //$NON-NLS-1$ - tmp = ResourceBundle.getBundle(BUNDLE_NAME); - } - bundles.put(locale, tmp); - return tmp; - } - return bundles.get(locale); - } - - /** - * Gets the localized message - * @param key - * @return the localized message - */ - public static String getString(String key) { - try { - return getBundle(currentLocale).getString(key); - //return RESOURCE_BUNDLE.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } - } - - /** - * Gets the localized message - * @param key the key - * @param locale the locale to use - * @return the localized message - */ - public static String getString(String key, Locale locale) { - try { - return getBundle(locale).getString(key); - //return RESOURCE_BUNDLE.getString(key); - } catch (MissingResourceException e) { - return '!' + key + '!'; - } - } -} diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java index b44b3f80..9d1f51be 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java @@ -15,8 +15,8 @@ */ package at.asit.pdfover.gui.cliarguments; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.signator.BKUs; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java index 146d83bc..72d6e629 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java @@ -19,8 +19,8 @@ package at.asit.pdfover.gui.cliarguments; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java index 9ca952a4..106f62dc 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java @@ -22,8 +22,8 @@ import java.io.FileNotFoundException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java index 3e19d9e4..21b1124f 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java @@ -19,8 +19,8 @@ package at.asit.pdfover.gui.cliarguments; import java.util.Iterator; import java.util.Set; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; /** diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java index 58afdce1..cc37c9b5 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java @@ -22,8 +22,8 @@ import java.io.FileNotFoundException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java index cbaf7600..0c1c7fc4 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java @@ -23,8 +23,8 @@ import java.io.IOException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java index d0f60bed..bef807a0 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java @@ -19,8 +19,8 @@ package at.asit.pdfover.gui.cliarguments; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java index bb99c173..6e24c1b7 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java @@ -19,8 +19,8 @@ package at.asit.pdfover.gui.cliarguments; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java index da8a5a25..58ece2c6 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java @@ -19,8 +19,8 @@ package at.asit.pdfover.gui.cliarguments; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java index 0dfdd428..34ba0f48 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java @@ -19,9 +19,9 @@ package at.asit.pdfover.gui.cliarguments; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InitializationException; import at.asit.pdfover.gui.exceptions.InvalidPortException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java index 10b44a61..a3348ccd 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/AdvancedConfigurationComposite.java @@ -42,11 +42,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.exceptions.OutputfolderDontExistException; import at.asit.pdfover.gui.exceptions.OutputfolderNotADirectoryException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigurationContainer; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.BKUs; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java index e1ec4990..1560ff61 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java @@ -34,8 +34,8 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ClickableCanvas; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.BKUs; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java index 1b497559..820b69b6 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/ConfigurationComposite.java @@ -27,13 +27,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.exceptions.InvalidEmblemFile; import at.asit.pdfover.gui.exceptions.InvalidNumberException; import at.asit.pdfover.gui.exceptions.InvalidPortException; import at.asit.pdfover.gui.exceptions.ResumableException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.ConfigurationContainer; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index 90ecc0d7..b0cc905b 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java @@ -46,7 +46,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; /** diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java index c91f9397..eb2a4bfe 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterNumberComposite.java @@ -37,9 +37,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.exceptions.InvalidNumberException; import at.asit.pdfover.gui.exceptions.InvalidPasswordException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.gui.workflow.states.mobilebku.ATrustHelper; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java index 3d88ad0e..945b9672 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java @@ -39,7 +39,7 @@ import org.eclipse.swt.widgets.Text; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; /** diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java index aa134242..855b3f65 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/OutputComposite.java @@ -41,7 +41,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.DocumentSource; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java index 15cec1f7..43575e45 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/PositioningComposite.java @@ -46,7 +46,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.SignaturePosition; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index 7683f837..df443b94 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java @@ -35,7 +35,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import com.sun.pdfview.PDFFile; import com.sun.pdfview.PDFPage; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java index 36d0a74d..5779f36c 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SimpleConfigurationComposite.java @@ -59,13 +59,13 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.Constants; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorMarker; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.exceptions.InvalidNumberException; import at.asit.pdfover.gui.exceptions.InvalidPortException; import at.asit.pdfover.gui.utils.ImageConverter; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigurationContainer; import at.asit.pdfover.gui.workflow.states.State; import at.asit.pdfover.signator.FileNameEmblem; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java index ab62c8d0..71d6acf2 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java @@ -24,7 +24,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.ProgressBar; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.State; /** diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java index 7839ed16..5e329df4 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java @@ -20,7 +20,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java index 0d3306fa..006778b3 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java @@ -18,7 +18,7 @@ package at.asit.pdfover.gui.exceptions; // Imports import java.io.File; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java index 98b05c79..a6861d38 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java @@ -15,7 +15,7 @@ */ package at.asit.pdfover.gui.exceptions; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java index 1b7e731b..a71970d8 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java @@ -17,7 +17,7 @@ package at.asit.pdfover.gui.exceptions; import java.io.File; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java index 627b3133..f2053c84 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java @@ -19,7 +19,7 @@ package at.asit.pdfover.gui.exceptions; import java.io.File; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java index 6d870564..61074a33 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java @@ -15,7 +15,7 @@ */ package at.asit.pdfover.gui.exceptions; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; // Imports diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java index 1376dfbb..71b9f55c 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java @@ -15,7 +15,7 @@ */ package at.asit.pdfover.gui.exceptions; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; // Imports diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java new file mode 100644 index 00000000..89c941eb --- /dev/null +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java @@ -0,0 +1,121 @@ +/* + * 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.utils; + +// Imports +import java.util.HashMap; +import java.util.Locale; +import java.util.MissingResourceException; +import java.util.ResourceBundle; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import at.asit.pdfover.gui.Constants; + +/** + * Localizes string messages for PDFOver GUI + */ +public class Messages { + + /** + * SFL4J Logger instance + **/ + static final Logger log = LoggerFactory.getLogger(Messages.class); + + 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 Locale currentLocale = getDefaultLocale(); + + private Messages() { + } + + /** + * Get the closest match to the system default Locale out of the supported locales + * @return the default locale + */ + public static Locale getDefaultLocale() { + Locale ld = Locale.getDefault(); + for (Locale l : Constants.SUPPORTED_LOCALES) { + if (l.equals(ld) || l.getLanguage().equals(ld.getLanguage())) + return l; + } + return Constants.SUPPORTED_LOCALES[0]; + } + + /** + * Sets the currently used locals + * @param locale + */ + public static void setLocale(Locale locale) { + currentLocale = locale; + } + + private static ResourceBundle getBundle(Locale locale) { + if(!bundles.containsKey(locale)) { + 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$ + } catch(Exception e) { + log.error("NO RESOURCE BUNDLE FOR " + locale.toString(), e); //$NON-NLS-1$ + tmp = ResourceBundle.getBundle(BUNDLE_NAME); + } + if(tmp == null) { + log.error("NO RESOURCE BUNDLE FOR " + locale.toString()); //$NON-NLS-1$ + tmp = ResourceBundle.getBundle(BUNDLE_NAME); + } + bundles.put(locale, tmp); + return tmp; + } + return bundles.get(locale); + } + + /** + * Gets the localized message + * @param key + * @return the localized message + */ + public static String getString(String key) { + try { + return getBundle(currentLocale).getString(key); + //return RESOURCE_BUNDLE.getString(key); + } catch (MissingResourceException e) { + return '!' + key + '!'; + } + } + + /** + * Gets the localized message + * @param key the key + * @param locale the locale to use + * @return the localized message + */ + public static String getString(String key, Locale locale) { + try { + return getBundle(locale).getString(key); + //return RESOURCE_BUNDLE.getString(key); + } catch (MissingResourceException e) { + return '!' + key + '!'; + } + } +} diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java index ee44dad2..6fa7c603 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java @@ -28,8 +28,8 @@ import java.util.regex.Pattern; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.utils.LocaleSerializer; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.signator.BKUs; import at.asit.pdfover.signator.SignaturePosition; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index 3478ecc8..5fe5f0fa 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java @@ -25,9 +25,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.states.PrepareConfigurationState; import at.asit.pdfover.gui.workflow.states.State; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java index 163b17b3..367af3d1 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java @@ -26,9 +26,9 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.SLRequest; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java index 401d71f3..dca4d8e5 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java @@ -22,12 +22,12 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.MobileBKUEnterNumberComposite; import at.asit.pdfover.gui.composites.MobileBKUEnterTANComposite; import at.asit.pdfover.gui.composites.WaitingComposite; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUCommunicationState; import at.asit.pdfover.gui.workflow.states.mobilebku.MobileBKUStatus; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java index a6ec93bd..a7dcbd0a 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/OutputState.java @@ -26,10 +26,10 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.OutputComposite; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.DocumentSource; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 02a476be..6f052f1a 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -24,10 +24,10 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.PositioningComposite; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.Emblem; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index b305700c..41ad5ff4 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java @@ -26,7 +26,6 @@ import java.io.InputStream; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.cliarguments.ArgumentHandler; import at.asit.pdfover.gui.cliarguments.BKUArgument; import at.asit.pdfover.gui.cliarguments.ConfigFileArgument; @@ -41,6 +40,7 @@ import at.asit.pdfover.gui.cliarguments.ProxyPortArgument; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; import at.asit.pdfover.gui.exceptions.InitializationException; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.utils.Unzipper; import at.asit.pdfover.gui.workflow.ConfigManipulator; import at.asit.pdfover.gui.workflow.StateMachine; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java index a0406c23..843ed962 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareSigningState.java @@ -22,10 +22,10 @@ import org.slf4j.LoggerFactory; import at.asit.pdfover.gui.MainWindow.Buttons; import at.asit.pdfover.gui.MainWindowBehavior; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.composites.WaitingComposite; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.ConfigProvider; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java index 932a6d8a..15baa36c 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java @@ -20,9 +20,9 @@ import org.eclipse.swt.SWT; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; import at.asit.pdfover.gui.controls.ErrorDialog; import at.asit.pdfover.gui.controls.ErrorDialog.ERROR_BUTTONS; +import at.asit.pdfover.gui.utils.Messages; import at.asit.pdfover.gui.workflow.StateMachine; import at.asit.pdfover.gui.workflow.Status; import at.asit.pdfover.signator.Signer; diff --git a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java index c7430bab..e3da8076 100644 --- a/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java +++ b/trunk/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java @@ -36,7 +36,7 @@ import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import at.asit.pdfover.gui.Messages; +import at.asit.pdfover.gui.utils.Messages; /** * -- cgit v1.2.3