|
Jive Forums API (5.5.20.2-oracle) Core Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ForumCategory
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. Category names are not unique, therefore it is not possible to load a category by name.
ForumFactory.getRootForumCategory()
,
ForumFactory.getForumCategory(long)
Field Summary |
---|
Fields inherited from interface com.jivesoftware.forum.ContentRetrieval |
---|
ALL_TYPES, THREAD |
Method Summary | |
---|---|
ForumCategory |
createCategory(java.lang.String name,
java.lang.String description)
Creates a new ForumCategory as a sub-category of this category using the name and description. |
void |
deleteCategory(ForumCategory subCategory)
Deletes a sub-category. |
void |
deleteForum(Forum forum)
Deletes a forum and all of its content. |
void |
deleteProperty(java.lang.String name)
Deletes an extended property. |
java.util.Iterator |
getCategories()
Returns an Iterator for the child categories of this category. |
java.util.Iterator |
getCategories(int startIndex,
int numResults)
Returns an Iterator for the child categories of this category using a start index and the number of results to return. |
int |
getCategoryCount()
Returns the number of sub-categories of 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. |
java.util.Locale |
getFinalLocale()
Returns the locale for this category. |
int |
getForumCount()
Returns the number of forums in the category. |
int |
getForumCount(ResultFilter resultFilter)
Returns the number of forums in the category based on the specified ResultFilter. |
java.util.Iterator |
getForums()
Returns an Iterator for all the forums in the category. |
java.util.Iterator |
getForums(ResultFilter resultFilter)
Returns a Iterator for all the forums in the category that match the criteria specified by the ResultFilter. |
long |
getID()
Returns the ID of the category. |
InterceptorManager |
getInterceptorManager()
Returns a message interceptor manager that can be used to manage interceptors for this category. |
ForumMessage |
getLatestMessage()
Returns the most recently created or edited message in this category (including all sub-categories). |
java.util.Iterator |
getLatestMessages()
Returns an Iterator for the most recently created or edited messages in this category (including all sub-categories). |
java.util.Locale |
getLocale()
Returns the locale for this category. |
int |
getMessageCount()
Returns the number of messages in the category. |
int |
getMessageCount(ResultFilter resultFilter)
Returns the number of messages in the category based on the specified ResultFilter. |
java.util.Iterator |
getMessages()
Returns an Iterator for all the messages in the category. |
java.util.Iterator |
getMessages(ResultFilter resultFilter)
Returns a Iterator for all the messages in the category that match the criteria specified by the ResultFilter. |
java.util.Date |
getModificationDate()
Returns the Date this category was last modified. |
java.lang.String |
getName()
Returns the name of the category. |
ForumCategory |
getParentCategory()
Returns the parent category of this category. |
Permissions |
getPermissions(AuthToken authToken)
Returns the permissions for the category that correspond to the passed-in AuthToken. |
PermissionsManager |
getPermissionsManager()
Returns a permissions manager that can be used to set permissions for this category. |
java.util.Iterator |
getPopularThreads()
Returns an Iterator for the most popular threads in the category. |
java.util.Collection |
getProperties(java.lang.String parentName)
Return all immediate children property values of a parent property as an unmodifiable Collection of String values. |
java.lang.String |
getProperty(java.lang.String name)
Returns an extended property of the category. |
java.util.Iterator |
getPropertyNames()
Returns an Iterator for the names of the forum category properties. |
java.util.Iterator |
getRecursiveCategories()
Returns an Iterator for all sub-categories of this category, including sub-categories of sub-categories, etc. |
int |
getRecursiveCategoryCount()
Returns the total count of all sub-categories of this category, including sub-categories of sub-categories, etc. |
int |
getRecursiveForumCount()
Returns the number of forums in the category and all sub-categories. |
int |
getRecursiveForumCount(ResultFilter resultFilter)
Returns the number of forums in the category and all sub-categories based on the specified ResultFilter. |
java.util.Iterator |
getRecursiveForums()
Returns an Iterator for all the forums in the category and all sub-categories. |
java.util.Iterator |
getRecursiveForums(ResultFilter resultFilter)
Returns a Iterator for all the forums in the category and sub-categories that match the criteria specified by the ResultFilter. |
com.jivesoftware.forum.renderer.ForumRenderManager |
getRenderManager()
Returns a render manager that can be used to manage render filters and macros for this category. |
java.util.Map |
getTags()
Returns all tags for a given community in a Map where the key is the
name of tag and the value is the number of times the tag has been used in this community. |
java.util.Map |
getTags(TagResultFilter resultFilter)
Returns all tags for a given community in a Map where the key is the
name of tag and the value is the number of times the tag has been used in this community
filtered by the TagResultFilter. |
int |
getThreadCount()
Returns the number of threads in the category. |
int |
getThreadCount(ResultFilter resultFilter)
Returns the number of threads in the category based on the specified ResultFilter. |
java.util.Iterator |
getThreads()
Returns a Iterator for all the threads in the category. |
java.util.Iterator |
getThreads(ResultFilter resultFilter)
Returns a Iterator for all the threads in the category that match the criteria specified by the ResultFilter. |
boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
void |
moveCategory(ForumCategory subCategory,
ForumCategory destinationCategory)
Moves a sub-category to another category. |
void |
moveForum(Forum forum,
ForumCategory destinationCategory)
Moves a forum from this category to another. |
void |
setCategoryIndex(ForumCategory subCategory,
int newIndex)
Sets the display order of a sub-category. |
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 |
setForumIndex(Forum forum,
int newIndex)
Sets the index of the forum in the category. |
void |
setLocale(java.util.Locale locale)
Sets the locale for this category. |
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 |
setProperty(java.lang.String name,
java.lang.String value)
Sets an extended property of the category. |
Methods inherited from interface com.jivesoftware.base.JiveObject |
---|
getObjectType |
Methods inherited from interface com.jivesoftware.forum.ContentRetrieval |
---|
getCombinedContent, getCombinedContent, getCombinedContentCount, getCombinedContentCount |
Method Detail |
---|
long getID()
getID
in interface JiveObject
java.lang.String getName()
void setName(java.lang.String name) throws UnauthorizedException
name
- the name of the forum category.
UnauthorizedException
- if does not have admin permissions.java.lang.String getDescription()
void setDescription(java.lang.String description) throws UnauthorizedException
description
- the description of the forum category.
UnauthorizedException
- if does not have admin permissions.java.util.Date getCreationDate()
void setCreationDate(java.util.Date creationDate) throws UnauthorizedException
creationDate
- the date the forum category was created.
UnauthorizedException
- if does not have admin permissions.java.util.Date getModificationDate()
By default, this feature is
void setModificationDate(java.util.Date modificationDate) throws UnauthorizedException
modificationDate
- the date the forum was modified.
UnauthorizedException
- if does not have admin permissions.java.util.Locale getLocale()
void setLocale(java.util.Locale locale) throws UnauthorizedException
locale
- the locale of this category.
UnauthorizedException
- if does not have admin permissions.java.util.Locale getFinalLocale()
java.lang.String getProperty(java.lang.String name)
name
- the name of the property to get.
java.util.Collection getProperties(java.lang.String parentName)
parentName
- the name of the parent property to return the children for.
void setProperty(java.lang.String name, java.lang.String value) throws UnauthorizedException
If the property referenced by name
already exists, its
value will be updated.
name
- the name of the property to set.value
- the new value for the property.
UnauthorizedException
- if does not have admin permissions.void deleteProperty(java.lang.String name) throws UnauthorizedException
name
- the name of the property to delete.
UnauthorizedException
- if does not have admin permissions.java.util.Iterator getPropertyNames()
int getForumCount()
getForums()
since
that method only returns forums that a user has read permission for.
int getForumCount(ResultFilter resultFilter)
getForums()
since that
method only returns forums that a user has read permission for.
resultFilter
- a resultFilter to limit the query on.
int getRecursiveForumCount()
getRecursiveForums()
since that method only returns forums
that a user has read permission for.
int getRecursiveForumCount(ResultFilter resultFilter)
getRecursiveForums()
since that method only returns forums
that a user has read permission for.
resultFilter
- a resultFilter to limit the query on.
java.util.Iterator getForums()
java.util.Iterator getForums(ResultFilter resultFilter)
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
java.util.Iterator getRecursiveForums()
java.util.Iterator getRecursiveForums(ResultFilter resultFilter)
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
void setForumIndex(Forum forum, int newIndex) throws UnauthorizedException
forum
- the forum to adjust the index of.newIndex
- the new index value for the forum.
UnauthorizedException
- if not an admin for this categoryvoid moveForum(Forum forum, ForumCategory destinationCategory) throws UnauthorizedException
forum
- the forum to move.destinationCategory
- the category to move the forum to.
UnauthorizedException
- if not an admin for this category and
the destination category.java.util.Iterator getPopularThreads()
A number of configurable Jive properties control how the popular threads feature works:
popularThreads.numThreads
-- The number of
messages that will be returned in the list of popular threads.
Default is 4 threads.
popularThreads.timeWindow
-- The number of hours
to consider new messages in a thread from. Default is 24 hours,
which is suitable for sites with moderate to high amounts of
traffic. Sites with less traffic may wish to set the window
to a number of days.
java.util.Iterator getThreads()
getThreads
in interface com.jivesoftware.forum.ContentRetrieval
java.util.Iterator getThreads(ResultFilter resultFilter)
getThreads
in interface com.jivesoftware.forum.ContentRetrieval
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
int getThreadCount()
getThreads()
method.
getThreadCount
in interface com.jivesoftware.forum.ContentRetrieval
int getThreadCount(ResultFilter resultFilter)
getThreads(ResultFilter)
method.
getThreadCount
in interface com.jivesoftware.forum.ContentRetrieval
resultFilter
- a resultFilter to limit the query on.
int getMessageCount()
getMessages()
method.
getMessageCount
in interface com.jivesoftware.forum.ContentRetrieval
int getMessageCount(ResultFilter resultFilter)
getMessages(ResultFilter)
method.
getMessageCount
in interface com.jivesoftware.forum.ContentRetrieval
resultFilter
- a resultFilter to limit the query on.
java.util.Iterator getMessages()
getMessages
in interface com.jivesoftware.forum.ContentRetrieval
java.util.Iterator getMessages(ResultFilter resultFilter)
getMessages
in interface com.jivesoftware.forum.ContentRetrieval
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
ForumMessage getLatestMessage()
ResultFilter
, but this method offers a simpler, more optimized way to
access the data.
java.util.Iterator getLatestMessages()
ForumCategory getParentCategory()
int getCategoryCount()
java.util.Iterator getCategories()
java.util.Iterator getCategories(int startIndex, int numResults)
startIndex
- the index of the first result to return.numResults
- the max number of results to return.
int getRecursiveCategoryCount()
java.util.Iterator getRecursiveCategories()
int getCategoryDepth()
1 |-- 3 |-- |-- 4 |-- |-- |-- 7The depth of message 4 is 2, the depth of category 7 is 3, etc. This method is useful in combination with the
getRecursiveCategories()
Iterator to build a UI of hierarchical categories.
void setCategoryIndex(ForumCategory subCategory, int newIndex) throws UnauthorizedException
subCategory
- the sub category to set the index fornewIndex
- the new index of the sub category
UnauthorizedException
void moveCategory(ForumCategory subCategory, ForumCategory destinationCategory) throws UnauthorizedException
1 |-- 3 |-- |-- 4 |-- |-- |-- 7Moving 3 to be a child of 7 is not allowed, since that breaks the tree structure.
subCategory
- the ForumCategory to move.destinationCategory
- the category to move the sub-category to.
UnauthorizedException
- if not an admin of this category and
the destination category.ForumCategory createCategory(java.lang.String name, java.lang.String description) throws UnauthorizedException
name
- the name of the new category.description
- the description of the new category.
UnauthorizedException
- if not an admin.void deleteCategory(ForumCategory subCategory) throws UnauthorizedException
subCategory
- the ForumCategory to delete.
UnauthorizedException
- if not an admin.void deleteForum(Forum forum) throws UnauthorizedException
This method is not always guaranteed to be safe to call. For example, if multiple clients have handles on a forum, and that forum is subsequently deleted, the behavior of the forum objects that the clients have handles on is unspecified and may result in errors.
forum
- the forum to delete.
UnauthorizedException
- if not allowed to delete a forum.PermissionsManager getPermissionsManager() throws UnauthorizedException
UnauthorizedException
- if not an admin.InterceptorManager getInterceptorManager() throws UnauthorizedException
UnauthorizedException
- if not an admincom.jivesoftware.forum.renderer.ForumRenderManager getRenderManager()
RenderManager.render(Object, com.jivesoftware.forum.renderer.RenderType, String)
and
RenderManager.render(Object, com.jivesoftware.forum.renderer.RenderType, com.jivesoftware.forum.renderer.RenderStrategy, String)
methods, which may be useful to skin writers.
RenderManager
Permissions getPermissions(AuthToken authToken)
authToken
- the auth token to lookup permissions for.
boolean isAuthorized(long permissionType)
ForumPermissions.FORUM_CATEGORY_ADMIN
)
would return true.A list of possible permissions can be found in the ForumPermissions class. Certain methods of this class are restricted to certain permissions as specified in the method comments.
permissionType
- permissionType a permission type.
ForumPermissions
java.util.Map getTags()
Map
where the key is the
name of tag and the value is the number of times the tag has been used in this community.
Map
where the key is the
name of tag and the value is the number of times the tag has been used in this community.java.util.Map getTags(TagResultFilter resultFilter)
Map
where the key is the
name of tag and the value is the number of times the tag has been used in this community
filtered by the TagResultFilter.
resultFilter
- the filter to use to restrict tag results
Map
where the key is the
name of tag and the value is the number of times the tag has been used in this community
filtered by the TagResultFilter.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |