Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.webservices
Class ForumCategory

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

public class ForumCategory
extends java.lang.Object

A container for forums and a hierarchy of other forum categories. In other words, the category structure is a tree, with lists of forums for every category node. There is always a "root" forum category (ID of 1), of which all other categories are children.


Constructor Summary
ForumCategory()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getCategoryCount()
          Returns the number of child categories for this category.
 int getCategoryDepth()
          Returns the depth of a this category relative to the root.
 java.util.Date getCreationDate()
          Returns the Date that the category was created.
 java.lang.String getDescription()
          Returns the description of the forum category.
 Locale getFinalLocale()
          Returns the locale for this category.
 int getForumCount()
          Returns the number of forums in the category.
 long getID()
          Returns the ID of the category.
 long getLatestMessageID()
          Returns the most recently created or edited message in this category (including all sub-categories).
 Locale getLocale()
          Returns the locale for this category.
 int getMessageCount()
          Returns the number of messages in the category.
 java.util.Date getModificationDate()
          Returns the Date this category was last modified.
 java.lang.String getName()
          Returns the name of the category.
 long getParentCategoryID()
          Returns ID of the parent category of this category.
 int getRecursiveForumCount()
          Returns the number of forums in the category and all sub-categories.
 int getThreadCount()
          Returns number of forums in the category and all sub-categories
 int hashCode()
           
 void setCategoryCount(int categoryCount)
          Sets the number of child categories for this category.
 void setCategoryDepth(int categoryDepth)
           
 void setCreationDate(java.util.Date creationDate)
          Sets the creation date of the category.
 void setDescription(java.lang.String description)
          Sets the description of the forum category.
 void setFinalLocale(Locale finalLocale)
           
 void setForumCount(int forumCount)
           
 void setID(long id)
           
 void setLatestMessageID(long latestMessageID)
           
 void setLocale(Locale locale)
          Sets the locale for this category.
 void setMessageCount(int messageCount)
           
 void setModificationDate(java.util.Date modificationDate)
          Sets the date the category was last modified.
 void setName(java.lang.String name)
          Sets the name of the forum category.
 void setParentCategoryID(long parentCategoryID)
           
 void setRecursiveForumCount(int recursiveForumCount)
           
 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

ForumCategory

public ForumCategory()
Method Detail

getID

public long getID()
Returns the ID of the category.

Returns:
the ID of the category.

setID

public void setID(long id)

getName

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

Returns:
the name of the category.

setName

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

Parameters:
name - the name of the forum category.

getDescription

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

Returns:
the description of the forum category.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the forum category.

Parameters:
description - the description of the forum category.

getCreationDate

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

Returns:
the Date the forum category was created.

setCreationDate

public void setCreationDate(java.util.Date creationDate)
Sets the creation date of the category. In most cases, the creation date will default to when the category 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 category was created.

getModificationDate

public java.util.Date getModificationDate()
Returns the Date this category was last modified. In other words, the date of the most recent forum update in this category.

By default, this feature is

Returns:
the Date the forum was last modified.

setModificationDate

public void setModificationDate(java.util.Date modificationDate)
Sets the date the category was last modified. In most cases, last modifed will default to when the category 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.

getLocale

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

Returns:
the locale for this category.

setLocale

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

Parameters:
locale - the locale of this category.

getFinalLocale

public Locale getFinalLocale()
Returns the locale for this category. A locale specifies language and country codes, and is used for internationalization. If a locale has not been specified for this category, this method will return an inherited locale. A category 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 category, you should call getLocale().

Returns:
the final locale for this category.

setFinalLocale

public void setFinalLocale(Locale finalLocale)

getForumCount

public int getForumCount()
Returns the number of forums in the category.

Returns:
the number of forums in the category.

setForumCount

public void setForumCount(int forumCount)

getRecursiveForumCount

public int getRecursiveForumCount()
Returns the number of forums in the category and all sub-categories.

Returns:
the number of forums in the category and sub-categories.

setRecursiveForumCount

public void setRecursiveForumCount(int recursiveForumCount)

getThreadCount

public int getThreadCount()
Returns number of forums in the category and all sub-categories.

Returns:
the number of threads in the category.

setThreadCount

public void setThreadCount(int threadCount)

getMessageCount

public int getMessageCount()
Returns the number of messages in the category.

Returns:
the number of messages in the category.

setMessageCount

public void setMessageCount(int messageCount)

getLatestMessageID

public long getLatestMessageID()
Returns the most recently created or edited message in this category (including all sub-categories). If there are no messages in this category, 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 category.

setLatestMessageID

public void setLatestMessageID(long latestMessageID)

getParentCategoryID

public long getParentCategoryID()
Returns ID of the parent category of this category. This method will return 0 if the current category is the root category.

Returns:
the parent category of this category.

setParentCategoryID

public void setParentCategoryID(long parentCategoryID)

getCategoryDepth

public int getCategoryDepth()
Returns the depth of a this category relative to the root. For example, consider the following tree (where 1 is the root category):
   1
   |-- 3
   |-- |-- 4
   |-- |-- |-- 7
 
The depth of message 4 is 2, the depth of category 7 is 3, etc.

Returns:
the depth of the category in the category tree.

setCategoryDepth

public void setCategoryDepth(int categoryDepth)

getCategoryCount

public int getCategoryCount()
Returns the number of child categories for this category.

Returns:
the number of child categories for this category.

setCategoryCount

public void setCategoryCount(int categoryCount)
Sets the number of child categories for this category.

Parameters:
categoryCount - the number of child categories for this category.

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.