org.liquidsite.app.template
Class ForumBean

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

public class ForumBean
extends ContentBean

A forum template bean. This class is used to access forums from the template data model.


Method Summary
 java.util.ArrayList findTopics(int offset, int count)
          Returns all topics in this forum.
 java.lang.String getDescription()
          Returns the forum description.
 TopicBean getFirst()
          Returns the first topic in this forum.
 TopicBean getLast()
          Returns the last topic in this forum.
 boolean getModerator()
          Checks if the current user is a forum moderator.
 java.lang.String getRealName()
          Returns the real forum name.
 int getTopicCount()
          Returns the number of topics in this forum.
 
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

getRealName

public java.lang.String getRealName()
Returns the real forum name.

Returns:
the real forum name, or an empty string if the forum doesn't exist

getDescription

public java.lang.String getDescription()
Returns the forum description.

Returns:
the forum description, or an empty string if the forum doesn't exist

getModerator

public boolean getModerator()
Checks if the current user is a forum moderator.

Returns:
true if the current user is a forum moderator, or false otherwise

getFirst

public TopicBean getFirst()
Returns the first topic in this forum. The topics are ordered in modification date order.

Returns:
the first topic in this forum, or an empty topic if the forum doesn't exist

getLast

public TopicBean getLast()
Returns the last topic in this forum. The topics are ordered in modification date order.

Returns:
the last topic in this forum, or an empty topic if the forum doesn't exist

getTopicCount

public int getTopicCount()
Returns the number of topics in this forum.

Returns:
the number of topics in this forum

findTopics

public java.util.ArrayList findTopics(int offset,
                                      int count)
Returns all topics in this forum. At most the specified number of topics will be returned. The topics will be ordered by last modification date.

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