This project has retired. For details please refer to its Attic page.
BasicRendererFactory (Tiles 2 2.1.4 API)

org.apache.tiles.renderer.impl
Class BasicRendererFactory

Package class diagram package BasicRendererFactory
java.lang.Object
  extended by org.apache.tiles.renderer.impl.BasicRendererFactory
All Implemented Interfaces:
TilesApplicationContextAware, TilesContainerAware, TilesRequestContextFactoryAware, AttributeEvaluatorAware, RendererFactory

public class BasicRendererFactory
extends Object
implements RendererFactory, TilesContainerAware, TilesRequestContextFactoryAware, TilesApplicationContextAware, AttributeEvaluatorAware

Basic renderer factory implementation.

Since:
2.1.0
Version:
$Rev: 711572 $ $Date: 2008-11-05 15:28:29 +0100 (mer, 05 nov 2008) $

Field Summary
protected  TilesApplicationContext applicationContext
          The Tiles application context.
protected  TilesContainer container
          The Tiles container.
protected  TilesRequestContextFactory contextFactory
          The Tiles context factory.
static String DEFAULT_RENDERER_CLASS_NAME
          The default renderer class name.
static String DEFAULT_RENDERER_INIT_PARAM
          The default renderer init parameter.
protected static Map<String,String> DEFAULT_TYPE_2_RENDERER
          The default renderer name/renderer class map.
protected  AttributeRenderer defaultRenderer
          The default renderer.
protected  AttributeEvaluator evaluator
          The attribute evaluator.
protected  Map<String,AttributeRenderer> renderers
          The renderer name/renderer map.
static String TYPE_RENDERERS_INIT_PARAM
          The type renderers init parameter name.
 
Constructor Summary
BasicRendererFactory()
          Constructor.
 
Method Summary
 AttributeRenderer getRenderer(String name)
          Returns a renderer by its name.
 void init(Map<String,String> parameters)
          Initialize the renderer factory.
protected  void initializeRenderer(AttributeRenderer renderer)
          Initialize a renderer, by injecting dependencies.
 void registerRenderer(String name, AttributeRenderer renderer)
          Registers a renderer.
 void setApplicationContext(TilesApplicationContext applicationContext)
          Sets the Tiles application context.
 void setContainer(TilesContainer container)
          Sets the Tiles container.
 void setDefaultRenderer(AttributeRenderer renderer)
          Sets the default renderer.
 void setEvaluator(AttributeEvaluator evaluator)
          Sets the evaluator.
 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 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 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 String DEFAULT_RENDERER_CLASS_NAME
The default renderer class name.

Since:
2.1.0

DEFAULT_TYPE_2_RENDERER

protected static final Map<String,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

evaluator

protected AttributeEvaluator evaluator
The attribute evaluator.

Since:
2.1.0

renderers

protected Map<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(Map<String,String> parameters)
Initialize the renderer factory.

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

getRenderer

public AttributeRenderer getRenderer(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(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.

setEvaluator

public void setEvaluator(AttributeEvaluator evaluator)
Sets the evaluator.

Specified by:
setEvaluator in interface AttributeEvaluatorAware
Parameters:
evaluator - The evaluator to set.

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


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.