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.factory
Class TilesContainerFactory

    java.lang.Object
      org.apache.tiles.factory.AbstractTilesContainerFactory
          org.apache.tiles.factory.TilesContainerFactory

Direct Known Subclasses:
  KeyedDefinitionsFactoryTilesContainerFactory

Deprecated. Please extend `AbstractTilesContainerFactory` or use an already extended class. Parameter-based initialization is no longer supported.

    public class TilesContainerFactory

extends AbstractTilesContainerFactory

Factory provided for convenience. This factory creates a default implementation of the container, initializes, and puts it into service. Uses initialization parameters to configure all the objects created in this phase.

Since:
  2.0
Version:
  $Rev: 798944 $ $Date: 2009-07-29 17:20:27 +0200 (mer, 29 lug 2009) $

Field Summary
`static java.lang.String` | `ATTRIBUTE_EVALUATOR_INIT_PARAM` Deprecated. Initialization parameter that represents the attribute evaluator class name.
`static java.lang.String` | `CONTAINER_FACTORY_INIT_PARAM` Deprecated. Use `AbstractTilesContainerFactory.CONTAINER_FACTORY_INIT_PARAM`.
`static java.lang.String` | `CONTAINER_FACTORY_MUTABLE_INIT_PARAM` Deprecated. Initialization parameter that indicates if the container factory is mutable.
`static java.lang.String` | `CONTEXT_FACTORY_INIT_PARAM` Deprecated. Use `AbstractTilesApplicationContextFactory.APPLICATION_CONTEXT_FACTORY_INIT_PARAM` or `REQUEST_CONTEXT_FACTORY_INIT_PARAM`.
`protected java.util.Map<java.lang.String,java.lang.String>` | `defaultConfiguration` Deprecated. The default configuration to be used by the factory.
`static java.lang.String` | `DEFINITIONS_FACTORY_INIT_PARAM` Deprecated. Initialization parameter that represents the definitions factory class name.
`static java.lang.String` | `PREPARER_FACTORY_INIT_PARAM` Deprecated. Initialization parameter that represents the preparer factory class name.
`static java.lang.String` | `RENDERER_FACTORY_INIT_PARAM` Deprecated. Initialization parameter that represents the renderer factory class name.
`static java.lang.String` | `REQUEST_CONTEXT_FACTORY_INIT_PARAM` Deprecated. Initialization parameter that represents the context factory class name.

Constructor Summary
`TilesContainerFactory()` Deprecated.

Method Summary
`TilesContainer` | `createContainer(java.lang.Object context)` Deprecated. Use `createContainer(TilesApplicationContext)`.
`TilesContainer` | `createContainer(TilesApplicationContext context)` Deprecated. Creates a Tiles container.
`protected static java.lang.Object` | `createFactory(java.util.Map<java.lang.String,java.lang.String> configuration, java.lang.String initParameterName)` Deprecated. Creates a factory instance.
`TilesContainer` | `createMutableTilesContainer(java.lang.Object context)` Deprecated. Use `createMutableTilesContainer(TilesApplicationContext)`.
`MutableTilesContainer` | `createMutableTilesContainer(TilesApplicationContext context)` Deprecated. Creates a mutable Tiles container.
`TilesContainer` | `createTilesContainer(java.lang.Object context)` Deprecated. Use `createTilesContainer(TilesApplicationContext)`.
`TilesContainer` | `createTilesContainer(TilesApplicationContext context)` Deprecated. Creates an immutable Tiles container.
`static TilesContainerFactory` | `getFactory(java.lang.Object context)` Deprecated. Use `AbstractTilesContainerFactory.getTilesContainerFactory(TilesApplicationContext)`.
`static TilesContainerFactory` | `getFactory(java.lang.Object context, java.util.Map<java.lang.String,java.lang.String> defaults)` Deprecated. Use `AbstractTilesContainerFactory.getTilesContainerFactory(TilesApplicationContext)` and then `setDefaultConfiguration(Map)`.
`protected static java.lang.String` | `getInitParameter(java.lang.Object context, java.lang.String parameterName)` Deprecated. Do not use.
`protected static java.util.Map<java.lang.String,java.lang.String>` | `getInitParameterMap(java.lang.Object context)` Deprecated. Do not use.
`protected void` | `initializeContainer(java.lang.Object context, BasicTilesContainer container)` Deprecated. Use `initializeContainer(TilesApplicationContext, BasicTilesContainer)`.
`protected void` | `initializeContainer(TilesApplicationContext context, BasicTilesContainer container)` Deprecated. Initializes a container.
`protected void` | `postCreationOperations(TilesRequestContextFactory contextFactory, TilesApplicationContext tilesContext, RendererFactory rendererFactory, AttributeEvaluator evaluator, java.util.Map<java.lang.String,java.lang.String> initParameters, java.util.Map<java.lang.String,java.lang.String> configuration, BasicTilesContainer container)` Deprecated. After the creation of the elements, it is possible to do other operations that will be done after the creation and before the assignment to the container.
`protected static java.lang.String` | `resolveFactoryName(java.util.Map<java.lang.String,java.lang.String> configuration, java.lang.String parameterName)` Deprecated. Resolves a factory class name.
`void` | `setDefaultConfiguration(java.util.Map<java.lang.String,java.lang.String> defaultConfiguration)` Deprecated. Sets the default configuration parameters.
`void` | `setDefaultValue(java.lang.String key, java.lang.String value)` Deprecated. Sets one default configuration parameter value.
`protected void` | `storeContainerDependencies(java.lang.Object context, java.util.Map<java.lang.String,java.lang.String> initParameters, java.util.Map<java.lang.String,java.lang.String> configuration, BasicTilesContainer container)` Deprecated. Use `storeContainerDependencies(TilesApplicationContext, Map, Map, BasicTilesContainer)` .
`protected void` | `storeContainerDependencies(TilesApplicationContext context, java.util.Map<java.lang.String,java.lang.String> initParameters, java.util.Map<java.lang.String,java.lang.String> configuration, BasicTilesContainer container)` Deprecated. Stores container dependencies, that is called before `TilesContainer.init(Map)`.

Methods inherited from class org.apache.tiles.factory.AbstractTilesContainerFactory
`getTilesContainerFactory`

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

Field Detail

### CONTAINER_FACTORY_INIT_PARAM

    public static final java.lang.String CONTAINER_FACTORY_INIT_PARAM

  Deprecated. Use `AbstractTilesContainerFactory.CONTAINER_FACTORY_INIT_PARAM`.
  Initialization parameter that represents the container factory class name.

  See Also:
    Constant Field Values

### CONTAINER_FACTORY_MUTABLE_INIT_PARAM

    public static final java.lang.String CONTAINER_FACTORY_MUTABLE_INIT_PARAM

  Deprecated.
  Initialization parameter that indicates if the container factory is mutable.

  See Also:
    Constant Field Values

### CONTEXT_FACTORY_INIT_PARAM

    public static final java.lang.String CONTEXT_FACTORY_INIT_PARAM

  Deprecated. Use `AbstractTilesApplicationContextFactory.APPLICATION_CONTEXT_FACTORY_INIT_PARAM` or `REQUEST_CONTEXT_FACTORY_INIT_PARAM`.
  Initialization parameter that represents the context factory class name.

  See Also:
    Constant Field Values

### REQUEST_CONTEXT_FACTORY_INIT_PARAM

    public static final java.lang.String REQUEST_CONTEXT_FACTORY_INIT_PARAM

  Deprecated.
  Initialization parameter that represents the context factory class name.

  Since:
    2.1.1
  See Also:
    Constant Field Values

### DEFINITIONS_FACTORY_INIT_PARAM

    public static final java.lang.String DEFINITIONS_FACTORY_INIT_PARAM

  Deprecated.
  Initialization parameter that represents the definitions factory class name.

  See Also:
    Constant Field Values

### PREPARER_FACTORY_INIT_PARAM

    public static final java.lang.String PREPARER_FACTORY_INIT_PARAM

  Deprecated.
  Initialization parameter that represents the preparer factory class name.

  See Also:
    Constant Field Values

### RENDERER_FACTORY_INIT_PARAM

    public static final java.lang.String RENDERER_FACTORY_INIT_PARAM

  Deprecated.
  Initialization parameter that represents the renderer factory class name.

  Since:
    2.1.0
  See Also:
    Constant Field Values

### ATTRIBUTE_EVALUATOR_INIT_PARAM

    public static final java.lang.String ATTRIBUTE_EVALUATOR_INIT_PARAM

  Deprecated.
  Initialization parameter that represents the attribute evaluator class name.

  Since:
    2.1.0
  See Also:
    Constant Field Values

### defaultConfiguration

    protected java.util.Map<java.lang.String,java.lang.String> defaultConfiguration

  Deprecated.
  The default configuration to be used by the factory.

Constructor Detail

### TilesContainerFactory

    public TilesContainerFactory()

  Deprecated.

Method Detail

### getFactory

    @Deprecated
    public static TilesContainerFactory getFactory(java.lang.Object context)

  Deprecated. Use `AbstractTilesContainerFactory.getTilesContainerFactory(TilesApplicationContext)`.

  Retrieve a factory instance as configured through the specified context.

  The context will be queried and if a init parameter named 'org.apache.tiles.factory.TilesContainerFactory' is discovered this class will be instantiated and returned. Otherwise, the factory will attempt to utilize one of it's internal factories.

  Parameters:
    `context` - the executing applications context. Typically a ServletContext or PortletContext
  Returns:
    a tiles container
  Throws:
    `TilesContainerFactoryException` - if an error occurs creating the factory.
  Since:
    2.1.0

### getFactory

    public static TilesContainerFactory getFactory(java.lang.Object context,
                                                   java.util.Map<java.lang.String,java.lang.String> defaults)

  Deprecated. Use `AbstractTilesContainerFactory.getTilesContainerFactory(TilesApplicationContext)` and then `setDefaultConfiguration(Map)`.

  Retrieve a factory instance as configured through the specified context.

  The context will be queried and if a init parameter named 'org.apache.tiles.factory.TilesContainerFactory' is discovered this class will be instantiated and returned. Otherwise, the factory will attempt to utilize one of it's internal factories.

  Parameters:
    `context` - the executing applications context. Typically a ServletContext or PortletContext
    `defaults` - Default configuration parameters values, used if the context object has not the corresponding parameters.
  Returns:
    a tiles container
  Throws:
    `TilesContainerFactoryException` - if an error occurs creating the factory.

### createContainer

    @Deprecated
    public TilesContainer createContainer(java.lang.Object context)

  Deprecated. Use `createContainer(TilesApplicationContext)`.

  Creates a Tiles container.

  Parameters:
    `context` - The (application) context object.
  Returns:
    The created container.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during instantiation.

### createContainer

    public TilesContainer createContainer(TilesApplicationContext context)

  Deprecated.
  Creates a Tiles container.

  Specified by:
    `createContainer` in class `AbstractTilesContainerFactory`
  Parameters:
    `context` - The Tiles application context object.
  Returns:
    The created container.

### setDefaultConfiguration

    public void setDefaultConfiguration(java.util.Map<java.lang.String,java.lang.String> defaultConfiguration)

  Deprecated.
  Sets the default configuration parameters.

  Parameters:
    `defaultConfiguration` - The default configuration parameters.

### setDefaultValue

    public void setDefaultValue(java.lang.String key,
                                java.lang.String value)

  Deprecated.
  Sets one default configuration parameter value.

  Parameters:
    `key` - The key of the configuration parameter.
    `value` - The value of the configuration parameter.

### createTilesContainer

    @Deprecated
    public TilesContainer createTilesContainer(java.lang.Object context)

  Deprecated. Use `createTilesContainer(TilesApplicationContext)`.

  Creates an immutable Tiles container.

  Parameters:
    `context` - The (application) context object.
  Returns:
    The created Tiles container.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### createTilesContainer

    public TilesContainer createTilesContainer(TilesApplicationContext context)

  Deprecated.
  Creates an immutable Tiles container.

  Parameters:
    `context` - The Tiles application context object.
  Returns:
    The created Tiles container.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.
  Since:
    2.1.1

