changeset 1493:07b9404d7170

Removed unused method calls. flys-client/trunk@3583 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 04 Jan 2012 14:13:26 +0000
parents 7a1ac903a524
children 83b913a6eecb
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsService.java flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsServiceAsync.java flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java
diffstat 9 files changed, 20 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/ChangeLog	Wed Jan 04 14:13:26 2012 +0000
@@ -1,3 +1,15 @@
+2012-01-04  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/client/services/UserCollectionsServiceAsync.java,
+	  src/main/java/de/intevation/flys/client/client/services/UserCollectionsService.java,
+	  src/main/java/de/intevation/flys/client/client/FLYS.java,
+	  src/main/java/de/intevation/flys/client/client/ui/ParameterList.java,
+	  src/main/java/de/intevation/flys/client/client/ui/CollectionView.java,
+	  src/main/java/de/intevation/flys/client/client/ui/ProjectList.java,
+	  src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java:
+	  Removed unused Config.getServerUrl() calls.
+
 2012-01-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Wed Jan 04 14:13:26 2012 +0000
@@ -255,11 +255,8 @@
 
     protected void readRivers() {
         Config config = Config.getInstance();
-        String url    = config.getServerUrl();
         String locale = config.getLocale();
 
-        GWT.log("Fetch rivers from server '" + url + "'");
-
         riverService.list(locale, new AsyncCallback<River[]>() {
             public void onFailure(Throwable caught) {
                 GWT.log("Could not recieve a list of rivers.");
@@ -407,7 +404,6 @@
      */
     public void newArtifact(String factory) {
         Config config = Config.getInstance();
-        String url    = config.getServerUrl();
         String locale = config.getLocale();
 
         artifactService.create(locale, factory, null,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsService.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsService.java	Wed Jan 04 14:13:26 2012 +0000
@@ -24,9 +24,6 @@
      *
      * @return the current {@link User}.
      */
-    Collection[] getUserCollections(
-        String serverUrl,
-        String locale,
-        String userid);
+    Collection[] getUserCollections(String locale, String userid);
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsServiceAsync.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/UserCollectionsServiceAsync.java	Wed Jan 04 14:13:26 2012 +0000
@@ -14,7 +14,6 @@
 public interface UserCollectionsServiceAsync {
 
     void getUserCollections(
-        String serverUrl,
         String locale,
         String userid,
         AsyncCallback<Collection[]> callback);
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Wed Jan 04 14:13:26 2012 +0000
@@ -568,7 +568,6 @@
 
     public void addArtifactToCollection(final Artifact artifact) {
         Config config               = Config.getInstance();
-        final String url            = config.getServerUrl();
         final String locale         = config.getLocale();
         final Collection collection = getCollection();
 
@@ -624,7 +623,6 @@
 
     protected void loadRecommendedArtifacts(Recommendation[] recommendations) {
         Config config               = Config.getInstance();
-        final String url            = config.getServerUrl();
         final String locale         = config.getLocale();
         final Collection collection = getCollection();
 
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ParameterList.java	Wed Jan 04 14:13:26 2012 +0000
@@ -346,7 +346,6 @@
                 setTitle(newTitle);
 
                 Config config       = Config.getInstance();
-                final String url    = config.getServerUrl();
                 final String locale = config.getLocale();
 
                 final Data[] feedData  = new Data[] { data[1] };
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Wed Jan 04 14:13:26 2012 +0000
@@ -532,10 +532,9 @@
         GWT.log("==> ProjectList updates user collections!");
 
         Config config = Config.getInstance();
-        String url    = config.getServerUrl();
         String locale = config.getLocale();
 
-        userCollectionsService.getUserCollections(url, locale, user.identifier(),
+        userCollectionsService.getUserCollections(locale, user.identifier(),
             new AsyncCallback<Collection[]>() {
                 public void onFailure(Throwable caught) {
                     String msg = caught.getMessage();
@@ -765,9 +764,8 @@
 
 
     protected void cloneArtifact(String uuid) {
-        Config config               = Config.getInstance();
-        final String url            = config.getServerUrl();
-        final String locale         = config.getLocale();
+        Config config       = Config.getInstance();
+        final String locale = config.getLocale();
 
         Recommendation recommendation = new Recommendation(
             "winfo",
@@ -817,9 +815,8 @@
 
 
     protected void addArtifactToCollection(Artifact a, Collection c) {
-        Config config               = Config.getInstance();
-        final String url            = config.getServerUrl();
-        final String locale         = config.getLocale();
+        Config config       = Config.getInstance();
+        final String locale = config.getLocale();
 
         addArtifactService.add(
             c, a, locale,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/WQInputPanel.java	Wed Jan 04 14:13:26 2012 +0000
@@ -1605,7 +1605,6 @@
 
     protected void fetchWQData() {
         Config config    = Config.getInstance();
-        String url       = config.getServerUrl();
         String locale    = config.getLocale ();
 
         ArtifactDescription adescr = artifact.getArtifactDescription();
--- a/flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java	Wed Jan 04 13:56:45 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/UserCollectionsServiceImpl.java	Wed Jan 04 14:13:26 2012 +0000
@@ -42,13 +42,10 @@
         UserCollectionsServiceImpl.class);
 
 
-    public Collection[] getUserCollections(
-        String serverUrl,
-        String locale,
-        String userid)
-    {
+    public Collection[] getUserCollections(String locale, String userid) {
         logger.info("UserCollectionsServiceImpl.getUserCollections");
 
+        String serverUrl  = getServletContext().getInitParameter("server-url");
         HttpClient client = new HttpClientImpl(serverUrl, locale);
 
         try {

http://dive4elements.wald.intevation.org