Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.freemarker.context
Class FreeMarkerTilesRequestContext

    java.lang.Object
      org.apache.tiles.context.TilesRequestContextWrapper
          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(java.lang.String path)` Dispatches the request to a specified path.
`java.io.PrintWriter` | `getPrintWriter()` Returns a print writer to be used to write directly in the response.
`java.lang.Object` | `getRequest()` Get the underlying request.
`java.util.Locale` | `getRequestLocale()` Return the preferred Locale in which the client will accept content.
`java.lang.Object[]` | `getRequestObjects()` Returns the original request objects used to create this request.
`java.lang.Object` | `getResponse()` Get the underlying response.
`java.io.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(java.lang.String path)
                  throws java.io.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:
    `java.io.IOException` - If something goes wrong during dispatching.

### getRequest

    public java.lang.Object getRequest()

  Get the underlying request.

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

### getRequestLocale

    public java.util.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 java.lang.Object getResponse()

  Get the underlying response.

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

### getPrintWriter

    public java.io.PrintWriter getPrintWriter()
                                       throws java.io.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:
    `java.io.IOException` - If something goes wrong when getting the print writer.

### getWriter

    public java.io.Writer getWriter()
                             throws java.io.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:
    `java.io.IOException` - If something goes wrong when getting the writer.

### getRequestObjects

    public java.lang.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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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