From efac472d42715e583416442554d3c55873f8e85d Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 10 Apr 2013 19:22:04 +0000 Subject: Move Messages to utils package git-svn-id: https://joinup.ec.europa.eu/svn/pdf-over/trunk@282 174cde9d-5d70-4d2a-aa98-46368bc2aaf7 --- .../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 pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java create mode 100644 pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/Messages.java (limited to 'pdf-over-gui/src') diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java index c84f28cf..35fc6b5e 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java index a35ee59e..f3de78af 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/MainWindow.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Messages.java deleted file mode 100644 index b17e168a..00000000 --- a/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java index b44b3f80..9d1f51be 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/BKUArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java index 146d83bc..72d6e629 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ConfigFileArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java index 9ca952a4..106f62dc 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/EmblemArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java index 3e19d9e4..21b1124f 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/HelpArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java index 58afdce1..cc37c9b5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/InputDocumentArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java index cbaf7600..0c1c7fc4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/OutputFolderArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java index d0f60bed..bef807a0 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PasswordArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java index bb99c173..6e24c1b7 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/PhoneNumberArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java index da8a5a25..58ece2c6 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyHostArgument.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java index 0dfdd428..34ba0f48 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/cliarguments/ProxyPortArgument.java +++ b/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/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 10b44a61..a3348ccd 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java index e1ec4990..1560ff61 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/BKUSelectionComposite.java +++ b/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/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 1b497559..820b69b6 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java index 90ecc0d7..b0cc905b 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/DataSourceSelectComposite.java +++ b/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/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 c91f9397..eb2a4bfe 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java index 3d88ad0e..945b9672 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/MobileBKUEnterTANComposite.java +++ b/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/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 aa134242..855b3f65 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 @@ -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/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 15cec1f7..43575e45 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java index 7683f837..df443b94 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/SignaturePanel.java +++ b/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/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 36d0a74d..5779f36c 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java index ab62c8d0..71d6acf2 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/composites/WaitingComposite.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java index 7839ed16..5e329df4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/controls/ErrorDialog.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java index 0d3306fa..006778b3 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidEmblemFile.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java index 98b05c79..a6861d38 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/InvalidPortException.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java index 1b7e731b..a71970d8 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderDontExistException.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java index 627b3133..f2053c84 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/OutputfolderNotADirectoryException.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java index 6d870564..61074a33 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooLongException.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java index 1376dfbb..71b9f55c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/exceptions/PasswordTooShortException.java +++ b/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/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 new file mode 100644 index 00000000..89c941eb --- /dev/null +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java index ee44dad2..6fa7c603 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/ConfigProviderImpl.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java index 3478ecc8..5fe5f0fa 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/StateMachineImpl.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java index 163b17b3..367af3d1 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/LocalBKUState.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java index 401d71f3..dca4d8e5 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/MobileBKUState.java +++ b/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/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 a6ec93bd..a7dcbd0a 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java index 02a476be..6f052f1a 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java +++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PositioningState.java @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java index b305700c..41ad5ff4 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/PrepareConfigurationState.java +++ b/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/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 a0406c23..843ed962 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 @@ -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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java index 932a6d8a..15baa36c 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/SigningState.java +++ b/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/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java index c7430bab..e3da8076 100644 --- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/workflow/states/mobilebku/TrustedSocketFactory.java +++ b/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