org.apache.tiles.request.servlet
Class ServletApplicationContext

Package class diagram package ServletApplicationContext
java.lang.Object
  extended by org.apache.tiles.request.servlet.ServletApplicationContext
All Implemented Interfaces:
ApplicationContext
Direct Known Subclasses:
WildcardServletApplicationContext

public class ServletApplicationContext
extends Object
implements ApplicationContext

Servlet-based implementation of the TilesApplicationContext interface.

Version:
$Rev: 1297705 $ $Date: 2012-03-06 15:44:30 -0500 (Tue, 06 Mar 2012) $

Constructor Summary
ServletApplicationContext(ServletContext servletContext)
          Creates a new instance of ServletTilesApplicationContext.
 
Method Summary
 Map<String,Object> getApplicationScope()
          Returns a mutable Map that maps application scope attribute names to their values.
 Object getContext()
          Returns the original, technology-dependent, context.
 Map<String,String> getInitParams()
          Return an immutable Map that maps context application initialization parameters to their values.
 ApplicationResource getResource(ApplicationResource base, Locale locale)
          Return a localized version of an ApplicationResource.
 ApplicationResource getResource(String localePath)
          Return the application resource mapped to the specified path.
 Collection<ApplicationResource> getResources(String path)
          Return the application resources mapped to the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletApplicationContext

public ServletApplicationContext(ServletContext servletContext)
Creates a new instance of ServletTilesApplicationContext.

Parameters:
servletContext - The servlet context to use.
Method Detail

getContext

public Object getContext()
Returns the original, technology-dependent, context.

Specified by:
getContext in interface ApplicationContext
Returns:
The original application context.

getApplicationScope

public Map<String,Object> getApplicationScope()
Returns a mutable Map that maps application scope attribute names to their values.

Specified by:
getApplicationScope in interface ApplicationContext
Returns:
Map of key value pairs.

getInitParams

public Map<String,String> getInitParams()
Return an immutable Map that maps context application initialization parameters to their values.

Specified by:
getInitParams in interface ApplicationContext
Returns:
initialization parameters

getResource

public ApplicationResource getResource(String localePath)
Return the application resource mapped to the specified path.

Specified by:
getResource in interface ApplicationContext
Parameters:
localePath - path to the desired resource, including the Locale suffix.
Returns:
the first located resource which matches the given path or null if no such resource exists.

getResource

public ApplicationResource getResource(ApplicationResource base,
                                       Locale locale)
Return a localized version of an ApplicationResource.

Specified by:
getResource in interface ApplicationContext
Parameters:
base - the ApplicationResource.
locale - the desired Locale.
Returns:
the first located resource which matches the given path or null if no such resource exists.

getResources

public Collection<ApplicationResource> getResources(String path)
Return the application resources mapped to the specified path.

Specified by:
getResources in interface ApplicationContext
Parameters:
path - to the desired resource.
Returns:
all resources which match the given path.


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