### createMutableTilesContainer

    @Deprecated
    public TilesContainer createMutableTilesContainer(java.lang.Object context)

  Deprecated. Use `createMutableTilesContainer(TilesApplicationContext)`.

  Creates an immutable Tiles container.

  Parameters:
    `context` - The (application) context object.
  Returns:
    The created Tiles container.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### createMutableTilesContainer

    public MutableTilesContainer createMutableTilesContainer(TilesApplicationContext context)

  Deprecated.
  Creates a mutable Tiles container.

  Parameters:
    `context` - The Tiles application context object.
  Returns:
    The created Tiles container.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### initializeContainer

    @Deprecated
    protected void initializeContainer(java.lang.Object context,
                                                  BasicTilesContainer container)

  Deprecated. Use `initializeContainer(TilesApplicationContext, BasicTilesContainer)`.

  Initializes a container.

  Parameters:
    `context` - The (application) context object to use.
    `container` - The container to be initialized.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### initializeContainer

    protected void initializeContainer(TilesApplicationContext context,
                                       BasicTilesContainer container)

  Deprecated.
  Initializes a container.

  Parameters:
    `context` - The Tiles application context object to use.
    `container` - The container to be initialized.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### storeContainerDependencies

    protected void storeContainerDependencies(java.lang.Object context,
                                              java.util.Map<java.lang.String,java.lang.String> initParameters,
                                              java.util.Map<java.lang.String,java.lang.String> configuration,
                                              BasicTilesContainer container)

  Deprecated. Use `storeContainerDependencies(TilesApplicationContext, Map, Map, BasicTilesContainer)` .

  Stores container dependencies, that is called before `TilesContainer.init(Map)`.

  Parameters:
    `context` - The (application) context object to use.
    `initParameters` - The initialization parameters.
    `configuration` - The merged configuration parameters (both defaults and context ones).
    `container` - The container to use.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### storeContainerDependencies

    protected void storeContainerDependencies(TilesApplicationContext context,
                                              java.util.Map<java.lang.String,java.lang.String> initParameters,
                                              java.util.Map<java.lang.String,java.lang.String> configuration,
                                              BasicTilesContainer container)

  Deprecated.
  Stores container dependencies, that is called before `TilesContainer.init(Map)`.

  Parameters:
    `context` - The (application) context object to use.
    `initParameters` - The initialization parameters.
    `configuration` - The merged configuration parameters (both defaults and context ones).
    `container` - The container to use.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during initialization.

### postCreationOperations

    protected void postCreationOperations(TilesRequestContextFactory contextFactory,
                                          TilesApplicationContext tilesContext,
                                          RendererFactory rendererFactory,
                                          AttributeEvaluator evaluator,
                                          java.util.Map<java.lang.String,java.lang.String> initParameters,
                                          java.util.Map<java.lang.String,java.lang.String> configuration,
                                          BasicTilesContainer container)

  Deprecated.
  After the creation of the elements, it is possible to do other operations that will be done after the creation and before the assignment to the container.

  Parameters:
    `contextFactory` - The Tiles context factory.
    `tilesContext` - The Tiles application context.
    `rendererFactory` - The renderer factory.
    `evaluator` - The attribute evaluator.
    `initParameters` - The initialization parameters.
    `configuration` - The merged configuration parameters (both defaults and context ones).
    `container` - The container to use.
  Since:
    2.1.1

### createFactory

    protected static java.lang.Object createFactory(java.util.Map<java.lang.String,java.lang.String> configuration,
                                                    java.lang.String initParameterName)

  Deprecated.
  Creates a factory instance.

  Parameters:
    `configuration` - The merged configuration parameters (both defaults and context ones).
    `initParameterName` - The initialization parameter name from which the class name is got.
  Returns:
    The created factory.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during creation.

### resolveFactoryName

    protected static java.lang.String resolveFactoryName(java.util.Map<java.lang.String,java.lang.String> configuration,
                                                         java.lang.String parameterName)

  Deprecated.
  Resolves a factory class name.

  Parameters:
    `configuration` - The merged configuration parameters (both defaults and context ones).
    `parameterName` - The name of the initialization parameter to use.
  Returns:
    The factory class name.
  Throws:
    `TilesContainerFactoryException` - If something goes wrong during resolution.

### getInitParameter

    @Deprecated
    protected static java.lang.String getInitParameter(java.lang.Object context,
                                                                  java.lang.String parameterName)

  Deprecated. Do not use.

  Returns the value of an initialization parameter.

  Parameters:
    `context` - The (application) context object to use.
    `parameterName` - The parameter name to retrieve.
  Returns:
    The parameter value.
  Throws:
    `TilesContainerFactoryException` - If the context has not been recognized.

### getInitParameterMap

    @Deprecated
    protected static java.util.Map<java.lang.String,java.lang.String> getInitParameterMap(java.lang.Object context)

  Deprecated. Do not use.

  Returns a map containing parameters name-value entries.

  Parameters:
    `context` - The (application) context object to use.
  Returns:
    The initialization parameters map.
  Throws:
    `TilesContainerFactoryException` - If the context object has not been recognized.

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.