Mercurial > dive4elements > river
annotate flys-client/src/main/java/de/intevation/flys/client/server/DeleteCollectionServiceImpl.java @ 1414:3484cbfaf369
Create new Artifacts for selected WMS layers of the ExternalWMSWindow.
flys-client/trunk@3304 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 22 Nov 2011 20:13:16 +0000 |
parents | ab8eb2f544f2 |
children | bc06a671ef60 |
rev | line source |
---|---|
598
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.client.server; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import org.w3c.dom.Document; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
1367
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
5 import org.apache.log4j.Logger; |
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
6 |
598
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import de.intevation.artifacts.common.utils.ClientProtocolUtils; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import de.intevation.flys.client.shared.exceptions.ServerException; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import de.intevation.flys.client.shared.model.Collection; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import de.intevation.flys.client.client.services.DeleteCollectionService; |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 /** |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 */ |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 public class DeleteCollectionServiceImpl |
599
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
18 extends DoCollectionAction |
598
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 implements DeleteCollectionService |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 { |
1367
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
21 private static final Logger logger = |
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
22 Logger.getLogger(DeleteCollectionServiceImpl.class); |
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
23 |
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
24 |
599
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
25 public static final String XPATH_RESULT = "/art:result/text()"; |
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
26 public static final String OPERATION_FAILURE = "FAILED"; |
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
27 |
598
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 public void delete(Collection c, String url) |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 throws ServerException |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 { |
1367
ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
599
diff
changeset
|
31 logger.info("Delete collection: " + c.identifier()); |
599
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
32 |
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
33 Document del = ClientProtocolUtils.newDeleteCollectionDocument(); |
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
34 |
1dbffe4c6d12
Implemented the RPC stubs to set the TTL and name of a collection and to delete an existing collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
598
diff
changeset
|
35 doAction(c, del, url); |
598
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 } |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 } |
031357c3e23e
Added stubs to set the name and ttl of a collection and to delete a collection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |