Uses of Interface
freemarker.template.TemplateModel

Packages that use TemplateModel
freemarker.core This package contains FreeMarker's core parsing/rendering functionality; most casual users do not need to be aware of the classes in this package, and can restrict their attention to the freemarker.template package. 
freemarker.ext.beans Provides model implementations that allow access to arbitrary Java objects. 
freemarker.ext.dom   
freemarker.ext.jdom Provides adapter for JDOM including support for writing XML fragments, listing nodes, traversal, copying, and filtering, and a full XPath support. 
freemarker.ext.rhino Rhino (ECMAScript) support; Experimental: no backward compatibility guarantees; any feedback is highly welcome! 
freemarker.ext.util   
freemarker.template This package contains the core API's that most users will use. 
freemarker.template.utility Utility classes that may be used to customize aspects of FreeMarker. 
 

Uses of TemplateModel in freemarker.core
 

Classes in freemarker.core that implement TemplateModel
 class CollectionAndSequence
          Add sequence capabilities to an existing collection, or vice versa.
 class Environment.Namespace
           
 class Macro
          An element representing a macro declaration.
 class StringArraySequence
          Sequence variable implementation that wraps a String[] with relatively low resource utilization.
 

Methods in freemarker.core that return TemplateModel
 TemplateModel StringArraySequence.get(int index)
           
 TemplateModel CollectionAndSequence.get(int i)
           
 TemplateModel Expression.getAsTemplateModel(Environment env)
           
 TemplateModel Environment.getGlobalVariable(java.lang.String name)
          Returns the globally visible variable of the given name (or null).
 TemplateModel LocalContext.getLocalVariable(java.lang.String name)
           
 TemplateModel Environment.getLocalVariable(java.lang.String name)
          Returns the loop or macro local variable corresponding to this variable name.
 TemplateModel Environment.getVariable(java.lang.String name)
          Returns the variable that is visible in this context.
 

Methods in freemarker.core with parameters of type TemplateModel
 void Environment.setGlobalVariable(java.lang.String name, TemplateModel model)
          Sets a variable that is visible globally.
 void Environment.setLocalVariable(java.lang.String name, TemplateModel model)
          Sets a local variable (one effective only during a macro invocation).
 void Environment.setVariable(java.lang.String name, TemplateModel model)
          Sets a variable in the current namespace.
 

Uses of TemplateModel in freemarker.ext.beans
 

Classes in freemarker.ext.beans that implement TemplateModel
 class ArrayModel
          A class that will wrap an arbitrary array into TemplateCollectionModel and TemplateSequenceModel interfaces.
 class BeanModel
          A class that will wrap an arbitrary object into TemplateHashModel interface allowing calls to arbitrary property getters and invocation of accessible methods on the object from a template using the object.foo to access properties and object.bar(arg1, arg2) to invoke methods on it.
 class BooleanModel
          A class that will wrap instances of Boolean into a TemplateBooleanModel.
 class CollectionModel
          A special case of BeanModel that can wrap Java collections and that implements the TemplateCollectionModel in order to be usable in a <foreach> block.
 class DateModel
          Wraps arbitrary subclass of Date into a reflective model.
 class EnumerationModel
          A class that adds TemplateModelIterator functionality to the Enumeration interface implementers.
 class IteratorModel
          A class that adds TemplateModelIterator functionality to the Iterator interface implementers.
 class MapModel
          A special case of BeanModel that adds implementation for TemplateMethodModelEx on map objects that is a shortcut for the Map.get() method.
 class NumberModel
          Wraps arbitrary subclass of Number into a reflective model.
 class ResourceBundleModel
          A hash model that wraps a resource bundle.
 class SimpleMapModel
          Model used by BeansWrapper when simpleMapWrapper mode is enabled.
 class StringModel
          Subclass of BeanModel that exposes the return value of the Object.toString() method through the TemplateScalarModel interface.
 

Methods in freemarker.ext.beans that return TemplateModel
protected  TemplateModel BeansWrapper.create(java.lang.Object object, java.lang.Object factory)
           
 TemplateModel CollectionModel.get(int index)
          Retrieves the i-th object from the collection, wrapped as a TemplateModel.
 TemplateModel ArrayModel.get(int index)
           
 TemplateModel SimpleMapModel.get(java.lang.String key)
           
 TemplateModel BeanModel.get(java.lang.String key)
          Uses Beans introspection to locate a property or method with name matching the key name.
protected  TemplateModel BeansWrapper.getInstance(java.lang.Object object, ModelFactory factory)
           
 TemplateModel HashAdapter.getTemplateModel()
           
protected  TemplateModel ResourceBundleModel.invokeGenericGet(java.util.Map keyMap, java.lang.Class clazz, java.lang.String key)
          Overridden to invoke the getObject method of the resource bundle.
protected  TemplateModel MapModel.invokeGenericGet(java.util.Map keyMap, java.lang.Class clazz, java.lang.String key)
          Overridden to invoke the generic get method by casting to Map instead of through reflection - should yield better performance.
protected  TemplateModel BeanModel.invokeGenericGet(java.util.Map keyMap, java.lang.Class clazz, java.lang.String key)
           
 TemplateModel IteratorModel.next()
          Calls underlying Iterator.next() and wraps the result.
 TemplateModel EnumerationModel.next()
          Calls underlying Enumeration.nextElement() and wraps the result.
 TemplateModel BeansWrapper.wrap(java.lang.Object object)
          Wraps the object with a template model that is most specific for the object's class.
protected  TemplateModel BeanModel.wrap(java.lang.Object obj)
           
 

Methods in freemarker.ext.beans with parameters of type TemplateModel
 void BeansWrapper.setNullModel(TemplateModel nullModel)
          Sets the null model.
 java.lang.Object BeansWrapper.unwrap(TemplateModel model)
          Attempts to unwrap a model into underlying object.
protected  java.lang.Object BeanModel.unwrap(TemplateModel model)
           
 java.lang.Object BeansWrapper.unwrap(TemplateModel model, java.lang.Class hint)
           
 

Uses of TemplateModel in freemarker.ext.dom
 

Classes in freemarker.ext.dom that implement TemplateModel
 class NodeModel
          A base class for wrapping a W3C DOM Node as a FreeMarker template model.
 

Methods in freemarker.ext.dom that return TemplateModel
 TemplateModel NodeModel.exec(java.util.List args)
           
 TemplateModel XPathSupport.executeQuery(java.lang.Object context, java.lang.String xpathQuery)
           
 TemplateModel NodeModel.get(int i)
           
 TemplateModel NodeModel.get(java.lang.String key)
           
 

Uses of TemplateModel in freemarker.ext.jdom
 

Classes in freemarker.ext.jdom that implement TemplateModel
 class NodeListModel
          Deprecated. Use NodeModel instead.
 

Methods in freemarker.ext.jdom that return TemplateModel
 TemplateModel NodeListModel.get(int i)
          Deprecated. Retrieves the i-th element of the node list.
 TemplateModel NodeListModel.get(java.lang.String key)
          Deprecated. Provides node list traversal as well as special functions: filtering by name, filtering by node type, shallow-copying, and duplicate removal.
 

Uses of TemplateModel in freemarker.ext.rhino
 

Classes in freemarker.ext.rhino that implement TemplateModel
 class RhinoFunctionModel
          Experimental: no backward compatibility guarantees; any feedback is highly welcome!
 class RhinoScriptableModel
          Experimental: no backward compatibility guarantees; any feedback is highly welcome!
 

Methods in freemarker.ext.rhino that return TemplateModel
 TemplateModel RhinoScriptableModel.get(int index)
           
 TemplateModel RhinoScriptableModel.get(java.lang.String key)
           
 TemplateModel RhinoWrapper.wrap(java.lang.Object obj)
           
 

Uses of TemplateModel in freemarker.ext.util
 

Subinterfaces of TemplateModel in freemarker.ext.util
 interface WrapperTemplateModel
          Deprecated. use AdapterTemplateModel instead.
 

Methods in freemarker.ext.util that return TemplateModel
 TemplateModel ModelFactory.create(java.lang.Object object, ObjectWrapper wrapper)
          Create a wrapping model for the specified object that belongs to the specified wrapper.
 TemplateModel ModelCache.getInstance(java.lang.Object object, ModelFactory factory)
           
 

Uses of TemplateModel in freemarker.template
 

Subinterfaces of TemplateModel in freemarker.template
 interface AdapterTemplateModel
          Supplemental interface that can be implemented by classes that also implement any of the TemplateModel interfaces.
 interface TemplateBooleanModel
          Objects that will be interpreted as true/false in the appropriate context must implement this interface.
 interface TemplateCollectionModel
          This interface can be implemented by a class to make a variable "foreach-able", i.e.
 interface TemplateDateModel
          Date values in a template data model must implement this interface.
 interface TemplateHashModel
          Hashes in a data model must implement this interface.
 interface TemplateHashModelEx
          An extended hash interface with a couple of extra hooks.
 interface TemplateMethodModel
          Objects that act as methods in a template data model must implement this interface.
 interface TemplateMethodModelEx
          A subinterface of TemplateMethodModel that acts on models, rather than on strings.
 interface TemplateNodeModel
          Describes objects that are nodes in a tree.
 interface TemplateNumberModel
          Numeric values in a template data model must implement this interface.
 interface TemplateScalarModel
          String values in a template data model must implement this interface.
 interface TemplateSequenceModel
          List values in a template data model whose elements are accessed by the index operator should implement this interface.
 interface TemplateTransformModel
          Objects that implement this interface can be used in a <transform> block to perform arbitrary transformations on a part of the template processing output.
 

