changeset 1413:0d3bbe4240b1

Refactored the LoadArtifactService a bit. flys-client/trunk@3303 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 22 Nov 2011 20:08:41 +0000
parents 659a488243da
children 3484cbfaf369
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactService.java flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactServiceAsync.java flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java flys-client/src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java
diffstat 5 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Tue Nov 22 13:04:46 2011 +0000
+++ b/flys-client/ChangeLog	Tue Nov 22 20:08:41 2011 +0000
@@ -1,3 +1,15 @@
+2011-11-22  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java,
+	  src/main/java/de/intevation/flys/client/client/services/LoadArtifactServiceAsync.java,
+	  src/main/java/de/intevation/flys/client/client/services/LoadArtifactService.java:
+	  Removed the "url" from loadMany()'s parameterlist. We are able to fetch
+	  the required Artifact-Server URL from ServletContext since I have
+	  introduced a BaseServlet.
+
+	* src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java:
+	  Removed the "url" from method call of LoadArtifactService.loadMany().
+
 2011-11-22  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/map/ExternalWMSWindow.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactService.java	Tue Nov 22 13:04:46 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactService.java	Tue Nov 22 20:08:41 2011 +0000
@@ -24,7 +24,6 @@
         Collection       parent,
         Recommendation[] recom,
         String           factory,
-        String           url,
         String           locale)
     throws ServerException;
 }
--- a/flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactServiceAsync.java	Tue Nov 22 13:04:46 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/LoadArtifactServiceAsync.java	Tue Nov 22 20:08:41 2011 +0000
@@ -24,7 +24,6 @@
         Collection       parent,
         Recommendation[] recom,
         String           factory,
-        String           url,
         String           locale,
         AsyncCallback<Artifact[]> callback);
 }
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java	Tue Nov 22 13:04:46 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageTwinPanel.java	Tue Nov 22 20:08:41 2011 +0000
@@ -385,7 +385,6 @@
             toClone,
             //"staticwkms" and "waterlevel"
             null,
-            url,
             locale,
             new AsyncCallback<Artifact[]>() {
                 public void onFailure(Throwable caught) {
--- a/flys-client/src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java	Tue Nov 22 13:04:46 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/LoadArtifactServiceImpl.java	Tue Nov 22 20:08:41 2011 +0000
@@ -91,12 +91,13 @@
         Collection       parent,
         Recommendation[] recoms,
         String           factory,
-        String           url,
         String           locale
     )
     throws ServerException {
         logger.debug("LoadArtifactServiceImpl.loadMany");
 
+        String url = getServletContext().getInitParameter("server-url");
+
         ArrayList<Artifact> artifacts = new ArrayList<Artifact>();
         HashMap<Recommendation, Artifact> cloneMap =
             new HashMap<Recommendation, Artifact>();

http://dive4elements.wald.intevation.org