KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > inversoft > verge > mvc > controller > actionflow > ActionFlowActionTestHelper


1 /*
2  * Copyright (c) 2003, Inversoft
3  *
4  * This software is distribuable under the GNU Lesser General Public License.
5  * For more information visit gnu.org.
6  */

7 package com.inversoft.verge.mvc.controller.actionflow;
8
9
10 import com.inversoft.verge.mvc.controller.actionflow.config.Node;
11
12
13 /**
14  * This class helps set values in the ActionFlowAction object
15  * that are default scoped. This class is only useful for
16  * testing purposes and should not be used in a production
17  * environment. Likewise, this class is only usable in
18  * version 2.0 and could become obsolete later.
19  *
20  * @author Brian Pontarelli
21  */

22 public class ActionFlowActionTestHelper extends ActionFlowAction {
23
24     private ActionFlowAction action;
25
26
27     /**
28      * Constructs a new <code>ActionFlowActionTestHelper</code>.
29      */

30     public ActionFlowActionTestHelper(ActionFlowAction action) {
31         super(action.getHttpServletRequest(), action.getHttpServletResponse(),
32             action.getRequestContext());
33         assert (action != null) : "action == null";
34
35         this.action = action;
36     }
37
38
39     /**
40      * Sets The current action
41      *
42      * @param action The current action
43      */

44     public void setAction(Object JavaDoc action) {
45         this.action.setAction(action);
46     }
47
48     /**
49      * Sets the {@link com.inversoft.verge.mvc.controller.actionflow.config.Node Node}
50      * of the Node currently being executed
51      *
52      * @param node The <code>Node</code> of the node currently being
53      * executed
54      */

55     public void setNode(Node node) {
56         action.setNode(node);
57     }
58 }
59
60
Popular Tags