Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java @ 213:7ea004d0ffbc
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
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Thu, 07 Apr 2011 11:31:19 +0000 |
parents | 9ca5160cf080 |
children | 6838e4112eeb |
line wrap: on
line diff
--- 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();