KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > infohazard > maverick > flow > ControllerContext


1 /*
2  * $Id: ControllerContext.java,v 1.3 2003/02/19 22:50:48 lhoriman Exp $
3  * $Source: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ControllerContext.java,v $
4  */

5
6 package org.infohazard.maverick.flow;
7
8 import java.util.Map JavaDoc;
9 import javax.servlet.ServletConfig JavaDoc;
10 import javax.servlet.ServletContext JavaDoc;
11 import javax.servlet.http.HttpServletRequest JavaDoc;
12 import javax.servlet.http.HttpServletResponse JavaDoc;
13
14 /**
15  * ControllerContext defines the methods and data available to a
16  * controller for a single request.
17  */

18 public interface ControllerContext
19 {
20     /**
21      * Basic data
22      */

23     public HttpServletRequest JavaDoc getRequest();
24     
25     /**
26      * Basic data
27      */

28     public HttpServletResponse JavaDoc getResponse();
29
30     /**
31      * Basic data
32      */

33     public ServletConfig JavaDoc getServletConfig();
34     
35     /**
36      * Basic data
37      */

38     public ServletContext JavaDoc getServletContext();
39     
40     /**
41      * Set the model to be rendered.
42      */

43     public void setModel(Object JavaDoc mod);
44     
45     /**
46      * @return the model which was set.
47      */

48     public Object JavaDoc getModel();
49     
50     /**
51      * Sets a parameter to the controller (not view or transforms).
52      */

53     public void setControllerParam(String JavaDoc name, Object JavaDoc value);
54
55     /**
56      * Sets a parameter to the view (not controller or transforms).
57      */

58     public void setViewParam(String JavaDoc name, Object JavaDoc value);
59
60     /**
61      * Sets a parameter to the transforms (not controller or view).
62      */

63     public void setTransformParam(String JavaDoc name, Object JavaDoc value);
64
65     /**
66      * @return any params set on the controller node, or null if none.
67      */

68     public Map JavaDoc getControllerParams();
69 }
70
Popular Tags