org.apache.tiles.request
Interface ApplicationContext

Package class diagram package ApplicationContext
All Known Implementing Classes:
ApplicationContextWrapper, PortletApplicationContext, ServletApplicationContext, WildcardPortletApplicationContext, WildcardServletApplicationContext

public interface ApplicationContext

Defines a set of methods which tiles use to communicate to the tiles container and runtime environment. There is only one application context per container.

Version:
$Rev: 1306435 $ $Date: 2012-03-28 17:39:11 +0200 (Wed, 28 Mar 2012) $

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.
 

Method Detail

getContext

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

Returns:
The original application context.

getApplicationScope

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

Returns:
Map of key value pairs.

getInitParams

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

Returns:
initialization parameters

getResource

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

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

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

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

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

Parameters:
path - to the desired resource.
Returns:
all resources which match the given path.


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.