KickJava   Java API By Example, From Geeks To Geeks.

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


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.GenericResult;
11 import com.inversoft.verge.mvc.controller.actionflow.config.Node;
12
13
14 /**
15  * <p>
16  * This class is a Result that renders a URL that will begin
17  * ActionFlowExecution at a specific point.
18  * </p>
19  *
20  * @author Brian Pontarelli
21  */

22 class ActionFlowResult extends GenericResult {
23     
24     /**
25      * Constructs a new <code>ActionFlowResult</code>
26      */

27     public ActionFlowResult(ActionFlowAction action, Node node, String JavaDoc category) {
28         super();
29         this.category = category;
30
31         // Get the MVC servlet URL path
32
String JavaDoc actionStr = null;
33         if (action.getAction() instanceof Exception JavaDoc) {
34             actionStr = action.getAction().getClass().getName();
35         } else {
36             actionStr = action.getAction().toString();
37         }
38
39         // Create the URL that will call the action flow correctly
40
this.url = ActionFlowURLTools.generateURL(node.getNamespace().getName(),
41             null, actionStr, node.getName());
42     }
43
44
45     /**
46      * Always returns false because this is an outside URL that will call into
47      * the server to begin execution
48      */

49     public boolean isForward() {
50         return false;
51     }
52 }
Popular Tags