KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > server > output > ActionResult


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.server.output;
10
11 import java.util.Map JavaDoc;
12
13 import org.jboss.portal.server.WindowContext;
14 import org.jboss.portal.server.plugins.mode.Mode;
15 import org.jboss.portal.server.plugins.windowstate.WindowState;
16 import org.jboss.portal.server.util.Parameters;
17
18 /**
19  * An action has been taken.
20  *
21  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
22  * @version $Revision: 1.2 $
23  */

24 public class ActionResult extends Result
25 {
26
27    protected Mode mode;
28    protected WindowState windowState;
29    protected Parameters parameters;
30
31    public ActionResult(WindowContext producer)
32    {
33       super(producer);
34    }
35
36    public Mode getMode()
37    {
38       return mode;
39    }
40
41    public void setMode(Mode mode)
42    {
43       this.mode = mode;
44    }
45
46    public WindowState getWindowState()
47    {
48       return windowState;
49    }
50
51    public void setWindowState(WindowState windowState)
52    {
53       this.windowState = windowState;
54    }
55
56    public void setRenderParameter(String JavaDoc name, String JavaDoc value)
57    {
58       if (parameters == null)
59       {
60          this.parameters = new Parameters();
61       }
62       parameters.setParameter(name, value);
63    }
64
65    public void setRenderParameter(String JavaDoc name, String JavaDoc[] values)
66    {
67       if (parameters == null)
68       {
69          this.parameters = new Parameters();
70       }
71       parameters.setParameterValues(name, values);
72    }
73
74    public void setRenderParameters(Map JavaDoc map)
75    {
76       if (parameters == null)
77       {
78          this.parameters = new Parameters();
79       }
80       parameters.setParameterMap(map);
81    }
82
83    public Parameters getParameters()
84    {
85       return parameters;
86    }
87 }
88
Popular Tags