Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/Config.java @ 585:ab7ec931bae2
#22 Introduced a polling mechanism to refresh the projects of a user in the project list.
flys-client/trunk@2173 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 21 Jun 2011 10:05:04 +0000 |
parents | 385e9368ffcd |
children | d81533df4138 |
comparison
equal
deleted
inserted
replaced
584:dc24b1346271 | 585:ab7ec931bae2 |
---|---|
78 * @return the name of the current locale. | 78 * @return the name of the current locale. |
79 */ | 79 */ |
80 public String getLocale() { | 80 public String getLocale() { |
81 return LocaleInfo.getCurrentLocale().getLocaleName(); | 81 return LocaleInfo.getCurrentLocale().getLocaleName(); |
82 } | 82 } |
83 | |
84 | |
85 /** | |
86 * Returns the integer configured at | |
87 * <i>/config/projectlist/update-interval/text()</i> or -1 if an error | |
88 * occured or no such option is defined. | |
89 * | |
90 * @return the update interval of the project list. | |
91 */ | |
92 public int getProjectListUpdateInterval() { | |
93 Node projectlist = config.getElementsByTagName("projectlist").item(0); | |
94 | |
95 if (projectlist == null) { | |
96 return -1; | |
97 } | |
98 | |
99 Node interval = config.getElementsByTagName("update-interval").item(0); | |
100 | |
101 if (interval == null) { | |
102 return -1; | |
103 } | |
104 | |
105 String value = interval.getFirstChild().getNodeValue(); | |
106 | |
107 return value != null ? Integer.valueOf(value) : -1; | |
108 } | |
83 } | 109 } |
84 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 110 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |