Class BasicAttributeEvaluatorFactory

java.lang.Object
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-25 00:08:32 +1000 (Thu, 25 Jun 2009) $
  • Constructor Details

    • 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 Details

    • 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.