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 BasicTilesContainerFactory

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

Direct Known Subclasses:
  CompleteAutoloadTilesContainerFactory

    public class BasicTilesContainerFactory

extends AbstractTilesContainerFactory

Factory that builds a standard Tiles container using only Java code.

Since:
  2.1.0
Version:
  $Rev: 822631 $ $Date: 2009-10-07 11:21:12 +0200 (mer, 07 ott 2009) $

Field Summary
`protected static java.lang.String` | `DEFINITION_RENDERER_NAME` The definition renderer name.
`protected static java.lang.String` | `STRING_RENDERER_NAME` The string renderer name.
`protected static java.lang.String` | `TEMPLATE_RENDERER_NAME` The template renderer name.

Fields inherited from class org.apache.tiles.factory.AbstractTilesContainerFactory
`CONTAINER_FACTORY_INIT_PARAM`

Constructor Summary
`BasicTilesContainerFactory()`

Method Summary
`protected AttributeEvaluatorFactory` | `createAttributeEvaluatorFactory(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, LocaleResolver resolver)` Creates the attribute evaluator factory to use.
`TilesContainer` | `createContainer(TilesApplicationContext applicationContext)` Creates a Tiles container.
`protected AttributeRenderer` | `createDefaultAttributeRenderer(BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Creates the default attribute renderer.
`protected AttributeRenderer` | `createDefinitionAttributeRenderer(BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Creates a `DefinitionAttributeRenderer`.
`protected DefinitionsFactory` | `createDefinitionsFactory(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, LocaleResolver resolver)` Creates the definitions factory.
`protected DefinitionsReader` | `createDefinitionsReader(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory)` Creates the definitions reader.
`protected DefinitionDAO<java.util.Locale>` | `createLocaleDefinitionDao(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, LocaleResolver resolver)` Creates a Locale-based definition DAO.
`protected LocaleResolver` | `createLocaleResolver(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory)` Creates the locale resolver.
`protected
`<T> PatternDefinitionResolver<T>`
` | `createPatternDefinitionResolver(java.lang.Class<T> customizationKeyClass)` Creates a new pattern definition resolver.
`protected PreparerFactory` | `createPreparerFactory(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory)` Creates the preparer factory to use.
`protected RendererFactory` | `createRendererFactory(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Creates a renderer factory.
`protected TilesRequestContextFactory` | `createRequestContextFactory(TilesApplicationContext context)` Create a Tiles request context factory.
`protected AttributeRenderer` | `createStringAttributeRenderer(BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Creates a `StringAttributeRenderer`.
`protected AttributeRenderer` | `createTemplateAttributeRenderer(BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Creates a `TemplateAttributeRenderer`.
`protected java.util.List<java.net.URL>` | `getSourceURLs(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory)` Returns a list containing the URLs to be parsed.
`protected java.util.List<TilesRequestContextFactory>` | `getTilesRequestContextFactoriesToBeChained(ChainedTilesRequestContextFactory parent)` Returns the list of `TilesRequestContextFactory` instances to be chained together.
`protected BasicTilesContainer` | `instantiateContainer(TilesApplicationContext context)` Instantiate the container, without initialization.
`protected UnresolvingLocaleDefinitionsFactory` | `instantiateDefinitionsFactory(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, LocaleResolver resolver)` Instantiate a new definitions factory based on Locale.
`protected BaseLocaleUrlDefinitionDAO` | `instantiateLocaleDefinitionDao(TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, LocaleResolver resolver)` Instantiate (and does not initialize) a Locale-based definition DAO.
`protected void` | `registerAttributeRenderers(BasicRendererFactory rendererFactory, TilesApplicationContext applicationContext, TilesRequestContextFactory contextFactory, TilesContainer container, AttributeEvaluatorFactory attributeEvaluatorFactory)` Registers attribute renderers in a `BasicRendererFactory`.
`protected void` | `registerChainedRequestContextFactories(ChainedTilesRequestContextFactory contextFactory)` Register elements of a chained request context factory.
`protected void` | `registerRequestContextFactory(java.lang.String className, java.util.List<TilesRequestContextFactory> factories, TilesRequestContextFactory parent)` Registers a `TilesRequestContextFactory` specifying its classname.

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

### STRING_RENDERER_NAME

    protected static final java.lang.String STRING_RENDERER_NAME

  The string renderer name.

  See Also:
    Constant Field Values

### TEMPLATE_RENDERER_NAME

    protected static final java.lang.String TEMPLATE_RENDERER_NAME

  The template renderer name.

  See Also:
    Constant Field Values

### DEFINITION_RENDERER_NAME

    protected static final java.lang.String DEFINITION_RENDERER_NAME

  The definition renderer name.

  See Also:
    Constant Field Values

Constructor Detail

### BasicTilesContainerFactory

    public BasicTilesContainerFactory()

Method Detail

### createContainer

    public TilesContainer createContainer(TilesApplicationContext applicationContext)

  Creates a Tiles container.

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

### instantiateContainer

    protected BasicTilesContainer instantiateContainer(TilesApplicationContext context)

  Instantiate the container, without initialization.

  Parameters:
    `context` - The Tiles application context object.
  Returns:
    The instantiated container.
  Since:
    2.1.1

### createRequestContextFactory

    protected TilesRequestContextFactory createRequestContextFactory(TilesApplicationContext context)

  Create a Tiles request context factory. By default it creates a `ChainedTilesRequestContextFactory`.

  Parameters:
    `context` - The Tiles application context.
  Returns:
    The request context factory.
  Since:
    2.1.1

### registerChainedRequestContextFactories

    protected void registerChainedRequestContextFactories(ChainedTilesRequestContextFactory contextFactory)

  Register elements of a chained request context factory.

  Parameters:
    `contextFactory` - The request context factory to use.
  Since:
    2.1.1

### getTilesRequestContextFactoriesToBeChained

    protected java.util.List<TilesRequestContextFactory> getTilesRequestContextFactoriesToBeChained(ChainedTilesRequestContextFactory parent)

  Returns the list of `TilesRequestContextFactory` instances to be chained together.

  Parameters:
    `parent` - The parent factory.
  Returns:
    The list of factories.
  Since:
    2.2.0

### registerRequestContextFactory

    protected void registerRequestContextFactory(java.lang.String className,
                                                 java.util.List<TilesRequestContextFactory> factories,
                                                 TilesRequestContextFactory parent)

  Registers a `TilesRequestContextFactory` specifying its classname.

  Parameters:
    `className` - The name of the class to instantiate.
    `factories` - The list of factories to add to.
    `parent` - The parent `TilesRequestContextFactory`. If null it won't be considered.
  Since:
    2.1.1

### createDefinitionsFactory

    protected DefinitionsFactory createDefinitionsFactory(TilesApplicationContext applicationContext,
                                                          TilesRequestContextFactory contextFactory,
                                                          LocaleResolver resolver)

  Creates the definitions factory. By default it creates a `UnresolvingLocaleDefinitionsFactory` with default dependencies.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `resolver` - The locale resolver.
  Returns:
    The definitions factory.
  Since:
    2.1.1

### instantiateDefinitionsFactory

    protected UnresolvingLocaleDefinitionsFactory instantiateDefinitionsFactory(TilesApplicationContext applicationContext,
                                                                                TilesRequestContextFactory contextFactory,
                                                                                LocaleResolver resolver)

  Instantiate a new definitions factory based on Locale.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `resolver` - The locale resolver.
  Returns:
    The definitions factory.
  Since:
    2.2.1

### instantiateLocaleDefinitionDao

    protected BaseLocaleUrlDefinitionDAO instantiateLocaleDefinitionDao(TilesApplicationContext applicationContext,
                                                                        TilesRequestContextFactory contextFactory,
                                                                        LocaleResolver resolver)

  Instantiate (and does not initialize) a Locale-based definition DAO.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `resolver` - The locale resolver.
  Returns:
    The definition DAO.
  Since:
    2.1.1

### createLocaleDefinitionDao

    protected DefinitionDAO<java.util.Locale> createLocaleDefinitionDao(TilesApplicationContext applicationContext,
                                                                        TilesRequestContextFactory contextFactory,
                                                                        LocaleResolver resolver)

  Creates a Locale-based definition DAO.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `resolver` - The locale resolver.
  Returns:
    The definition DAO.
  Since:
    2.1.1

### createLocaleResolver

    protected LocaleResolver createLocaleResolver(TilesApplicationContext applicationContext,
                                                  TilesRequestContextFactory contextFactory)

  Creates the locale resolver. By default it creates a `DefaultLocaleResolver`.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
  Returns:
    The locale resolver.
  Since:
    2.1.1

### createDefinitionsReader

    protected DefinitionsReader createDefinitionsReader(TilesApplicationContext applicationContext,
                                                        TilesRequestContextFactory contextFactory)

  Creates the definitions reader. By default it creates a `DigesterDefinitionsReader`.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
  Returns:
    The definitions reader.
  Since:
    2.1.1

### getSourceURLs

    protected java.util.List<java.net.URL> getSourceURLs(TilesApplicationContext applicationContext,
                                                         TilesRequestContextFactory contextFactory)

  Returns a list containing the URLs to be parsed. By default, it returns a list containing the URL point to "/WEB-INF/tiles.xml".

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
  Returns:
    The source URLs.
  Since:
    2.1.1

### createAttributeEvaluatorFactory

    protected AttributeEvaluatorFactory createAttributeEvaluatorFactory(TilesApplicationContext applicationContext,
                                                                        TilesRequestContextFactory contextFactory,
                                                                        LocaleResolver resolver)

  Creates the attribute evaluator factory to use. By default it returns a `BasicAttributeEvaluatorFactory` containing the `DirectAttributeEvaluator` as the default evaluator.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `resolver` - The locale resolver.
  Returns:
    The evaluator factory.
  Since:
    2.2.0

### createPreparerFactory

    protected PreparerFactory createPreparerFactory(TilesApplicationContext applicationContext,
                                                    TilesRequestContextFactory contextFactory)

  Creates the preparer factory to use. By default it returns a `BasicPreparerFactory`.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
  Returns:
    The preparer factory.
  Since:
    2.1.1

### createRendererFactory

    protected RendererFactory createRendererFactory(TilesApplicationContext applicationContext,
                                                    TilesRequestContextFactory contextFactory,
                                                    TilesContainer container,
                                                    AttributeEvaluatorFactory attributeEvaluatorFactory)

  Creates a renderer factory. By default it returns a `BasicRendererFactory`, composed of an `UntypedAttributeRenderer` as default, and `StringAttributeRenderer`, `TemplateAttributeRenderer` and `DefinitionAttributeRenderer`.

  Parameters:
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Returns:
    The renderer factory.
  Since:
    2.2.0

### createDefaultAttributeRenderer

    protected AttributeRenderer createDefaultAttributeRenderer(BasicRendererFactory rendererFactory,
                                                               TilesApplicationContext applicationContext,
                                                               TilesRequestContextFactory contextFactory,
                                                               TilesContainer container,
                                                               AttributeEvaluatorFactory attributeEvaluatorFactory)

  Creates the default attribute renderer. By default it is an `ChainedDelegateAttributeRenderer`.

  Parameters:
    `rendererFactory` - The renderer factory to configure.
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Returns:
    The default attribute renderer.
  Since:
    2.2.1

### createPatternDefinitionResolver

    protected <T> PatternDefinitionResolver<T> createPatternDefinitionResolver(java.lang.Class<T> customizationKeyClass)

  Creates a new pattern definition resolver. By default, it instantiate a `BasicPatternDefinitionResolver` with `WildcardDefinitionPatternMatcherFactory` to manage wildcard substitution.

  Type Parameters:
    `T` - The type of the customization key.
  Parameters:
    `customizationKeyClass` - The customization key class.
  Returns:
    The pattern definition resolver.
  Since:
    2.2.0

### registerAttributeRenderers

    protected void registerAttributeRenderers(BasicRendererFactory rendererFactory,
                                              TilesApplicationContext applicationContext,
                                              TilesRequestContextFactory contextFactory,
                                              TilesContainer container,
                                              AttributeEvaluatorFactory attributeEvaluatorFactory)

  Registers attribute renderers in a `BasicRendererFactory`. By default, it registers a `StringAttributeRenderer`, a `TemplateAttributeRenderer` and a `DefinitionAttributeRenderer`.

  Parameters:
    `rendererFactory` - The renderer factory to configure.
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Since:
    2.2.0

### createStringAttributeRenderer

    protected AttributeRenderer createStringAttributeRenderer(BasicRendererFactory rendererFactory,
                                                              TilesApplicationContext applicationContext,
                                                              TilesRequestContextFactory contextFactory,
                                                              TilesContainer container,
                                                              AttributeEvaluatorFactory attributeEvaluatorFactory)

  Creates a `StringAttributeRenderer`.

  Parameters:
    `rendererFactory` - The renderer factory to configure.
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Returns:
    The renderer.
  Since:
    2.2.1

### createTemplateAttributeRenderer

    protected AttributeRenderer createTemplateAttributeRenderer(BasicRendererFactory rendererFactory,
                                                                TilesApplicationContext applicationContext,
                                                                TilesRequestContextFactory contextFactory,
                                                                TilesContainer container,
                                                                AttributeEvaluatorFactory attributeEvaluatorFactory)

  Creates a `TemplateAttributeRenderer`.

  Parameters:
    `rendererFactory` - The renderer factory to configure.
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Returns:
    The renderer.
  Since:
    2.2.1

### createDefinitionAttributeRenderer

    protected AttributeRenderer createDefinitionAttributeRenderer(BasicRendererFactory rendererFactory,
                                                                  TilesApplicationContext applicationContext,
                                                                  TilesRequestContextFactory contextFactory,
                                                                  TilesContainer container,
                                                                  AttributeEvaluatorFactory attributeEvaluatorFactory)

  Creates a `DefinitionAttributeRenderer`.

  Parameters:
    `rendererFactory` - The renderer factory to configure.
    `applicationContext` - The Tiles application context.
    `contextFactory` - The Tiles context factory.
    `container` - The container.
    `attributeEvaluatorFactory` - The attribute evaluator factory.
  Returns:
    The renderer.
  Since:
    2.2.1

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.