org.liquidsite.app.template
Class SectionBean

java.lang.Object
  extended byorg.liquidsite.app.template.ContentBean
      extended byorg.liquidsite.app.template.SectionBean

public class SectionBean
extends ContentBean

A section template bean. This class is used to access sections from the template data model.


Method Summary
 int countDocuments()
          Returns the number of documents in this section and any subsections.
 DocumentBean findDocument(java.lang.String path)
          Returns the document corresponding to the specified path.
 java.util.ArrayList findDocuments(int offset, int count)
          Returns all documents in this section and any subsections.
 java.util.ArrayList findDocuments(java.lang.String sorting, int offset, int count)
          Returns all documents in this section and any subsections.
 ForumBean findForum(java.lang.String name)
          Returns a named forum in this section.
 java.lang.String getDescription()
          Returns the section description in HTML format.
 java.util.ArrayList getForums()
          Returns all forums in this section.
 java.util.ArrayList getSections()
          Returns all sections in this section.
 
Methods inherited from class org.liquidsite.app.template.ContentBean
getContent, getContext, getCreated, getDate, getId, getLock, getName, getOnline, getParent, getPath, getRevision, getUser, hasAccess, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getDescription

public java.lang.String getDescription()
Returns the section description in HTML format.

Returns:
the section description

getSections

public java.util.ArrayList getSections()
Returns all sections in this section. The sections will be ordered by their name.

Returns:
a list of the sections found (as section beans)

getForums

public java.util.ArrayList getForums()
Returns all forums in this section. The forums will be ordered by their name.

Returns:
a list of the forums found (as forum beans)

countDocuments

public int countDocuments()
Returns the number of documents in this section and any subsections.

Returns:
the number of documents found

findDocument

public DocumentBean findDocument(java.lang.String path)
Returns the document corresponding to the specified path. The path is relative to this section.

Parameters:
path - the document (and section) path
Returns:
the document found, or an empty document if not found

findDocuments

public java.util.ArrayList findDocuments(int offset,
                                         int count)
Returns all documents in this section and any subsections. At most the specified number of documents will be returned. The documents will be ordered by the publication online date.

Parameters:
offset - the number of documents to skip
count - the maximum number of documents
Returns:
a list of the documents found (as document beans)

findDocuments

public java.util.ArrayList findDocuments(java.lang.String sorting,
                                         int offset,
                                         int count)
Returns all documents in this section and any subsections. At most the specified number of documents will be returned. The documents will be ordered by the specified sort order.

Parameters:
sorting - the sorting information
offset - the number of documents to skip
count - the maximum number of documents
Returns:
a list of the documents found (as document beans)

findForum

public ForumBean findForum(java.lang.String name)
Returns a named forum in this section.

Parameters:
name - the forum name
Returns:
the forum found, or an empty forum if not found