Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java @ 8712:582e970115b6
(issue1448) Localize SedimentLoadInfo Exceptions shown in the client
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 24 Apr 2015 17:18:48 +0200 |
parents | f54c4b858213 |
children | 5e38e2924c07 |
comparison
equal
deleted
inserted
replaced
8711:02162b60cf9c | 8712:582e970115b6 |
---|---|
37 private static final Logger log = | 37 private static final Logger log = |
38 Logger.getLogger(SedimentLoadInfoServiceImpl.class); | 38 Logger.getLogger(SedimentLoadInfoServiceImpl.class); |
39 | 39 |
40 public static final String ERROR_NO_SEDIMENTLOADINFO_FOUND = | 40 public static final String ERROR_NO_SEDIMENTLOADINFO_FOUND = |
41 "error_no_sedimentloadinfo_found"; | 41 "error_no_sedimentloadinfo_found"; |
42 | |
43 public static final String ERROR_NO_SEDIMENTLOADINFO_DATA = | |
44 "error_no_sedimentloadinfo_data"; | |
42 | 45 |
43 @Override | 46 @Override |
44 public SedimentLoadInfoObject[] getSedimentLoadInfo( | 47 public SedimentLoadInfoObject[] getSedimentLoadInfo( |
45 String locale, | 48 String locale, |
46 String river, | 49 String river, |
114 { | 117 { |
115 NodeList list = result.getElementsByTagName("sedimentload"); | 118 NodeList list = result.getElementsByTagName("sedimentload"); |
116 | 119 |
117 if (list == null || list.getLength() == 0) { | 120 if (list == null || list.getLength() == 0) { |
118 log.warn("No sedimentload info found."); | 121 log.warn("No sedimentload info found."); |
119 throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_FOUND); | 122 throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_DATA); |
120 } | 123 } |
121 | 124 |
122 int num = list.getLength(); | 125 int num = list.getLength(); |
123 log.debug("Response contains " + num + " objects."); | 126 log.debug("Response contains " + num + " objects."); |
124 | 127 |