KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > test > cms > stress > DeleteCommand


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Distributable under LGPL license. *
6  * See terms of license at gnu.org. *
7  * *
8  *****************************************/

9 package org.jboss.portal.test.cms.stress;
10
11 import org.jboss.portal.cms.NodeFactory;
12 import org.jboss.portal.cms.Node;
13
14 /**
15  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
16  * @version $Revision: 1.1 $
17  */

18 public class DeleteCommand extends Command
19 {
20
21    private String JavaDoc uri;
22
23    public DeleteCommand(String JavaDoc uri)
24    {
25       this.uri = uri;
26    }
27
28    public void execute(Client.Result result, NodeFactory factory) throws Exception JavaDoc
29    {
30       Node node = factory.getNode(uri);
31       node.delete();
32    }
33
34    protected String JavaDoc describe()
35    {
36       return "[delete," + uri + "]";
37    }
38 }
39
Popular Tags