Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

freemarker.ext.ant.* (4)freemarker.ext.beans.* (22)freemarker.ext.dom.* (13)
freemarker.ext.jdom.* (1)freemarker.ext.jsp.* (9)freemarker.ext.jython.* (5)
freemarker.ext.rhino.* (3)freemarker.ext.servlet.* (6)freemarker.ext.util.* (4)
freemarker.ext.xml.* (8)

Package Samples:

freemarker.ext.ant
freemarker.ext.beans
freemarker.ext.dom
freemarker.ext.jdom
freemarker.ext.jsp
freemarker.ext.jython
freemarker.ext.rhino
freemarker.ext.servlet
freemarker.ext.util
freemarker.ext.xml

Classes:

FreemarkerXmlTask: This is an Ant task for transforming XML documents using FreeMarker templates. It uses the adapter class freemarker.ext.xml.NodeListModel . It will read a set of XML documents, and pass them to the template for processing, building the corresponding output files in the destination directory. It makes the following variables available to the template in the data model: document : Deprecated! The DOM tree of the currently processed XML file wrapped with the legacy freemarker.ext.xml.NodeListModel . For new projects you should use the .node instead, which initially contains the DOM Document wrapped ...
FreemarkerServlet: This is a general-purpose FreeMarker view servlet. The main features are: It makes all request, request parameters, session, and servlet context attributes available to templates through Request , RequestParameters , Session , and Application variables. The scope variables are also available via automatic scope discovery. That is, writing Application.attrName , Session.attrName , Request.attrName is not mandatory; it's enough to write attrName , and if no such variable was created in the template, it will search the variable in Request , and then in Session , and finally in Application . It creates ...
NodeListModel: Provides a template for wrapping JDOM objects. It is capable of storing not only a single JDOM node, but a list of JDOM nodes at once (hence the name). Each node is an instance of any of the core JDOM node classes (except namespaces, which are not supported at the moment), or String for representing text. See individual method documentation for exact details on how the class works. In short: getAsString() 55 will render all contained nodes as XML fragment, exec(List) 55 provides full XPath functionality implemented on top of the Jaxen library, get(String) 55 provides node traversal, copying and ...
NodeListModel: A data model adapter for three widespread XML document object model representations: W3C DOM, dom4j, and JDOM. The adapter automatically recognizes the used XML object model and provides a unified interface for it toward the template. The model provides access to all XML InfoSet features of the XML document and includes XPath support if it has access to the XPath- evaluator library Jaxen. The model's philosophy (which closely follows that of XML InfoSet and XPath) is as follows: it always wraps a list of XML nodes (the "nodelist"). The list can be empty, can have a single element, or can have multiple ...
MapModel: A special case of BeanModel that adds implementation for freemarker.template.TemplateMethodModelEx on map objects that is a shortcut for the Map.get() method. Note that if the passed argument itself is a reflection-wrapper model, then the map lookup will be performed using the wrapped object as the key. Note that you can call get() using the map.key syntax inherited from BeanModel as well, however in that case the key is always a string. The class itself does not implement the freemarker.template.TemplateCollectionModel . You can, however use map.entrySet() , map.keySet() , or map.values() to obtain ...
IteratorModel: A class that adds freemarker.template.TemplateModelIterator functionality to the java.util.Iterator interface implementers. It differs from the freemarker.template.SimpleCollection in that it inherits from BeanModel , and therefore you can call methods on it directly, even to the effect of calling iterator.remove() in the template. Using the model as a collection model is NOT thread-safe, as iterators are inherently not thread-safe. Further, you can iterate over it only once. Attempts to call the iterator() 55 method after it was already driven to the end once will throw an exception.
JythonHashModel: Model for Jython dictionaries ( org.python.core.PyDictionary and org.python.core.PyStringMap ). Note that the basic JythonModel already provides access to the PyObject#__finditem__(String) method. This class only adds freemarker.template.TemplateHashModelEx functionality in a somewhat skewed way. One could say it even violates TemplateHashModelEx semantics, as both the returned keys and values are only those from the item mapping, while the get() method works for attributes as well. However, in practice when you ask for dict?keys inside a template, you'll really want to retrieve only items, not ...
ResourceBundleModel: A hash model that wraps a resource bundle. Makes it convenient to store localized content in the data model. It also acts as a method model that will take a resource key and arbitrary number of arguments and will apply java.text.MessageFormat with arguments on the string represented by the key. Typical usages: bundle.resourceKey will retrieve the object from resource bundle with key resourceKey bundle("patternKey", arg1, arg2, arg3) will retrieve the string from resource bundle with key patternKey , and will use it as a pattern for MessageFormat with arguments arg1, arg2 and arg3
IdentityHashMap: A variant of java.util.HashMap that uses System.identityHashCode(Object) > System.identityHashCode(Object) 55 for hashing, and reference comparison instead of Object.equals(Object) > Object.equals(Object) 55 . Note that this applies only to keys, and not to values, i.e. containsValue(Object) 55 still uses Object.equals(Object) > Object.equals(Object) 55 .
StaticModel: Wraps the static fields and methods of a class in a freemarker.template.TemplateHashModel . Fields are wrapped using BeansWrapper.wrap(Object) 55 , and methods are wrapped into an appropriate freemarker.template.TemplateMethodModelEx instance. Unfortunately, there is currently no support for bean property-style calls of static methods, similar to that in BeanModel .
EnumerationModel: A class that adds freemarker.template.TemplateModelIterator functionality to the java.util.Enumeration interface implementers. Using the model as a collection model is NOT thread-safe, as enumerations are inherently not thread-safe. Further, you can iterate over it only once. Attempts to call the iterator() 55 method after it was already driven to the end once will throw an exception.
AllHttpScopesHashModel: An extension of SimpleHash that looks up keys in the hash, then in the request, session, and servlet context scopes. Makes "Application", "Session" and "Request" keys largely obsolete, however we keep them for backward compatibility (also, "Request" is required for proper operation of JSP taglibs). It is on purpose that we didn't override keys and values methods. That way, only those variables assigned into the hash directly by a subclass of FreemarkerServlet that overrides preTemplateProcess ) are discovered as "page" variables by the FM JSP PageContext implementation.
BeanModel: A class that will wrap an arbitrary object into freemarker.template.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. You can also use the object.foo[index] syntax to access indexed properties. It uses Beans java.beans.Introspector to dynamically discover the properties and methods.
TaglibFactory: A hash model associated with a servlet context that can load JSP tag libraries associated with that servlet context. An instance of this class is made available in the root data model of templates executed by freemarker.ext.servlet.FreemarkerServlet under key JspTaglibs . It can be added to custom servlets as well to enable JSP taglib integration in them as well.
StaticModels: Utility class for instantiating StaticModel instances from templates. If your template's data model contains an instance of StaticModels (named, say StaticModels ), then you can instantiate an arbitrary StaticModel using get syntax (i.e. StaticModels["java.lang.System"].currentTimeMillis() ).
StringModel: Subclass of BeanModel that exposes the return value of the Object.toString() > Object.toString() 55 method through the freemarker.template.TemplateScalarModel interface.
ArrayModel: A class that will wrap an arbitrary array into freemarker.template.TemplateCollectionModel and freemarker.template.TemplateSequenceModel interfaces. It supports element retrieval through the array[index] syntax and can be iterated as a list.
SimpleMapModel: Model used by BeansWrapper when simpleMapWrapper mode is enabled. Provides a simple hash model interface to the underlying map (does not copy like freemarker.template.SimpleHash ), and a method interface to non-string keys.
CollectionModel: A special case of BeanModel that can wrap Java collections and that implements the freemarker.template.TemplateCollectionModel in order to be usable in a <foreach> block.
JythonAntTask: Used internally, public for technical reasons only. This is an Ant sub-task of the FreemarkerXmlTask task. Warning! It must not be statically linked with Jython classes , so users can use the XML ant task even if Jython is not installed.
SimpleMethodModel: A class that will wrap a reflected method call into a freemarker.template.TemplateMethodModel interface. It is used by BeanModel to wrap reflected method calls for non-overloaded methods.
OverloadedMethodModel: A class that will wrap a reflected method call into a freemarker.template.TemplateMethodModel interface. It is used by BeanModel to wrap reflected method calls for overloaded methods.
NumberModel: Wraps arbitrary subclass of java.lang.Number into a reflective model. Beside acting as a freemarker.template.TemplateNumberModel , you can call all Java methods on these objects as well.
DateModel: Wraps arbitrary subclass of java.util.Date into a reflective model. Beside acting as a freemarker.template.TemplateDateModel , you can call all Java methods on these objects as well.
BooleanModel: A class that will wrap instances of java.lang.Boolean into a freemarker.template.TemplateBooleanModel .

Home | Contact Us | Privacy Policy | Terms of Service