net.sourceforge.pebble.web.view
Class View

java.lang.Object
  extended by net.sourceforge.pebble.web.view.View
Direct Known Subclasses:
BinaryView, ForbiddenView, ForwardView, JspView, NotFoundView, NotModifiedView, RedirectView

public abstract class View
extends java.lang.Object

Represents a view component and prepares the model for display.

Author:
Simon Brown

Constructor Summary
View()
           
 
Method Summary
abstract  void dispatch(HttpServletRequest request, HttpServletResponse response, ServletContext context)
          Dispatches this view.
abstract  java.lang.String getContentType()
          Gets the content type of this view.
 Model getModel()
          Gets the model.
 ServletContext getServletContext()
          Gets the ServletContext in which this view is operating.
 void prepare()
          Prepares the view for presentation.
 void setModel(Model model)
          Sets the model.
 void setServletContext(ServletContext servletContext)
          Gets the ServletContext in which this view is operating.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

View

public View()
Method Detail

getContentType

public abstract java.lang.String getContentType()
Gets the content type of this view.

Returns:
the content type as a String

getModel

public Model getModel()
Gets the model.

Returns:
a Model instance

setModel

public void setModel(Model model)
Sets the model.

Parameters:
model - a Model instance

getServletContext

public ServletContext getServletContext()
Gets the ServletContext in which this view is operating.

Returns:
a ServletContext instance

setServletContext

public void setServletContext(ServletContext servletContext)
Gets the ServletContext in which this view is operating.

Parameters:
servletContext - a ServletContext instance

prepare

public void prepare()
Prepares the view for presentation.


dispatch

public abstract void dispatch(HttpServletRequest request,
                              HttpServletResponse response,
                              ServletContext context)
                       throws ServletException
Dispatches this view.

Parameters:
request - the HttpServletRequest instance
response - the HttpServletResponse instance
context - the ServletContext instance
Throws:
ServletException


Copyright © 2003-2006, Simon Brown. All Rights Reserved.