Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices
Class Forum

java.lang.Object
  extended by com.jivesoftware.forum.webservices.Forum

public class Forum
extends java.lang.Object

A container for a list of threads. Each forum belongs to a single category. A forum offers the finest granularity of permissions in the system.


Constructor Summary
Forum()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 long getCategoryID()
          Returns the parent category ID for this forum.
 java.util.Date getCreationDate()
          Returns the Date that the forum was created.
 java.lang.String getDescription()
          Returns the description of the forum.
 Locale getFinalLocale()
          Returns the locale for this forum.
 long getID()
          Returns the unique id of the forum.
 ForumMessage getLatestMessage()
          Returns the Lastmessage object of the forum.
 long getLatestMessageID()
          Returns the ID of the most recently created or edited message in this forum.
 Locale getLocale()
          Returns the locale for this forum.
 int getMaxForumIndex()
          Returns the largest forum index value for a message in the forum.
 int getMinForumIndex()
          Returns the smallest forum index value for a message in the forum.
 int getModerationDefaultMessageValue()
          Returns the default number of moderation points for messages created in the forum.
 int getModerationDefaultThreadValue()
          Returns the default number of moderation points for threads created in the forum.
 java.util.Date getModificationDate()
          Returns the Date that the forum was last modified.
 java.lang.String getName()
          Returns the name of the forum.
 java.lang.String getNNTPName()
          Returns the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups).
 int getThreadCount()
          Returns the complete thread count for this forum.
 int hashCode()
           
 void setCategoryID(long categoryID)
           
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of the forum.
 void setDescription(java.lang.String description)
          Sets the description of the forum.
 void setFinalLocale(Locale finalLocale)
           
 void setID(long id)
           
 void setLatestMessage(ForumMessage latestMessage)
           
 void setLatestMessageID(long latestMessageID)
           
 void setLocale(Locale locale)
          Sets the locale for this forum.
 void setMaxForumIndex(int maxForumIndex)
           
 void setMinForumIndex(int minForumIndex)
           
 void setModerationDefaultMessageValue(int value)
          Sets the default number of moderation points for threads created in the forum.
 void setModerationDefaultThreadValue(int value)
          Sets the default number of moderation points for threads created in the forum.
 void setModificationDate(java.util.Date modificationDate)
          Sets the date the forum was last modified.
 void setName(java.lang.String name)
          Sets the name of a the forum.
 void setNNTPName(java.lang.String nntpName)
          Sets the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups).
 void setThreadCount(int threadCount)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Forum

public Forum()
Method Detail

getID

public long getID()
Returns the unique id of the forum.

Returns:
the unique id of the forum.

setID

public void setID(long id)

getName

public java.lang.String getName()
Returns the name of the forum.

Returns:
the name of the forum.

setName

public void setName(java.lang.String name)
Sets the name of a the forum.

Parameters:
name - the name of the forum.

getNNTPName

public java.lang.String getNNTPName()
Returns the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups). NNTP names must be unique in the system and typically contain category information in the name. For example, consider the forum named "Support" in the category "Product X". The NNTP name for the forum might be "product_x.support". However, this naming scheme is merely by convention; the NNTP name for a forum can be anything as long as it is unique in the system and conforms to NNTP naming conventions.

NNTP names must follow certain rules. In particular:

Returns:
the NNTP name of the forum.

setNNTPName

public void setNNTPName(java.lang.String nntpName)
Sets the NNTP name for the forum, which is the name of the forum used in the NNTP protocol (newsgroups). NNTP names must be unique in the system and typically contain category information in the name. For example, consider the forum named "Support" in the category "Product X". The NNTP name for the forum might be "product_x.support". However, this naming scheme is merely by convention; the NNTP name for a forum can be anything as long as it is unique in the system and conforms to NNTP naming conventions.

NNTP names must follow certain rules. Therefore, any name passed into this method will automatically converted based on the following rules:

Parameters:
nntpName - the NNTP name of the forum.

getDescription

public java.lang.String getDescription()
Returns the description of the forum. A description should normally be no longer than thirty words so that it can be easily displayed in a list of forums on a web page.

Returns:
the description of the forum.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the forum. A description should normally be no longer than thirty words so that it can be easily displayed in a list of forums on a web page.

Parameters:
description - the description of the forum.

