KickJava   Java API By Example, From Geeks To Geeks.

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


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

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

18 public interface ViewContext
19 {
20     /**
21      * Obtain the model which is to be rendered.
22      */

23     public Object JavaDoc getModel();
24
25     /**
26      * Obtain any params that were set.
27      */

28     public Map JavaDoc getViewParams();
29     
30     /**
31      * This is where output should be sent. If it returns null,
32      * there are no transforms, and you should use the real response.
33      */

34     public TransformStep getNextStep() throws ServletException JavaDoc;
35     
36     /**
37      */

38     public HttpServletRequest JavaDoc getRequest();
39
40     /**
41      */

42     public ServletContext JavaDoc getServletContext();
43
44     /**
45      * Returns the *real* response object. Do not use this
46      * unless you know are the tail!
47      */

48     public HttpServletResponse JavaDoc getRealResponse();
49 }
50
Popular Tags