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.renderer.impl
Class BasicRendererFactory

    java.lang.Object
      org.apache.tiles.renderer.impl.BasicRendererFactory

All Implemented Interfaces:
  TilesApplicationContextAware, TilesContainerAware, TilesRequestContextFactoryAware, AttributeEvaluatorFactoryAware, RendererFactory

    public class BasicRendererFactory

extends java.lang.Object
implements RendererFactory, TilesContainerAware, TilesRequestContextFactoryAware, TilesApplicationContextAware, AttributeEvaluatorFactoryAware

Basic renderer factory implementation.

Since:
  2.1.0
Version:
  $Rev: 820373 $ $Date: 2009-09-30 20:26:58 +0200 (mer, 30 set 2009) $

Field Summary
`protected TilesApplicationContext` | `applicationContext` The Tiles application context.
`protected AttributeEvaluatorFactory` | `attributeEvaluatorFactory` The attribute evaluator.
`protected TilesContainer` | `container` The Tiles container.
`protected TilesRequestContextFactory` | `contextFactory` The Tiles context factory.
`static java.lang.String` | `DEFAULT_RENDERER_CLASS_NAME` Deprecated. Do not use, the default renderer class should be determined when building the container.
`static java.lang.String` | `DEFAULT_RENDERER_INIT_PARAM` The default renderer init parameter.
`protected static java.util.Map<java.lang.String,java.lang.String>` | `DEFAULT_TYPE_2_RENDERER` The default renderer name/renderer class map.
`protected AttributeRenderer` | `defaultRenderer` The default renderer.
`protected java.util.Map<java.lang.String,AttributeRenderer>` | `renderers` The renderer name/renderer map.
`static java.lang.String` | `TYPE_RENDERERS_INIT_PARAM` The type renderers init parameter name.

Constructor Summary
`BasicRendererFactory()` Constructor.

Method Summary
`AttributeRenderer` | `getRenderer(java.lang.String name)` Returns a renderer by its name.
`void` | `init(java.util.Map<java.lang.String,java.lang.String> parameters)` Initialize the renderer factory.
`protected void` | `initializeRenderer(AttributeRenderer renderer)` Initialize a renderer, by injecting dependencies.
`void` | `registerRenderer(java.lang.String name, AttributeRenderer renderer)` Registers a renderer.
`void` | `setApplicationContext(TilesApplicationContext applicationContext)` Sets the Tiles application context.
`void` | `setAttributeEvaluatorFactory(AttributeEvaluatorFactory attributeEvaluatorFactory)` Sets the attribute evaluator factory.
`void` | `setContainer(TilesContainer container)` Sets the Tiles container.
`void` | `setDefaultRenderer(AttributeRenderer renderer)` Sets the default renderer.
`void` | `setRequestContextFactory(TilesRequestContextFactory contextFactory)` Sets the Tiles request context factory.

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

Field Detail

### TYPE_RENDERERS_INIT_PARAM

    public static final java.lang.String TYPE_RENDERERS_INIT_PARAM

  The type renderers init parameter name.

  Since:
    2.1.0
  See Also:
    Constant Field Values

### DEFAULT_RENDERER_INIT_PARAM

    public static final java.lang.String DEFAULT_RENDERER_INIT_PARAM

  The default renderer init parameter.

  Since:
    2.1.0
  See Also:
    Constant Field Values

### DEFAULT_RENDERER_CLASS_NAME

    public static final java.lang.String DEFAULT_RENDERER_CLASS_NAME

  Deprecated. Do not use, the default renderer class should be determined when building the container.
  The default renderer class name.

  Since:
    2.1.0

### DEFAULT_TYPE_2_RENDERER

    protected static final java.util.Map<java.lang.String,java.lang.String> DEFAULT_TYPE_2_RENDERER

  The default renderer name/renderer class map.

  Since:
    2.1.0

### contextFactory

    protected TilesRequestContextFactory contextFactory

  The Tiles context factory.

  Since:
    2.1.1

### applicationContext

    protected TilesApplicationContext applicationContext

  The Tiles application context.

  Since:
    2.1.0

### container

    protected TilesContainer container

  The Tiles container.

  Since:
    2.1.0

### attributeEvaluatorFactory

    protected AttributeEvaluatorFactory attributeEvaluatorFactory

  The attribute evaluator.

  Since:
    2.2.0

### renderers

    protected java.util.Map<java.lang.String,AttributeRenderer> renderers

  The renderer name/renderer map.

  Since:
    2.1.0

### defaultRenderer

    protected AttributeRenderer defaultRenderer

  The default renderer.

  Since:
    2.1.0

Constructor Detail

### BasicRendererFactory

    public BasicRendererFactory()

  Constructor.

  Since:
    2.1.0

Method Detail

### init

    public void init(java.util.Map<java.lang.String,java.lang.String> parameters)

  Initialize the renderer factory.

  Specified by:
    `init` in interface `RendererFactory`
  Parameters:
    `parameters` - The parameters for the initialization.

### getRenderer

    public AttributeRenderer getRenderer(java.lang.String name)

  Returns a renderer by its name.

  Specified by:
    `getRenderer` in interface `RendererFactory`
  Parameters:
    `name` - The name of the renderer.
  Returns:
    The renderer.

### setDefaultRenderer

    public void setDefaultRenderer(AttributeRenderer renderer)

  Sets the default renderer.

  Parameters:
    `renderer` - The default renderer.
  Since:
    2.1.0

### registerRenderer

    public void registerRenderer(java.lang.String name,
                                 AttributeRenderer renderer)

  Registers a renderer.

  Parameters:
    `name` - The name of the renderer.
    `renderer` - The renderer to register.
  Since:
    2.1.0

### setContainer

    public void setContainer(TilesContainer container)

  Sets the Tiles container.

  Specified by:
    `setContainer` in interface `TilesContainerAware`
  Parameters:
    `container` - The Tiles container.

### setAttributeEvaluatorFactory

    public void setAttributeEvaluatorFactory(AttributeEvaluatorFactory attributeEvaluatorFactory)

  Sets the attribute evaluator factory.

  Specified by:
    `setAttributeEvaluatorFactory` in interface `AttributeEvaluatorFactoryAware`
  Parameters:
    `attributeEvaluatorFactory` - The attribute evaluator factory to use.

### setRequestContextFactory

    public void setRequestContextFactory(TilesRequestContextFactory contextFactory)

  Sets the Tiles request context factory.

  Specified by:
    `setRequestContextFactory` in interface `TilesRequestContextFactoryAware`
  Parameters:
    `contextFactory` - The Tiles context factory.

### setApplicationContext

    public void setApplicationContext(TilesApplicationContext applicationContext)

  Sets the Tiles application context.

  Specified by:
    `setApplicationContext` in interface `TilesApplicationContextAware`
  Parameters:
    `applicationContext` - The Tiles application context.

### initializeRenderer

    protected void initializeRenderer(AttributeRenderer renderer)

  Initialize a renderer, by injecting dependencies.

  Parameters:
    `renderer` - The renderer to initialize.
  Since:
    2.1.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.