Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.rendering.template
Class DocumentModelAdapter

java.lang.Object
  extended by org.nuxeo.ecm.platform.rendering.template.DocumentModelAdapter
All Implemented Interfaces:
freemarker.template.AdapterTemplateModel, freemarker.template.TemplateHashModel, freemarker.template.TemplateHashModelEx, freemarker.template.TemplateModel

public class DocumentModelAdapter
extends java.lang.Object
implements freemarker.template.TemplateHashModelEx, freemarker.template.AdapterTemplateModel

Author:
Bogdan Stefanescu

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
DocumentModelAdapter(DocumentModel doc)
           
DocumentModelAdapter(DocumentModel doc, freemarker.template.ObjectWrapper wrapper)
           
 
Method Summary
 freemarker.template.TemplateModel get(java.lang.String key)
           
 java.lang.Object getAdaptedObject(java.lang.Class hint)
           
 boolean isEmpty()
          a doc model is never empty
 freemarker.template.TemplateCollectionModel keys()
           
 int size()
           
 freemarker.template.TemplateCollectionModel values()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentModelAdapter

public DocumentModelAdapter(DocumentModel doc,
                            freemarker.template.ObjectWrapper wrapper)

DocumentModelAdapter

public DocumentModelAdapter(DocumentModel doc)
Method Detail

getAdaptedObject

public java.lang.Object getAdaptedObject(java.lang.Class hint)
Specified by:
getAdaptedObject in interface freemarker.template.AdapterTemplateModel

get

public freemarker.template.TemplateModel get(java.lang.String key)
                                      throws freemarker.template.TemplateModelException
Specified by:
get in interface freemarker.template.TemplateHashModel
Throws:
freemarker.template.TemplateModelException

isEmpty

public boolean isEmpty()
                throws freemarker.template.TemplateModelException
a doc model is never empty

Specified by:
isEmpty in interface freemarker.template.TemplateHashModel
Throws:
freemarker.template.TemplateModelException

keys

public freemarker.template.TemplateCollectionModel keys()
                                                 throws freemarker.template.TemplateModelException
Specified by:
keys in interface freemarker.template.TemplateHashModelEx
Throws:
freemarker.template.TemplateModelException

values

public freemarker.template.TemplateCollectionModel values()
                                                   throws freemarker.template.TemplateModelException
Specified by:
values in interface freemarker.template.TemplateHashModelEx
Throws:
freemarker.template.TemplateModelException

size

public int size()
         throws freemarker.template.TemplateModelException
Specified by:
size in interface freemarker.template.TemplateHashModelEx
Throws:
freemarker.template.TemplateModelException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.