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

org.apache.tiles.evaluator
Class BasicAttributeEvaluatorFactory

Package class diagram package BasicAttributeEvaluatorFactory
java.lang.Object
  extended by org.apache.tiles.evaluator.BasicAttributeEvaluatorFactory
All Implemented Interfaces:
AttributeEvaluatorFactory

public class BasicAttributeEvaluatorFactory
extends Object
implements AttributeEvaluatorFactory

Basic implementation of AttributeEvaluatorFactory. It supports a default attribute evaluator, in case the language is not recognized.

Since:
2.2.0
Version:
$Rev: 788032 $ $Date: 2009-06-24 16:08:32 +0200 (mer, 24 giu 2009) $

Constructor Summary
BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)
          Constructor.
 
Method Summary
 AttributeEvaluator getAttributeEvaluator(Attribute attribute)
          Creates and attribute evaluator using an attribute.
 AttributeEvaluator getAttributeEvaluator(String language)
          Creates and attribute evaluator for the given expression language.
 void registerAttributeEvaluator(String language, AttributeEvaluator evaluator)
          Registers a known expression language with its attribute evaluator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAttributeEvaluatorFactory

public BasicAttributeEvaluatorFactory(AttributeEvaluator defaultEvaluator)
Constructor.

Parameters:
defaultEvaluator - The default evaluator to return if it is not found in the map of known languages.
Since:
2.2.0
Method Detail

registerAttributeEvaluator

public void registerAttributeEvaluator(String language,
                                       AttributeEvaluator evaluator)
Registers a known expression language with its attribute evaluator.

Parameters:
language - The name of the expression language.
evaluator - The associated attribute evaluator.
Since:
2.2.0

getAttributeEvaluator

public AttributeEvaluator getAttributeEvaluator(String language)
Creates and attribute evaluator for the given expression language.

Specified by:
getAttributeEvaluator in interface AttributeEvaluatorFactory
Parameters:
language - The name of the expression language.
Returns:
The attribute evaluator. It must not be null.

getAttributeEvaluator

public AttributeEvaluator getAttributeEvaluator(Attribute attribute)
Creates and attribute evaluator using an attribute.

Specified by:
getAttributeEvaluator in interface AttributeEvaluatorFactory
Parameters:
attribute - The attribute used to obtain the evaluator.
Returns:
The attribute evaluator. It must not be null.


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