Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
598:031357c3e23e | 599:1dbffe4c6d12 |
---|---|
1 package de.intevation.flys.client.server; | 1 package de.intevation.flys.client.server; |
2 | 2 |
3 import org.w3c.dom.Document; | 3 import org.w3c.dom.Document; |
4 | 4 |
5 import com.google.gwt.user.server.rpc.RemoteServiceServlet; | |
6 | |
7 import de.intevation.artifacts.common.utils.ClientProtocolUtils; | 5 import de.intevation.artifacts.common.utils.ClientProtocolUtils; |
8 | |
9 import de.intevation.artifacts.httpclient.exceptions.ConnectionException; | |
10 import de.intevation.artifacts.httpclient.http.HttpClient; | |
11 import de.intevation.artifacts.httpclient.http.HttpClientImpl; | |
12 import de.intevation.artifacts.httpclient.http.response.DocumentResponseHandler; | |
13 | 6 |
14 import de.intevation.flys.client.shared.exceptions.ServerException; | 7 import de.intevation.flys.client.shared.exceptions.ServerException; |
15 import de.intevation.flys.client.shared.model.Collection; | 8 import de.intevation.flys.client.shared.model.Collection; |
16 import de.intevation.flys.client.client.services.DeleteCollectionService; | 9 import de.intevation.flys.client.client.services.DeleteCollectionService; |
17 | 10 |
18 | 11 |
19 /** | 12 /** |
20 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 13 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
21 */ | 14 */ |
22 public class DeleteCollectionServiceImpl | 15 public class DeleteCollectionServiceImpl |
23 extends RemoteServiceServlet | 16 extends DoCollectionAction |
24 implements DeleteCollectionService | 17 implements DeleteCollectionService |
25 { | 18 { |
19 public static final String XPATH_RESULT = "/art:result/text()"; | |
20 public static final String OPERATION_FAILURE = "FAILED"; | |
21 | |
26 public void delete(Collection c, String url) | 22 public void delete(Collection c, String url) |
27 throws ServerException | 23 throws ServerException |
28 { | 24 { |
29 // TODO IMPLEMENT ME | 25 System.out.println("Delete collection: " + c.identifier()); |
30 throw new ServerException("Delete Service NOT IMPLEMENTED"); | 26 |
27 Document del = ClientProtocolUtils.newDeleteCollectionDocument(); | |
28 | |
29 doAction(c, del, url); | |
31 } | 30 } |
32 } | 31 } |
33 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 32 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |