org.jopendocument.dom.template.engine
Class OGNLDataModel

java.lang.Object
  extended by org.jopendocument.dom.template.engine.DataModel
      extended by org.jopendocument.dom.template.engine.OGNLDataModel

public class OGNLDataModel
extends DataModel

Contains data as regular Java objects.


Constructor Summary
OGNLDataModel(Object root)
           
OGNLDataModel(OGNLDataModel dm)
           
 
Method Summary
 Object _eval(String expression)
           
 DataModel copy()
          Copy this engine and especially its bindings.
 void put(String name, Object value)
           
 void putAll(Map<? extends String,?> toMerge)
          Copies all of the mappings from the specified map to this.
 
Methods inherited from class org.jopendocument.dom.template.engine.DataModel
eval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OGNLDataModel

public OGNLDataModel(Object root)
Parameters:
root - the top-level Java bean or Map

OGNLDataModel

public OGNLDataModel(OGNLDataModel dm)
Method Detail

copy

public DataModel copy()
Description copied from class: DataModel
Copy this engine and especially its bindings.

Specified by:
copy in class DataModel
Returns:
an independant copy of this.

put

public void put(String name,
                Object value)
Specified by:
put in class DataModel

putAll

public void putAll(Map<? extends String,?> toMerge)
Description copied from class: DataModel
Copies all of the mappings from the specified map to this. This implementation simply calls put(k, v) once for each entry in the specified map.

Overrides:
putAll in class DataModel
Parameters:
toMerge - mappings to be stored.

_eval

public Object _eval(String expression)
             throws ognl.OgnlException
Specified by:
_eval in class DataModel
Throws:
ognl.OgnlException


Copyright © 2010 jOpenDocument All Rights Reserved.