fmpp.dataloaders
Class EvalDataLoader

java.lang.Object
  extended by fmpp.dataloaders.EvalDataLoader
All Implemented Interfaces:
DataLoader

public class EvalDataLoader
extends java.lang.Object
implements DataLoader

Evaluates a BeanShell expression (looks like as Java). The scrip has access to the Engine object by the engine variable.


Constructor Summary
EvalDataLoader()
           
 
Method Summary
 java.lang.Object load(Engine e, java.util.List args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvalDataLoader

public EvalDataLoader()
Method Detail

load

public java.lang.Object load(Engine e,
                             java.util.List args)
                      throws java.lang.Exception
Specified by:
load in interface DataLoader
args - Arguments that the caller specifies for this directive call. Not null. The implementation should check if it understands all arguments, and it should throw java.lang.IllegalArgumentException if it doesn't.
Returns:
The object that will be accessed in FreeMarker templates. The object can be of any type. FreeMarker will wrap the object so that it is visible as an FTL variable. However, if the object implements freemarker.template.TemplateModel, then it will not be wrapped, as it is already an FTL variable.
Throws:
java.lang.Exception