changeset 3860:b32e8353c30e

Donate own error message when no users were found. flys-client/trunk@5625 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 27 Sep 2012 17:50:18 +0000 (2012-09-27)
parents 62332fa199bf
children 16840d849298
files flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties flys-client/src/main/java/de/intevation/flys/client/server/UserServiceImpl.java
diffstat 5 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Thu Sep 27 14:09:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.java	Thu Sep 27 17:50:18 2012 +0000
@@ -588,6 +588,8 @@
 
     String error_no_such_user();
 
+    String error_no_users();
+
     String error_no_waterlevel_pair_selected();
 
     String error_same_waterlevels_in_pair();
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Thu Sep 27 14:09:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants.properties	Thu Sep 27 17:50:18 2012 +0000
@@ -300,6 +300,7 @@
 error_describe_collection = Error while fetching the projects state.
 error_no_rivers_found = Error while reading supported rivers.
 error_no_such_user = Error - no such user found.
+error_no_users = Error - no users found.
 error_no_waterlevel_pair_selected = Error - no waterlevel pair for building differences selected.
 error_same_waterlevels_in_pair = Error - minuend and subtrahend have to differ.
 error_not_logged_in = You need to log in before you are allowed to start your work.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Sep 27 14:09:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_de.properties	Thu Sep 27 17:50:18 2012 +0000
@@ -298,7 +298,8 @@
 error_create_collection = Fehler beim Erstellen eines neuen Projektes.
 error_describe_collection = Fehler beim Laden des Projektzustandes.
 error_no_rivers_found = Fehler beim Lesen der unterst\u00fctzten Fl\u00fcsse.
-error_no_such_user = Fehler - Kein Benutzer vorhanden.
+error_no_such_user = Fehler - Kein solcher Benutzer vorhanden.
+error_no_users = Fehler - Keine Benutzer vorhanden.
 error_no_waterlevel_pair_selected = Fehler - kein Paar zur Differenzenbildung gew\u00e4hlt.
 error_same_waterlevels_in_pair = Error - minuend and subtrahend m\u00fcssen sich unterscheiden.
 error_not_logged_in = Sie m\u00fcssen sich erst einloggen um mit der Arbeit beginnen zu k\u00f6nnen.
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Thu Sep 27 14:09:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties	Thu Sep 27 17:50:18 2012 +0000
@@ -300,6 +300,7 @@
 error_describe_collection = Error while fetching the projects state.
 error_no_rivers_found = Error while reading supported rivers.
 error_no_such_user = Error - no such user found.
+error_no_users = Error - no users found.
 error_no_waterlevel_pair_selected = Error - no waterlevel pair for building differences selected.
 error_same_waterlevels_in_pair = Error - minuend and subtrahend have to differ.
 error_not_logged_in = You need to log in before you are allowed to start your work.
--- a/flys-client/src/main/java/de/intevation/flys/client/server/UserServiceImpl.java	Thu Sep 27 14:09:24 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/UserServiceImpl.java	Thu Sep 27 17:50:18 2012 +0000
@@ -21,10 +21,13 @@
 extends      RemoteServiceServlet
 implements   UserService
 {
+    /** Private logger. */
     private static final Logger logger = Logger.getLogger(UserServiceImpl.class);
 
     public static final String ERROR_NO_SUCH_USER = "error_no_such_user";
 
+    public static final String ERROR_NO_USERS = "error_no_users";
+
     public User getCurrentUser(String locale)
     throws AuthenticationException
     {
@@ -55,7 +58,7 @@
         }
 
         logger.error("No users existing in the server.");
-        throw new AuthenticationException(ERROR_NO_SUCH_USER);
+        throw new AuthenticationException(ERROR_NO_USERS);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org