This project has retired. For details please refer to its Attic page.
MockOnlyLocaleTilesContext (Tiles 2 2.1.4 Test API)

org.apache.tiles.definition
Class MockOnlyLocaleTilesContext

Package class diagram package MockOnlyLocaleTilesContext
java.lang.Object
  extended by org.apache.tiles.definition.MockOnlyLocaleTilesContext
All Implemented Interfaces:
TilesRequestContext

public class MockOnlyLocaleTilesContext
extends Object
implements TilesRequestContext

Creates a TilesApplicationContext that contains only a Locale.

Version:
$Rev: 736275 $ $Date: 2009-01-21 10:58:20 +0100 (mer, 21 gen 2009) $

Constructor Summary
MockOnlyLocaleTilesContext(Locale locale)
          Creates a new instance of MockOnlyLocaleTilesContext.
 
Method Summary
 void dispatch(String path)
          
 TilesApplicationContext getApplicationContext()
          
 Map<String,String> getHeader()
          
 Map<String,String[]> getHeaderValues()
          
 OutputStream getOutputStream()
          
 Map<String,String> getParam()
          
 Map<String,String[]> getParamValues()
          
 PrintWriter getPrintWriter()
          
 Object getRequest()
          
 Locale getRequestLocale()
          Returns the locale specified in the constructor.
 Object[] getRequestObjects()
          
 Map<String,Object> getRequestScope()
          
 Object getResponse()
          
 Map<String,Object> getSessionScope()
          
 Writer getWriter()
          
 void include(String path)
          
 boolean isUserInRole(String role)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockOnlyLocaleTilesContext

public MockOnlyLocaleTilesContext(Locale locale)
Creates a new instance of MockOnlyLocaleTilesContext.

Parameters:
locale - The locale object to use.
Method Detail

getRequestLocale

public Locale getRequestLocale()
Returns the locale specified in the constructor.

Specified by:
getRequestLocale in interface TilesRequestContext
Returns:
The locale of the request.
See Also:
TilesRequestContext.getRequestLocale()

dispatch

public void dispatch(String path)
              throws IOException

Specified by:
dispatch in interface TilesRequestContext
Throws:
IOException

getHeader

public Map<String,String> getHeader()

Specified by:
getHeader in interface TilesRequestContext

getOutputStream

public OutputStream getOutputStream()

Specified by:
getOutputStream in interface TilesRequestContext

getWriter

public Writer getWriter()

Specified by:
getWriter in interface TilesRequestContext

getPrintWriter

public PrintWriter getPrintWriter()
                           throws IOException

Specified by:
getPrintWriter in interface TilesRequestContext
Throws:
IOException

getHeaderValues

public Map<String,String[]> getHeaderValues()

Specified by:
getHeaderValues in interface TilesRequestContext

getParam

public Map<String,String> getParam()

Specified by:
getParam in interface TilesRequestContext

getParamValues

public Map<String,String[]> getParamValues()

Specified by:
getParamValues in interface TilesRequestContext

getRequestScope

public Map<String,Object> getRequestScope()

Specified by:
getRequestScope in interface TilesRequestContext

getSessionScope

public Map<String,Object> getSessionScope()

Specified by:
getSessionScope in interface TilesRequestContext

getApplicationContext

public TilesApplicationContext getApplicationContext()

Specified by:
getApplicationContext in interface TilesRequestContext

include

public void include(String path)
             throws IOException

Specified by:
include in interface TilesRequestContext
Throws:
IOException

isUserInRole

public boolean isUserInRole(String role)

Specified by:
isUserInRole in interface TilesRequestContext

getRequestObjects

public Object[] getRequestObjects()

Specified by:
getRequestObjects in interface TilesRequestContext

getRequest

public Object getRequest()

Specified by:
getRequest in interface TilesRequestContext

getResponse

public Object getResponse()

Specified by:
getResponse in interface TilesRequestContext


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