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

org.apache.tiles.freemarker.context
Class FreeMarkerTilesRequestContext

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

public class FreeMarkerTilesRequestContext
extends TilesRequestContextWrapper
implements TilesRequestContext

The FreeMarker-specific request context.

Since:
2.2.0
Version:
$Rev: 765386 $ $Date: 2009-04-15 23:56:54 +0200 (mer, 15 apr 2009) $

Constructor Summary
FreeMarkerTilesRequestContext(TilesRequestContext enclosedRequest, freemarker.core.Environment env)
          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 getRequest()
          Get the underlying request.
 Locale getRequestLocale()
          Return the preferred Locale in which the client will accept content.
 Object[] getRequestObjects()
          Returns the original request objects used to create this request.
 Object getResponse()
          Get the underlying response.
 Writer getWriter()
          Returns a writer to be used to write directly in the response.
 
Methods inherited from class org.apache.tiles.context.TilesRequestContextWrapper
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getRequestScope, getSessionScope, getWrappedRequest, include, isResponseCommitted, isUserInRole, setContentType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tiles.context.TilesRequestContext
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getRequestScope, getSessionScope, include, isResponseCommitted, isUserInRole, setContentType
 

Constructor Detail

FreeMarkerTilesRequestContext

public FreeMarkerTilesRequestContext(TilesRequestContext enclosedRequest,
                                     freemarker.core.Environment env)
Constructor.

Parameters:
enclosedRequest - The request that exposes non-FreeMarker specific properties
env - The FreeMarker environment.
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.

getRequest

public Object getRequest()
Get the underlying request.

Specified by:
getRequest in interface TilesRequestContext
Overrides:
getRequest in class TilesRequestContextWrapper
Returns:
The current request object.

getRequestLocale

public Locale getRequestLocale()
Return the preferred Locale in which the client will accept content.

Specified by:
getRequestLocale in interface TilesRequestContext
Overrides:
getRequestLocale in class TilesRequestContextWrapper
Returns:
The current request locale. It is the locale of the request object itself and it is NOT the locale that the user wants to use. See LocaleResolver to implement strategies to resolve locales.

getResponse

public Object getResponse()
Get the underlying response.

Specified by:
getResponse in interface TilesRequestContext
Overrides:
getResponse in class TilesRequestContextWrapper
Returns:
The current request object.

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.