freemarker.doc
Class ContentEntry

java.lang.Object
  extended by freemarker.doc.ContentEntry
All Implemented Interfaces:
TemplateHashModel, TemplateModel, TemplateScalarModel

public final class ContentEntry
extends java.lang.Object
implements TemplateHashModel, TemplateScalarModel

Encapsulates a single table-of-contents entry in the FreeMarker manual.

Version:
$Id: ContentEntry.java 1101 2013-04-01 04:17:32Z run2000 $

Constructor Summary
ContentEntry()
          Creates new ContentEntry
ContentEntry(java.lang.String title, java.lang.String link)
          Creates new ContentEntry with supplied title and link
ContentEntry(java.lang.String title, java.lang.String link, java.lang.String longTitle)
          Creates new ContentEntry with supplied title, long title and link
 
Method Summary
 TemplateModel get(java.lang.String key)
          Gets a TemplateModel from the hash.
 java.lang.String getAsString()
          Returns the title of this content entry as a String.
 java.lang.String getDescription()
          Getter for property description.
 java.lang.String getLink()
          Getter for property link.
 java.lang.String getLongTitle()
          Getter for property longTitle.
 java.lang.String getSuperTitle()
          Getter for property superTitle.
 java.lang.String getTitle()
          Getter for property title.
 boolean isEmpty()
          Is the template model empty?
 boolean isGenerated()
          Getter for property generated.
 void setDescription(java.lang.String description)
          Setter for property description.
 void setGenerated(boolean generated)
          Setter for property generated.
 void setLink(java.lang.String link)
          Setter for property link.
 void setLongTitle(java.lang.String longTitle)
          Setter for property longTitle.
 void setSuperTitle(java.lang.String superTitle)
          Setter for property superTitle.
 void setTitle(java.lang.String title)
          Setter for property title.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentEntry

public ContentEntry()
Creates new ContentEntry


ContentEntry

public ContentEntry(java.lang.String title,
                    java.lang.String link)
Creates new ContentEntry with supplied title and link


ContentEntry

public ContentEntry(java.lang.String title,
                    java.lang.String link,
                    java.lang.String longTitle)
Creates new ContentEntry with supplied title, long title and link

Method Detail

get

public TemplateModel get(java.lang.String key)
                  throws TemplateModelException
Gets a TemplateModel from the hash.

Specified by:
get in interface TemplateHashModel
Parameters:
key - the name by which the TemplateModel is identified in the template.
Returns:
the TemplateModel referred to by the key, or null if not found.
Throws:
TemplateModelException - there was a problem getting the value for the given key

getAsString

public java.lang.String getAsString()
                             throws TemplateModelException
Returns the title of this content entry as a String.

Specified by:
getAsString in interface TemplateScalarModel
Returns:
the title of this content entry.
Throws:
TemplateModelException

isEmpty

public boolean isEmpty()
                throws TemplateModelException
Is the template model empty?

Specified by:
isEmpty in interface TemplateModel
Returns:
false to indicate the object is never empty
Throws:
TemplateModelException

getTitle

public java.lang.String getTitle()
Getter for property title.

Returns:
Value of property title.

setTitle

public void setTitle(java.lang.String title)
Setter for property title.

Parameters:
title - New value of property title.

getLongTitle

public java.lang.String getLongTitle()
Getter for property longTitle.

Returns:
Value of property longTitle.

setLongTitle

public void setLongTitle(java.lang.String longTitle)
Setter for property longTitle.

Parameters:
longTitle - New value of property longTitle.

getLink

public java.lang.String getLink()
Getter for property link.

Returns:
Value of property link.

setLink

public void setLink(java.lang.String link)
Setter for property link.

Parameters:
link - New value of property link.

isGenerated

public boolean isGenerated()
Getter for property generated.

Returns:
Value of property generated.

setGenerated

public void setGenerated(boolean generated)
Setter for property generated.

Parameters:
generated - New value of property generated.

getSuperTitle

public java.lang.String getSuperTitle()
Getter for property superTitle.

Returns:
Value of property superTitle.

setSuperTitle

public void setSuperTitle(java.lang.String superTitle)
Setter for property superTitle.

Parameters:
superTitle - New value of property superTitle.

getDescription

public java.lang.String getDescription()
Getter for property description.

Returns:
Value of property description.

setDescription

public void setDescription(java.lang.String description)
Setter for property description.

Parameters:
description - New value of property description.