This project has retired. For details please refer to its Attic page.
VelocityTilesRequestContext (Tiles 2 2.2.2 API)

org.apache.tiles.velocity.context
Class VelocityTilesRequestContext

Package class diagram package VelocityTilesRequestContext
java.lang.Object
  extended by org.apache.tiles.context.TilesRequestContextWrapper
      extended by org.apache.tiles.velocity.context.VelocityTilesRequestContext
All Implemented Interfaces:
TilesRequestContext

public class VelocityTilesRequestContext
extends TilesRequestContextWrapper

The implementation of the Tiles request context specific for Velocity.

Since:
2.2.0
Version:
$Rev: 769961 $ $Date: 2009-04-30 00:07:34 +0200 (gio, 30 apr 2009) $

Constructor Summary
VelocityTilesRequestContext(TilesRequestContext enclosedRequest, org.apache.velocity.context.Context ctx, Writer writer)
          Constructor.
 
Method Summary
 void dispatch(String path)
          Dispatches the request to a specified path.
 PrintWriter getPrintWriter()
          Returns a print writer to be used to write directly in the response.
 Object[] getRequestObjects()
          Returns the original request objects used to create this request.
 Writer getWriter()
          Returns a writer to be used to write directly in the response.
 void include(String path)
          Includes the response from the specified URL in the current response output.
 
Methods inherited from class org.apache.tiles.context.TilesRequestContextWrapper
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getRequest, getRequestLocale, getRequestScope, getResponse, getSessionScope, getWrappedRequest, isResponseCommitted, isUserInRole, setContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTilesRequestContext

public VelocityTilesRequestContext(TilesRequestContext enclosedRequest,
                                   org.apache.velocity.context.Context ctx,
                                   Writer writer)
Constructor.

Parameters:
enclosedRequest - The request that exposes non-Velocity specific properties
ctx - The Velocity current context.
writer - The writer to use to render the response. It may be null, if not necessary.
Since:
2.2.0
Method Detail

dispatch

public void dispatch(String path)
              throws IOException
Dispatches the request to a specified path.

Specified by:
dispatch in interface TilesRequestContext
Overrides:
dispatch in class TilesRequestContextWrapper
Parameters:
path - The path to dispatch to.
Throws:
IOException - If something goes wrong during dispatching.

include

public void include(String path)
             throws IOException
Includes the response from the specified URL in the current response output.

Specified by:
include in interface TilesRequestContext
Overrides:
include in class TilesRequestContextWrapper
Parameters:
path - The path to include.
Throws:
IOException - If something goes wrong during inclusion.

getPrintWriter

public PrintWriter getPrintWriter()
                           throws IOException
Returns a print writer to be used to write directly in the response.

Specified by:
getPrintWriter in interface TilesRequestContext
Overrides:
getPrintWriter in class TilesRequestContextWrapper
Returns:
The print writer that writes in the response.
Throws:
IOException - If something goes wrong when getting the print writer.

getWriter

public Writer getWriter()
                 throws IOException
Returns a writer to be used to write directly in the response.

Specified by:
getWriter in interface TilesRequestContext
Overrides:
getWriter in class TilesRequestContextWrapper
Returns:
The writer that writes in the response.
Throws:
IOException - If something goes wrong when getting the writer.

getRequestObjects

public Object[] getRequestObjects()
Returns the original request objects used to create this request.

Specified by:
getRequestObjects in interface TilesRequestContext
Overrides:
getRequestObjects in class TilesRequestContextWrapper
Returns:
The request objects.


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.