org.apache.tiles.request.freemarker
Class FreemarkerRequest

java.lang.Object
  extended by org.apache.tiles.request.AbstractRequest
      extended by org.apache.tiles.request.DispatchRequestWrapper
          extended by org.apache.tiles.request.AbstractViewRequest
              extended by org.apache.tiles.request.freemarker.FreemarkerRequest
All Implemented Interfaces:
DispatchRequest, Request, RequestWrapper

public class FreemarkerRequest
extends AbstractViewRequest

The FreeMarker-specific request context.

Version:
$Rev: 1332186 $ $Date: 2012-04-30 09:20:15 -0400 (Mon, 30 Apr 2012) $

Field Summary
 
Fields inherited from class org.apache.tiles.request.AbstractRequest
FORCE_INCLUDE_ATTRIBUTE_NAME
 
Constructor Summary
FreemarkerRequest(DispatchRequest enclosedRequest, freemarker.core.Environment env)
          Constructor.
 
Method Summary
static FreemarkerRequest createServletFreemarkerRequest(ApplicationContext applicationContext, freemarker.core.Environment env)
          Creates a new Freemarker request.
 List<String> getAvailableScopes()
           
 Map<String,Object> getContext(String scope)
           
 freemarker.core.Environment getEnvironment()
          Returns the environment object.
 Map<String,Object> getPageScope()
          Returns the page scope.
 PrintWriter getPrintWriter()
          
 Locale getRequestLocale()
          
 Writer getWriter()
          
 
Methods inherited from class org.apache.tiles.request.AbstractViewRequest
dispatch, doInclude, include
 
Methods inherited from class org.apache.tiles.request.DispatchRequestWrapper
getApplicationContext, getHeader, getHeaderValues, getOutputStream, getParam, getParamValues, getResponseHeaders, getWrappedRequest, isResponseCommitted, isUserInRole, setContentType
 
Methods inherited from class org.apache.tiles.request.AbstractRequest
isForceInclude, setForceInclude
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreemarkerRequest

public FreemarkerRequest(DispatchRequest enclosedRequest,
                         freemarker.core.Environment env)
Constructor.

Parameters:
enclosedRequest - The request that exposes non-FreeMarker specific properties
env - The FreeMarker environment.
Method Detail

createServletFreemarkerRequest

public static FreemarkerRequest createServletFreemarkerRequest(ApplicationContext applicationContext,
                                                               freemarker.core.Environment env)
Creates a new Freemarker request.

Parameters:
applicationContext - The application context.
env - The Freemarker's environment object.
Returns:
A new request.

getEnvironment

public freemarker.core.Environment getEnvironment()
Returns the environment object.

Returns:
The environment.

getRequestLocale

public Locale getRequestLocale()

Specified by:
getRequestLocale in interface Request
Overrides:
getRequestLocale in class DispatchRequestWrapper

getPageScope

public Map<String,Object> getPageScope()
Returns the page scope.

Returns:
The page scope.

getAvailableScopes

public List<String> getAvailableScopes()
Specified by:
getAvailableScopes in interface Request
Overrides:
getAvailableScopes in class DispatchRequestWrapper

getPrintWriter

public PrintWriter getPrintWriter()

Specified by:
getPrintWriter in interface Request
Overrides:
getPrintWriter in class DispatchRequestWrapper

getWriter

public Writer getWriter()

Specified by:
getWriter in interface Request
Overrides:
getWriter in class DispatchRequestWrapper

getContext

public Map<String,Object> getContext(String scope)
Specified by:
getContext in interface Request
Overrides:
getContext in class DispatchRequestWrapper


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