KickJava   Java API By Example, From Geeks To Geeks.

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


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

18 public abstract class Command
19 {
20
21    private String JavaDoc desc;
22
23    public abstract void execute(Client.Result result, NodeFactory factory) throws Exception JavaDoc;
24
25    protected abstract String JavaDoc describe();
26
27    public String JavaDoc getDesc()
28    {
29       if (desc == null)
30       {
31          desc = describe();
32       }
33       return desc;
34    }
35
36    public String JavaDoc toString()
37    {
38       return getDesc();
39    }
40 }
41
Popular Tags