Class DocumentTemplate
java.lang.Object
org.nuxeo.ecm.platform.rendering.fm.adapters.DocumentTemplate
- All Implemented Interfaces:
freemarker.template.AdapterTemplateModel
,freemarker.template.TemplateHashModel
,freemarker.template.TemplateHashModelEx
,freemarker.template.TemplateModel
public class DocumentTemplate
extends Object
implements freemarker.template.TemplateHashModelEx, freemarker.template.AdapterTemplateModel
TODO document template should not be aware of rendering context ?
- Author:
- Bogdan Stefanescu
-
Field Summary
Modifier and TypeFieldDescriptionprotected final DocumentModel
protected final freemarker.template.ObjectWrapper
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
ConstructorDescriptionDocumentTemplate
(freemarker.template.ObjectWrapper wrapper, DocumentModel doc) -
Method Summary
-
Field Details
-
wrapper
protected final freemarker.template.ObjectWrapper wrapper -
doc
-
-
Constructor Details
-
DocumentTemplate
-
-
Method Details
-
getAdaptedObject
- Specified by:
getAdaptedObject
in interfacefreemarker.template.AdapterTemplateModel
-
getDocument
-
get
public freemarker.template.TemplateModel get(String key) throws freemarker.template.TemplateModelException - Specified by:
get
in interfacefreemarker.template.TemplateHashModel
- Throws:
freemarker.template.TemplateModelException
-
getSession
-
isEmpty
public boolean isEmpty() throws freemarker.template.TemplateModelExceptionA doc model is never empty.- Specified by:
isEmpty
in interfacefreemarker.template.TemplateHashModel
- Throws:
freemarker.template.TemplateModelException
-
getRawKeys
-
keys
public freemarker.template.TemplateCollectionModel keys() throws freemarker.template.TemplateModelException- Specified by:
keys
in interfacefreemarker.template.TemplateHashModelEx
- Throws:
freemarker.template.TemplateModelException
-
getRawValues
- Throws:
freemarker.template.TemplateModelException
-
values
public freemarker.template.TemplateCollectionModel values() throws freemarker.template.TemplateModelException- Specified by:
values
in interfacefreemarker.template.TemplateHashModelEx
- Throws:
freemarker.template.TemplateModelException
-
size
public int size() throws freemarker.template.TemplateModelException- Specified by:
size
in interfacefreemarker.template.TemplateHashModelEx
- Throws:
freemarker.template.TemplateModelException
-