org.apache.tiles.request
Class ApplicationContextWrapper

Package class diagram package ApplicationContextWrapper
java.lang.Object
  extended by org.apache.tiles.request.ApplicationContextWrapper
All Implemented Interfaces:
ApplicationContext

public class ApplicationContextWrapper
extends Object
implements ApplicationContext

Delegate for ease of customization.

Version:
$Rev: 933750 $ $Date: 2010-04-13 21:16:06 +0200 (Tue, 13 Apr 2010) $

Constructor Summary
ApplicationContextWrapper(ApplicationContext context)
          Constructor.
 
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.
 ApplicationContext getWrappedApplicationContext()
          Returns the wrapped application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationContextWrapper

public ApplicationContextWrapper(ApplicationContext context)
Constructor.

Parameters:
context - The original context.
Method Detail

getWrappedApplicationContext

public ApplicationContext getWrappedApplicationContext()
Returns the wrapped application context.

Returns:
The wrapped 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.

getContext

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

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

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.