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.servlet.context
Class ServletTilesApplicationContext

    java.lang.Object
      org.apache.tiles.servlet.context.ServletTilesApplicationContext

All Implemented Interfaces:
  TilesApplicationContext

Direct Known Subclasses:
  WildcardServletTilesApplicationContext

    public class ServletTilesApplicationContext

extends java.lang.Object
implements TilesApplicationContext

Servlet-based implementation of the TilesApplicationContext interface.

Version:
  $Rev: 709140 $ $Date: 2008-10-30 12:07:50 +0100 (gio, 30 ott 2008) $

Constructor Summary
`ServletTilesApplicationContext(javax.servlet.ServletContext servletContext)` Creates a new instance of ServletTilesApplicationContext.

Method Summary
`TilesRequestContext` | `createRequestContext(java.lang.Object request, java.lang.Object response)` Deprecated. Use `TilesRequestContextFactory.createRequestContext(TilesApplicationContext, Object...)` .
`java.util.Map<java.lang.String,java.lang.Object>` | `getApplicationScope()` Returns a mutable Map that maps application scope attribute names to their values.
`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.
`javax.servlet.ServletContext` | `getServletContext()` Deprecated. Use `getContext()`.
`void` | `initialize(javax.servlet.ServletContext context)` Initialize (or reinitialize) this `TilesApplicationContext` instance for the specified Servlet 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`

Constructor Detail

### ServletTilesApplicationContext

    public ServletTilesApplicationContext(javax.servlet.ServletContext servletContext)

  Creates a new instance of ServletTilesApplicationContext.

  Parameters:
    `servletContext` - The servlet 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.

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

### getServletContext

    public javax.servlet.ServletContext getServletContext()

  Deprecated. Use `getContext()`.

  Returns the servlet context.

  Returns:
    The servlet context.

### initialize

    public void initialize(javax.servlet.ServletContext context)

  Initialize (or reinitialize) this `TilesApplicationContext` instance for the specified Servlet API objects.

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

### createRequestContext

    public TilesRequestContext createRequestContext(java.lang.Object request,
                                                    java.lang.Object response)

  Deprecated. Use `TilesRequestContextFactory.createRequestContext(TilesApplicationContext, Object...)` .

  Creates a servlet context for a given request/response pair.

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

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.