Classes in freemarker.template that implement TemplateModel
 class LocalizedString
          An abstract base class for scalars that vary by locale.
 class ResourceBundleLocalizedString
          A concrete implementation of LocalizedString that gets a localized string from a ResourceBundle
 class SimpleCollection
          A simple implementation of TemplateCollectionModel.
 class SimpleDate
          A simple implementation of the TemplateDateModel interface.
 class SimpleHash
          A simple implementation of the TemplateHashModelEx interface, using an underlying Map or SortedMap.
 class SimpleList
          Deprecated. Use SimpleSequence instead.
 class SimpleNumber
          A simple implementation of the TemplateNumberModel interface.
 class SimpleScalar
          A simple implementation of the TemplateScalarModel interface, using a String.
 class SimpleSequence
          A convenient implementation of a list.
 class TemplateModelListSequence
          Sequence that wraps a java.util.List of already wrapped objects directly, with minimal resource usage.
 

Fields in freemarker.template declared as TemplateModel
static TemplateModel TemplateScalarModel.EMPTY_STRING
          A constant value to use as the empty string.
static TemplateModel TemplateModel.NOTHING
          A general-purpose object to represent nothing.
 

Methods in freemarker.template that return TemplateModel
 TemplateModel TemplateSequenceModel.get(int index)
          Retrieves the i-th template model in this sequence.
 TemplateModel TemplateModelListSequence.get(int index)
           
 TemplateModel SimpleSequence.get(int i)
           
 TemplateModel TemplateHashModel.get(java.lang.String key)
          Gets a TemplateModel from the hash.
 TemplateModel SimpleHash.get(java.lang.String key)
           
 TemplateModel Configuration.getSharedVariable(java.lang.String name)
          Gets a shared variable.
 TemplateModel TemplateModelAdapter.getTemplateModel()
           
protected  TemplateModel SimpleObjectWrapper.handleUnknownType(java.lang.Object obj)
          Called if a type other than the simple ones we know about is passed in.
protected  TemplateModel DefaultObjectWrapper.handleUnknownType(java.lang.Object obj)
          Called if an unknown type is passed in.
 TemplateModel TemplateModelIterator.next()
          Returns the next model.
protected  TemplateModel WrappingTemplateModel.wrap(java.lang.Object obj)
          Wraps the passed object into a template model using this object's object wrapper.
 TemplateModel ObjectWrapper.wrap(java.lang.Object obj)
           
 TemplateModel DefaultObjectWrapper.wrap(java.lang.Object obj)
           
 TemplateModel DefaultObjectWrapper.wrapDomNode(java.lang.Object obj)
           
 

Methods in freemarker.template with parameters of type TemplateModel
 void Configuration.setSharedVariable(java.lang.String name, TemplateModel tm)
          Adds a shared variable to the configuration.
 

Uses of TemplateModel in freemarker.template.utility
 

Classes in freemarker.template.utility that implement TemplateModel
 class CaptureOutput
          Deprecated. Use block-assignments instead, as <assign x>...</assign>.
 class DOMNodeModel
          A convenient wrapper class for wrapping a Node in the W3C DOM API.
 class Execute
          Gives FreeMarker the the ability to execute external commands.
 class HtmlEscape
          Performs an HTML escape of a given template fragment.
 class JythonRuntime
          A crude first pass at an embeddable Jython interpreter
 class NormalizeNewlines
          Transformer that supports FreeMarker legacy behavior: all newlines appearing within the transformed area will be transformed into the platform's default newline.
 class ObjectConstructor
          An object that you can make available in a template to instantiate arbitrary beans-wrapped objects in a template.
 class StandardCompress
          A filter that compresses each sequence of consecutive whitespace to a single line break (if the sequence contains a line break) or a single space.
 class XmlEscape
          Performs an XML escaping of a given template fragment.
 

Methods in freemarker.template.utility that return TemplateModel
 TemplateModel DOMNodeModel.get(java.lang.String key)
           
 

Methods in freemarker.template.utility with parameters of type TemplateModel
static java.lang.Object DeepUnwrap.premissiveUnwrap(TemplateModel model)
          Same as DeepUnwrap.unwrap(TemplateModel), but it doesn't throw exception if it doesn't know how to unwrap the object, but returns it as is.
static java.lang.Object DeepUnwrap.unwrap(TemplateModel model)
          Unwraps TemplateModel-s recursively.