Mercurial > dive4elements > river
view flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java @ 40:1458bc0a20e2
Clear the panel that displays the current input widget before adding a new item to this panel.
flys-client/trunk@1474 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 15 Mar 2011 14:55:47 +0000 |
parents | fe2f4d1dd784 |
children | e02f50a3ad59 |
line wrap: on
line source
package de.intevation.flys.client.server; import org.w3c.dom.Document; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import de.intevation.artifacts.common.utils.ClientProtocolUtils; import de.intevation.artifacts.httpclient.exceptions.ConnectionException; import de.intevation.artifacts.httpclient.http.HttpClient; import de.intevation.artifacts.httpclient.http.HttpClientImpl; import de.intevation.flys.client.shared.model.Artifact; import de.intevation.flys.client.client.services.ArtifactService; /** * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, * ADVANCE and OUT. * * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ public class ArtifactServiceImpl extends RemoteServiceServlet implements ArtifactService { public Artifact create(String serverUrl, String factory) { Document create = ClientProtocolUtils.newCreateDocument(factory); HttpClient client = new HttpClientImpl(serverUrl); try { return (Artifact) client.create(create, new FLYSArtifactCreator()); } catch (ConnectionException ce) { System.err.println(ce.getLocalizedMessage()); } return null; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :