This project has retired. For details please refer to its Attic page.
PortletTilesApplicationContext (Tiles 2 2.0.7 API)

org.apache.tiles.portlet.context
Class PortletTilesApplicationContext

Package class diagram package PortletTilesApplicationContext
java.lang.Object
  extended by org.apache.tiles.portlet.context.PortletTilesApplicationContext
All Implemented Interfaces:
TilesApplicationContext
Direct Known Subclasses:
PortletTilesRequestContext

public class PortletTilesApplicationContext
extends Object
implements TilesApplicationContext

Portlet-based TilesApplicationContext implementation.

Version:
$Rev: 531864 $ $Date: 2007-04-24 12:24:30 +0200 (Tue, 24 Apr 2007) $

Field Summary
protected  javax.portlet.PortletContext context
          The PortletContext for this web application.
 
Constructor Summary
PortletTilesApplicationContext(javax.portlet.PortletContext context)
          Creates a new instance of PortletTilesApplicationContext.
 
Method Summary
 TilesRequestContext createRequestContext(Object request, Object response)
          Creates a portlet context for a given request/response pair.
 Map<String,Object> getApplicationScope()
          Returns a mutable Map that maps application scope attribute names to their values.
 Map<String,String> getInitParams()
          Return an immutable Map that maps context application initialization parameters to their values.
 javax.portlet.PortletContext getPortletContext()
          Return the PortletContext for this context.
 URL getResource(String path)
          Return a URL for the application resource mapped to the specified path.
 Set<URL> getResources(String path)
          Return a URL for the application resource mapped to the specified path.
 void initialize(javax.portlet.PortletContext context)
          Initialize (or reinitialize) this PortletTilesApplicationContext instance for the specified Portlet API objects.
 void release()
          Release references to allocated resources acquired in initialize() of via subsequent processing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected javax.portlet.PortletContext context

The PortletContext for this web application.

Constructor Detail

PortletTilesApplicationContext

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

Parameters:
context - The portlet context to use.
Method Detail

initialize

public void initialize(javax.portlet.PortletContext context)

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

Parameters:
context - The PortletContext for this web application

release

public void release()

Release references to allocated resources acquired in initialize() of via subsequent processing. After this method is called, subsequent calls to any other method than initialize() will return undefined results.


getPortletContext

public javax.portlet.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 TilesApplicationContext
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 TilesApplicationContext
Returns:
initialization parameters

getResource

public URL getResource(String path)
                throws MalformedURLException
Return a URL for the application resource mapped to the specified path.

Specified by:
getResource in interface TilesApplicationContext
Parameters:
path - to the desired resource.
Returns:
the first located resource which matches the given path.
Throws:
MalformedURLException

getResources

public Set<URL> getResources(String path)
                      throws MalformedURLException
Return a URL for the application resource mapped to the specified path.

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

createRequestContext

public TilesRequestContext createRequestContext(Object request,
                                                Object response)
Creates a portlet context for a given request/response pair.

Parameters:
request - The request object.
response - The response object.
Returns:
The corresponding Tiles request context.


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