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.startup
Class AbstractTilesInitializer

    java.lang.Object
      org.apache.tiles.startup.AbstractTilesInitializer

All Implemented Interfaces:
  TilesInitializer

Direct Known Subclasses:
  BasicTilesInitializer, CompleteAutoloadTilesInitializer, DefaultTilesInitializer

    public abstract class AbstractTilesInitializer

extends java.lang.Object
implements TilesInitializer

Default Tiles initialization delegate implementation under a servlet environment. It uses init parameters to create the `TilesApplicationContext` and the `TilesContainer`.

Since:
  2.2.0
Version:
  $Rev: 797540 $ $Date: 2009-07-24 17:42:00 +0200 (ven, 24 lug 2009) $

Field Summary
`static java.lang.String` | `CONTAINER_KEY_INIT_PARAMETER` Init parameter to define the key under which the container will be stored.

Constructor Summary
`AbstractTilesInitializer()`

Method Summary
`protected TilesContainer` | `createContainer(TilesApplicationContext context)` Creates a Tiles container.
`protected abstract AbstractTilesContainerFactory` | `createContainerFactory(TilesApplicationContext context)` Creates a Tiles container factory.
`protected TilesApplicationContext` | `createTilesApplicationContext(TilesApplicationContext preliminaryContext)` Creates the Tiles application context, to be used across all the Tiles-based application.
`void` | `destroy()` Destroys the Tiles container.
`protected java.lang.String` | `getContainerKey(TilesApplicationContext applicationContext)` Returns the container key under which the container will be stored.
`void` | `initialize(TilesApplicationContext applicationContext)` Initializes Tiles.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CONTAINER_KEY_INIT_PARAMETER

    public static final java.lang.String CONTAINER_KEY_INIT_PARAMETER

  Init parameter to define the key under which the container will be stored.

  Since:
    2.1.2
  See Also:
    Constant Field Values

Constructor Detail

### AbstractTilesInitializer

    public AbstractTilesInitializer()

Method Detail

### initialize

    public void initialize(TilesApplicationContext applicationContext)

  Initializes Tiles.

  Specified by:
    `initialize` in interface `TilesInitializer`
  Parameters:
    `applicationContext` - The preliminary application context to use. It will be overwritten with the real instance later. Use a context usable under your current environment, like ServletTilesApplicationContext or PortletTilesApplicationContext.

### destroy

    public void destroy()

  Destroys the Tiles container.

  Specified by:
    `destroy` in interface `TilesInitializer`

### createTilesApplicationContext

    protected TilesApplicationContext createTilesApplicationContext(TilesApplicationContext preliminaryContext)

  Creates the Tiles application context, to be used across all the Tiles-based application. If you override this class, please override this method or `#createAndInitializeTilesApplicationContextFactory(TilesApplicationContext)` .
  This implementation returns the preliminary context passed as a parameter

  Parameters:
    `preliminaryContext` - The preliminary application context to use.
  Returns:
    The Tiles application context.
  Since:
    2.2.0

### getContainerKey

    protected java.lang.String getContainerKey(TilesApplicationContext applicationContext)

  Returns the container key under which the container will be stored. This implementation returns `null` so that the container will be the default one.

  Parameters:
    `applicationContext` - The Tiles application context to use.
  Returns:
    The container key.
  Since:
    2.2.0

### createContainer

    protected TilesContainer createContainer(TilesApplicationContext context)

  Creates a Tiles container. If you override this class, please override this method or `createContainerFactory(TilesApplicationContext)`.

  Parameters:
    `context` - The servlet context to use.
  Returns:
    The created container.
  Since:
    2.2.0

### createContainerFactory

    protected abstract AbstractTilesContainerFactory createContainerFactory(TilesApplicationContext context)

  Creates a Tiles container factory. If you override this class, please override this method or `createContainer(TilesApplicationContext)`.

  Parameters:
    `context` - The servlet context to use.
  Returns:
    The created container factory.
  Since:
    2.2.0

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.