getCreationDate

public java.util.Date getCreationDate()
Returns the Date that the forum was created.

Returns:
the Date the forum was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the creation date of the forum. In most cases, the creation date will default to when the forum was entered into the system. However, the creation date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Parameters:
creationDate - the date the forum was created.

getModificationDate

public java.util.Date getModificationDate()
Returns the Date that the forum was last modified. In other words, the date of the most recent message or thread in the forum.

Returns:
the Date the forum was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the date the forum was last modified. In most cases, last modifed will default to when the forum data was last changed. However, the last modified date needs to be set manually when importing data. In other words, skin authors should ignore this method since it only intended for system maintenance.

Parameters:
modificationDate - the date the forum was modified.

getModerationDefaultThreadValue

public int getModerationDefaultThreadValue()
Returns the default number of moderation points for threads created in the forum. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Returns:
the default number of moderation points assigned to threads.

setModerationDefaultThreadValue

public void setModerationDefaultThreadValue(int value)
Sets the default number of moderation points for threads created in the forum. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Parameters:
value - default number of moderation points for threads.

getModerationDefaultMessageValue

public int getModerationDefaultMessageValue()
Returns the default number of moderation points for messages created in the forum. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Returns:
the default number of moderation points assigned to messages.

setModerationDefaultMessageValue

public void setModerationDefaultMessageValue(int value)
Sets the default number of moderation points for threads created in the forum. This value is used to turn moderation on or off. A default value of 0 is used to turn moderation on, and a default value of 1 is used to turn it off.

Parameters:
value - default number of moderation points for messages.

getMinForumIndex

public int getMinForumIndex()
Returns the smallest forum index value for a message in the forum. The forum index is used to track when messages enter the forum. Each forum index is assigned to a message once and then never re-used. So, there may be gaps in forum index values as messages are deleted, archived, or moved. Still, a rough estimate of the number of messages in the system is max(forumIndex) - min(forumIndex) + 1;

Returns:
the smallest forum index in the forum.

setMinForumIndex

public void setMinForumIndex(int minForumIndex)

getMaxForumIndex

public int getMaxForumIndex()
Returns the largest forum index value for a message in the forum. The forum index is used to track when messages enter the forum. Each forum index is assigned to a message once and then never re-used. So, there may be gaps in forum index values as messages are deleted, archived, or moved. Still, a rough estimate of the number of messages in the system is max(forumIndex) - min(forumIndex) + 1;

Returns:
the largest forum index in the forum.

setMaxForumIndex

public void setMaxForumIndex(int maxForumIndex)

getLocale

public Locale getLocale()
Returns the locale for this forum. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this forum, this method will return null. If you want to get the inherited locale for this forum, you should call getFinalLocale().

Returns:
the locale for this forum.

setLocale

public void setLocale(Locale locale)
Sets the locale for this forum. A locale specifies language and country codes, and is used for internationalization.

Parameters:
locale - the locale of this forum.

getFinalLocale

public Locale getFinalLocale()
Returns the locale for this forum. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this forum, this method will return an inherited locale. A forum will inherit the locale from it's chain of parent categories, if one exists. Otherwise it will inherit the default locale used by Jive. If you want to get the explicit locale for this forum, you should call getLocale().

Returns:
the final locale for this forum.

setFinalLocale

public void setFinalLocale(Locale finalLocale)

getLatestMessageID

public long getLatestMessageID()
Returns the ID of the most recently created or edited message in this forum. If there are no messages in this forum, this method will return 0. This information could also be determined using a ResultFilter, but this method offers a simpler, more optimized way to access the data.

Returns:
the most recently created or edited message in this forum.

setLatestMessageID

public void setLatestMessageID(long latestMessageID)

getLatestMessage

public ForumMessage getLatestMessage()
Returns the Lastmessage object of the forum. If there are not messages in the forum this method will return null.

Returns:

setLatestMessage

public void setLatestMessage(ForumMessage latestMessage)

getCategoryID

public long getCategoryID()
Returns the parent category ID for this forum.

Returns:
the category ID for this forum.

setCategoryID

public void setCategoryID(long categoryID)

getThreadCount

public int getThreadCount()
Returns the complete thread count for this forum.

Returns:
the complete thread count for this forum.

setThreadCount

public void setThreadCount(int threadCount)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.