org.outerj.xreporter.expression
Class ExpressionManagerImpl

java.lang.Object
  extended byorg.outerj.xreporter.expression.ExpressionManagerImpl
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, ExpressionManager, org.apache.avalon.framework.thread.ThreadSafe

public class ExpressionManagerImpl
extends java.lang.Object
implements ExpressionManager, org.apache.avalon.framework.thread.ThreadSafe, org.apache.avalon.framework.configuration.Configurable

Implementation of ExpressionManager. This implementation supports registering user-written functions, which can then be accessed from everywhere in XReporter where expressions are used. See the config.xml file for examples of how to register new functions.

Some XReporter specific functions are also made available, see the package org.outerj.xreporter.expression.function


Field Summary
protected  DefaultFunctionFactory functionFactory
           
protected  java.lang.ClassLoader userFunctionsClassLoader
           
 
Fields inherited from interface org.outerj.xreporter.expression.ExpressionManager
ROLE
 
Constructor Summary
ExpressionManagerImpl()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 FunctionFactory getFunctionFactory()
           
 Expression parse(java.lang.String expressionString)
           
 Expression parse(java.lang.String expressionString, FunctionFactory functionFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

functionFactory

protected DefaultFunctionFactory functionFactory

userFunctionsClassLoader

protected java.lang.ClassLoader userFunctionsClassLoader
Constructor Detail

ExpressionManagerImpl

public ExpressionManagerImpl()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

parse

public Expression parse(java.lang.String expressionString)
                 throws org.outerj.expression.ParseException,
                        ExpressionException
Specified by:
parse in interface ExpressionManager
Throws:
org.outerj.expression.ParseException
ExpressionException

parse

public Expression parse(java.lang.String expressionString,
                        FunctionFactory functionFactory)
                 throws org.outerj.expression.ParseException,
                        ExpressionException
Specified by:
parse in interface ExpressionManager
Throws:
org.outerj.expression.ParseException
ExpressionException

getFunctionFactory

public FunctionFactory getFunctionFactory()
Specified by:
getFunctionFactory in interface ExpressionManager