diff flys-client/src/main/java/de/intevation/flys/client/server/DeleteCollectionServiceImpl.java @ 599:1dbffe4c6d12

Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection. flys-client/trunk@2203 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 22 Jun 2011 12:50:20 +0000
parents 031357c3e23e
children ab8eb2f544f2
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/DeleteCollectionServiceImpl.java	Wed Jun 22 11:47:07 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/DeleteCollectionServiceImpl.java	Wed Jun 22 12:50:20 2011 +0000
@@ -2,15 +2,8 @@
 
 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.artifacts.httpclient.http.response.DocumentResponseHandler;
-
 import de.intevation.flys.client.shared.exceptions.ServerException;
 import de.intevation.flys.client.shared.model.Collection;
 import de.intevation.flys.client.client.services.DeleteCollectionService;
@@ -20,14 +13,20 @@
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
 public class DeleteCollectionServiceImpl
-extends      RemoteServiceServlet
+extends      DoCollectionAction
 implements   DeleteCollectionService
 {
+    public static final String XPATH_RESULT      = "/art:result/text()";
+    public static final String OPERATION_FAILURE = "FAILED";
+
     public void delete(Collection c, String url)
     throws ServerException
     {
-        // TODO IMPLEMENT ME
-        throw new ServerException("Delete Service NOT IMPLEMENTED");
+        System.out.println("Delete collection: " + c.identifier());
+
+        Document del = ClientProtocolUtils.newDeleteCollectionDocument();
+
+        doAction(c, del, url);
     }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org