KickJava   Java API By Example, From Geeks To Geeks.

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


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.NodeException;
13 import org.jboss.portal.cms.Node;
14
15 /**
16  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
17  * @version $Revision: 1.1 $
18  */

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