org.apache.tiles.context.enhanced
Class EnhancedTilesApplicationContext

Package class diagram package EnhancedTilesApplicationContext
java.lang.Object
  extended by org.apache.tiles.context.enhanced.EnhancedTilesApplicationContext
All Implemented Interfaces:
org.apache.tiles.TilesApplicationContext

public class EnhancedTilesApplicationContext
extends java.lang.Object
implements org.apache.tiles.TilesApplicationContext

ApplicationContext decorator used to provide enhancements to the standard context. Specifically, it provides:

Future features will include:

Since:
Tiles 2.0

Constructor Summary
EnhancedTilesApplicationContext(org.apache.tiles.TilesApplicationContext rootContext)
          Constructor.
 
Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getApplicationScope()
          
 java.util.Set<java.net.URL> getClasspathResources(java.lang.String path)
          Searches for resources in the classpath, given a path.
 java.util.Map<java.lang.String,java.lang.String> getInitParams()
          
 java.net.URL getResource(java.lang.String path)
          
 java.util.Set<java.net.URL> getResources(java.lang.String path)
          
 org.apache.tiles.TilesApplicationContext getRootContext()
          Returns the root context.
protected  java.util.Set<java.net.URL> searchResources(java.lang.ClassLoader loader, java.lang.String path)
          Searches for resources in the classpath, given a path, using a class loader.
 void setRootContext(org.apache.tiles.TilesApplicationContext rootContext)
          Sets the root context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedTilesApplicationContext

public EnhancedTilesApplicationContext(org.apache.tiles.TilesApplicationContext rootContext)
Constructor.

Parameters:
rootContext - The root context to use.
Method Detail

getRootContext

public org.apache.tiles.TilesApplicationContext getRootContext()
Returns the root context.

Returns:
The root context.

setRootContext

public void setRootContext(org.apache.tiles.TilesApplicationContext rootContext)
Sets the root context.

Parameters:
rootContext - The root context.

getApplicationScope

public java.util.Map<java.lang.String,java.lang.Object> getApplicationScope()

Specified by:
getApplicationScope in interface org.apache.tiles.TilesApplicationContext

getInitParams

public java.util.Map<java.lang.String,java.lang.String> getInitParams()

Specified by:
getInitParams in interface org.apache.tiles.TilesApplicationContext

getResource

public java.net.URL getResource(java.lang.String path)
                         throws java.io.IOException

Specified by:
getResource in interface org.apache.tiles.TilesApplicationContext
Throws:
java.io.IOException

getResources

public java.util.Set<java.net.URL> getResources(java.lang.String path)
                                         throws java.io.IOException

Specified by:
getResources in interface org.apache.tiles.TilesApplicationContext
Throws:
java.io.IOException

getClasspathResources

public java.util.Set<java.net.URL> getClasspathResources(java.lang.String path)
                                                  throws java.io.IOException
Searches for resources in the classpath, given a path.

Parameters:
path - The path to search into.
Returns:
The set of found URLs.
Throws:
java.io.IOException - If something goes wrong during search.

searchResources

protected java.util.Set<java.net.URL> searchResources(java.lang.ClassLoader loader,
                                                      java.lang.String path)
Searches for resources in the classpath, given a path, using a class loader.

Parameters:
loader - The class loader to use.
path - The path to search into.
Returns:
The set of found URLs.