org.liquidsite.app.template
Class DocumentDataBean

java.lang.Object
  extended byorg.liquidsite.app.template.TemplateBean
      extended byorg.liquidsite.app.template.DocumentDataBean
All Implemented Interfaces:
freemarker.template.TemplateHashModel, freemarker.template.TemplateModel

public class DocumentDataBean
extends TemplateBean
implements freemarker.template.TemplateHashModel

A document template bean. This class is used to access document content from the template data model.


Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Method Summary
 freemarker.template.TemplateModel get(java.lang.String id)
          Returns a document property as a template model.
 boolean isEmpty()
          Checks if the hash model is empty.
 
Methods inherited from class org.liquidsite.app.template.TemplateBean
getContext, getContextRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isEmpty

public boolean isEmpty()
Checks if the hash model is empty.

Specified by:
isEmpty in interface freemarker.template.TemplateHashModel
Returns:
false as the hash model is never empty

get

public freemarker.template.TemplateModel get(java.lang.String id)
Returns a document property as a template model.

Specified by:
get in interface freemarker.template.TemplateHashModel
Parameters:
id - the document property id
Returns:
the template model object, or an empty scalar if the document property wasn't found