# HG changeset patch # User Ingo Weinzierl # Date 1302175879 0 # Node ID 7ea004d0ffbcca0502d36be7e7c437f999d2ae5d # Parent e3ea3c74b7f56af7aa1997bca47260dc3a870078 The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact. flys-client/trunk@1655 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r e3ea3c74b7f5 -r 7ea004d0ffbc flys-client/ChangeLog --- a/flys-client/ChangeLog Thu Apr 07 10:33:48 2011 +0000 +++ b/flys-client/ChangeLog Thu Apr 07 11:31:19 2011 +0000 @@ -1,3 +1,10 @@ +2011-04-07 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java, + src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java: + Adjusted the code to trigger the out() operation of the Collection + instead of the out() operation of the first Artifact in that Collection. + 2011-04-07 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/FLYSConstants_en.properties, diff -r e3ea3c74b7f5 -r 7ea004d0ffbc flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java Thu Apr 07 10:33:48 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java Thu Apr 07 11:31:19 2011 +0000 @@ -1,5 +1,7 @@ package de.intevation.flys.client.client.ui; +import java.util.Date; + import com.google.gwt.core.client.GWT; import com.smartgwt.client.widgets.Canvas; @@ -75,19 +77,13 @@ protected String getImgUrl() { Config config = Config.getInstance(); String server = config.getServerUrl(); - String uuid = collection.getItem(0).identifier(); - String hash = collection.getItem(0).hash(); String imgUrl = GWT.getModuleBaseURL(); imgUrl += "chart"; - imgUrl += "?target=chart"; + imgUrl += "?uuid=" + collection.identifier(); + imgUrl += "&type=" + mode.getName(); imgUrl += "&server=" + server; - imgUrl += "&mode=img"; - imgUrl += "&width=600"; - imgUrl += "&height=400"; - imgUrl += "&points=false"; - imgUrl += "&uuid=" + uuid; - imgUrl += "&hash=" + hash; + imgUrl += "×tamp=" + new Date().getTime(); GWT.log("IMAGE URL = " + imgUrl); diff -r e3ea3c74b7f5 -r 7ea004d0ffbc flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Thu Apr 07 10:33:48 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Thu Apr 07 11:31:19 2011 +0000 @@ -2,8 +2,6 @@ import java.io.OutputStream; import java.io.IOException; -import java.util.HashMap; -import java.util.Map; import org.w3c.dom.Document; @@ -11,10 +9,10 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import de.intevation.artifacts.common.utils.ClientProtocolUtils; + import de.intevation.artifacts.httpclient.http.HttpClient; import de.intevation.artifacts.httpclient.http.HttpClientImpl; -import de.intevation.artifacts.httpclient.objects.Artifact; -import de.intevation.artifacts.httpclient.utils.ArtifactProtocolUtils; /** @@ -35,23 +33,14 @@ String serverUrl = req.getParameter("server"); String uuid = req.getParameter("uuid"); - String hash = req.getParameter("hash"); - String width = req.getParameter("width"); - String height = req.getParameter("height"); - String target = req.getParameter("target"); + String type = req.getParameter("type"); String mimeType = "image/png"; - Map opts = new HashMap(); - opts.put("width", width); - opts.put("height", height); - opts.put("mimeType", mimeType); - opts.put("points", "false"); - - Document chart = ArtifactProtocolUtils.createChartDocument( - new Artifact(hash, uuid), opts); + Document request = ClientProtocolUtils.newOutCollectionDocument( + uuid, type); HttpClient client = new HttpClientImpl(serverUrl); - client.out(new Artifact(uuid, hash), chart, target, out); + client.collectionOut(request, uuid, "chart", out); out.close(); out.flush();