Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tiles.context.enhanced
Class EnhancedTilesApplicationContext

    java.lang.Object
      org.apache.tiles.context.enhanced.EnhancedTilesApplicationContext

All Implemented Interfaces:
  TilesApplicationContext

    public class EnhancedTilesApplicationContext

extends java.lang.Object
implements TilesApplicationContext

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

- Ability to load resources from the classpath
- Ability to retrieve multiple resources of the same name

Future features will include:

- Ability to utilize wildcards in resource pathcs

Since:
  Tiles 2.0
Version:
  $Rev: 791161 $ $Date: 2009-07-04 20:53:36 +0200 (sab, 04 lug 2009) $

Constructor Summary
`EnhancedTilesApplicationContext(TilesApplicationContext rootContext)` Constructor.

Method Summary
`java.util.Map<java.lang.String,java.lang.Object>` | `getApplicationScope()` Returns a mutable Map that maps application scope attribute names to their values.
`java.util.Set<java.net.URL>` | `getClasspathResources(java.lang.String path)` Searches for resources in the classpath, given a path.
`java.lang.Object` | `getContext()` Returns the original, technology-dependent, context.
`java.util.Map<java.lang.String,java.lang.String>` | `getInitParams()` Return an immutable Map that maps context application initialization parameters to their values.
`java.net.URL` | `getResource(java.lang.String path)` Return a URL for the application resource mapped to the specified path.
`java.util.Set<java.net.URL>` | `getResources(java.lang.String path)` Return a URL for the application resource mapped to the specified path.
`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(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(TilesApplicationContext rootContext)

  Constructor.

  Parameters:
    `rootContext` - The root context to use.

Method Detail

### getContext

    public java.lang.Object getContext()

  Returns the original, technology-dependent, context.

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

### getRootContext

    public TilesApplicationContext getRootContext()

  Returns the root context.

  Returns:
    The root context.

### setRootContext

    public void setRootContext(TilesApplicationContext rootContext)

  Sets the root context.

  Parameters:
    `rootContext` - The root context.

### getApplicationScope

    public java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.lang.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 java.net.URL getResource(java.lang.String path)
                             throws java.io.IOException

  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:
    `java.io.IOException` - if the path is malformed

### getResources

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

  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:
    `java.io.IOException` - if the url is illegal

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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