org.apache.tiles.request.portlet
Class PortletApplicationContext

Package class diagram package PortletApplicationContext
java.lang.Object
  extended by org.apache.tiles.request.portlet.PortletApplicationContext
All Implemented Interfaces:
ApplicationContext
Direct Known Subclasses:
WildcardPortletApplicationContext

public class PortletApplicationContext
extends Object
implements ApplicationContext

Portlet-based TilesApplicationContext implementation.

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

Field Summary
protected  PortletContext context
          The PortletContext for this web application.
 
Constructor Summary
PortletApplicationContext(PortletContext context)
          Creates a new instance of PortletTilesApplicationContext.
 
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.
 PortletContext getPortletContext()
          Return the PortletContext for this context.
 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.
 void initialize(PortletContext context)
          Initialize (or reinitialize) this PortletApplicationContext instance for the specified Portlet API objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected PortletContext context

The PortletContext for this web application.

Constructor Detail

PortletApplicationContext

public PortletApplicationContext(PortletContext context)
Creates a new instance of PortletTilesApplicationContext.

Parameters:
context - The portlet 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.

initialize

public void initialize(PortletContext context)

Initialize (or reinitialize) this PortletApplicationContext instance for the specified Portlet API objects.

Parameters:
context - The PortletContext for this web application

getPortletContext

public PortletContext getPortletContext()

Return the PortletContext for this context.

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