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; 9 import javax.servlet.ServletContext; 10 import javax.servlet.ServletException; 11 import javax.servlet.http.HttpServletResponse; 12 import javax.servlet.http.HttpServletRequest; 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 getModel(); 24 25 /** 26 * Obtain any params that were set. 27 */ 28 public Map 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; 35 36 /** 37 */ 38 public HttpServletRequest getRequest(); 39 40 /** 41 */ 42 public ServletContext getServletContext(); 43 44 /** 45 * Returns the *real* response object. Do not use this 46 * unless you know are the tail! 47 */ 48 public HttpServletResponse getRealResponse(); 49 } 50