org.liquidsite.app.template
Class ForumBean

java.lang.Object
  extended byorg.liquidsite.app.template.TemplateBean
      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.
 java.lang.String getRealName()
          Returns the real forum name.
 int getTopicCount()
          Returns the number of topics in this forum.
 boolean isModerator()
          Checks if the current user is a forum moderator.
 boolean isModerator(java.lang.String user)
          Checks if the specified user is a forum moderator.
 boolean isModerator(UserBean user)
          Checks if the specified user is a forum moderator.
 
Methods inherited from class org.liquidsite.app.template.ContentBean
getContent, getCreated, getDate, getId, getLock, getName, getOnline, getParent, getPath, getRevision, getUser, hasAccess, toString
 
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, wait, wait, wait
 

Method Detail

isModerator

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

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

isModerator

public boolean isModerator(java.lang.String user)
Checks if the specified user is a forum moderator.

Parameters:
user - the name of the user to check
Returns:
true if the specified user is a forum moderator, or false otherwise

isModerator

public boolean isModerator(UserBean user)
Checks if the specified user is a forum moderator.

Parameters:
user - the user to check
Returns:
true if the specified user is a forum moderator, or false otherwise

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

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)