|
Jive Forums API (5.5.8) Developer Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.forum.proxy.ForumCategoryProxy
public class ForumCategoryProxy
A protection proxy for ForumCategories. A proxy has a set of permissions that are specified at creation time of the proxy. Subsequently, those permissions are use to restrict access to protected methods. If a user does not have the right to execute a particular method, an UnauthorizedException is thrown.
ForumCategory,
UnauthorizedException| Field Summary |
|---|
| Fields inherited from interface com.jivesoftware.forum.ContentRetrieval |
|---|
ALL_TYPES, THREAD |
| Constructor Summary | |
|---|---|
ForumCategoryProxy(ForumCategory category,
AuthToken authToken,
Permissions permissions)
Creates a new ForumCategoryProxy object. |
|
| 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 forumCategory)
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. |
boolean |
equals(java.lang.Object object)
|
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.Iterator |
getCombinedContent(long[] types)
Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentTypes are supplied as an argument. |
java.util.Iterator |
getCombinedContent(ResultFilter filter,
long[] types)
Returns an Iterable for all threads, documents, and blog posts in the community, depending on which ContentTypes are supplied as an argument, and according the the supplied ResultFilter. |
int |
getCombinedContentCount(long[] types)
Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentTypes are supplied as an argument. |
int |
getCombinedContentCount(ResultFilter filter,
long[] types)
Returns the combined number of threads, documents, and blog posts in the community, depending on which ContentTypes are supplied as an argument, and restricted by the ResultFilter. |
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()
Retrieve the unique identifier for the jive object. |
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.Locale |
getLocale()
Returns the locale for this category. |
int |
getMessageCount()
Returns the number of messages in the community. |
int |
getMessageCount(ResultFilter resultFilter)
Returns the number of messages in the community based on the specified ResultFilter. |
java.util.Iterator |
getMessages()
Returns an Iterable for all the messages in the community. |
java.util.Iterator |
getMessages(ResultFilter resultFilter)
Returns an Iterable for all the messages in the community 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. |
int |
getObjectType()
Return the object type of the jive object. |
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. |
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 community. |
int |
getThreadCount(ResultFilter resultFilter)
Returns the number of threads in the community based on the specified ResultFilter. |
java.util.Iterator |
getThreads()
Returns an Iterable for all the threads in the community. |
java.util.Iterator |
getThreads(ResultFilter resultFilter)
Returns an Iterable for all the threads in the community that match the criteria specified by the ResultFilter. |
int |
hashCode()
|
boolean |
isAuthorized(long type)
Returns true if the handle on the object has the permission specified. |
void |
moveCategory(ForumCategory forumCategory,
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 forumCategory,
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. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ForumCategoryProxy(ForumCategory category,
AuthToken authToken,
Permissions permissions)
category - the category to protect by proxyauthToken - the user's auth token.permissions - the permissions to use with this proxy.| Method Detail |
|---|
public long getID()
JiveObject
getID in interface JiveObjectgetID in interface ForumCategorypublic java.lang.String getName()
ForumCategory
getName in interface ForumCategory
public void setName(java.lang.String name)
throws UnauthorizedException
ForumCategory
setName in interface ForumCategoryname - the name of the forum category.
UnauthorizedException - if does not have admin permissions.public java.lang.String getDescription()
ForumCategory
getDescription in interface ForumCategory
public void setDescription(java.lang.String description)
throws UnauthorizedException
ForumCategory
setDescription in interface ForumCategorydescription - the description of the forum category.
UnauthorizedException - if does not have admin permissions.public java.util.Map getTags()
ForumCategoryMap where the key is the
name of tag and the value is the number of times the tag has been used in this community.
getTags in interface ForumCategoryMap where the key is the
name of tag and the value is the number of times the tag has been used in this community.public java.util.Map getTags(TagResultFilter resultFilter)
ForumCategoryMap 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.
getTags in interface ForumCategoryresultFilter - 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.public java.util.Date getCreationDate()
ForumCategory
getCreationDate in interface ForumCategory
public void setCreationDate(java.util.Date creationDate)
throws UnauthorizedException
ForumCategory
setCreationDate in interface ForumCategorycreationDate - the date the forum category was created.
UnauthorizedException - if does not have admin permissions.public java.util.Date getModificationDate()
ForumCategoryBy default, this feature is
getModificationDate in interface ForumCategory
public void setModificationDate(java.util.Date modificationDate)
throws UnauthorizedException
ForumCategory
setModificationDate in interface ForumCategorymodificationDate - the date the forum was modified.
UnauthorizedException - if does not have admin permissions.public java.util.Locale getLocale()
ForumCategory
getLocale in interface ForumCategory
public void setLocale(java.util.Locale locale)
throws UnauthorizedException
ForumCategory
setLocale in interface ForumCategorylocale - the locale of this category.
UnauthorizedException - if does not have admin permissions.public java.util.Locale getFinalLocale()
ForumCategory
getFinalLocale in interface ForumCategorypublic java.lang.String getProperty(java.lang.String name)
ForumCategory
getProperty in interface ForumCategoryname - the name of the property to get.
public java.util.Collection getProperties(java.lang.String parentName)
ForumCategory
getProperties in interface ForumCategoryparentName - the name of the parent property to return the children for.
public void setProperty(java.lang.String name,
java.lang.String value)
throws UnauthorizedException
ForumCategory
If the property referenced by name already exists, its
value will be updated.
setProperty in interface ForumCategoryname - the name of the property to set.value - the new value for the property.
UnauthorizedException - if does not have admin permissions.
public void deleteProperty(java.lang.String name)
throws UnauthorizedException
ForumCategory
deleteProperty in interface ForumCategoryname - the name of the property to delete.
UnauthorizedException - if does not have admin permissions.public java.util.Iterator getPropertyNames()
ForumCategory
getPropertyNames in interface ForumCategorypublic int getForumCount()
ForumCategoryForumCategory.getForums() since
that method only returns forums that a user has read permission for.
getForumCount in interface ForumCategorypublic int getForumCount(ResultFilter resultFilter)
ForumCategoryForumCategory.getForums() since that
method only returns forums that a user has read permission for.
getForumCount in interface ForumCategoryresultFilter - a resultFilter to limit the query on.
public int getRecursiveForumCount()
ForumCategoryForumCategory.getRecursiveForums() since that method only returns forums
that a user has read permission for.
getRecursiveForumCount in interface ForumCategorypublic int getRecursiveForumCount(ResultFilter resultFilter)
ForumCategoryForumCategory.getRecursiveForums() since that method only returns forums
that a user has read permission for.
getRecursiveForumCount in interface ForumCategoryresultFilter - a resultFilter to limit the query on.
public java.util.Iterator getForums()
ForumCategory
getForums in interface ForumCategorypublic java.util.Iterator getForums(ResultFilter resultFilter)
ForumCategory
getForums in interface ForumCategoryresultFilter - a ResultFilter object to perform filtering and
sorting with.
public java.util.Iterator getRecursiveForums()
ForumCategory
getRecursiveForums in interface ForumCategorypublic java.util.Iterator getRecursiveForums(ResultFilter resultFilter)
ForumCategory
getRecursiveForums in interface ForumCategoryresultFilter - a ResultFilter object to perform filtering and
sorting with.
public void setForumIndex(Forum forum,
int newIndex)
throws UnauthorizedException
ForumCategory
setForumIndex in interface ForumCategoryforum - the forum to adjust the index of.newIndex - the new index value for the forum.
UnauthorizedException - if not an admin for this category
public void moveForum(Forum forum,
ForumCategory destinationCategory)
throws UnauthorizedException
ForumCategory
moveForum in interface ForumCategoryforum - the forum to move.destinationCategory - the category to move the forum to.
UnauthorizedException - if not an admin for this category and
the destination category.public ForumCategory getParentCategory()
ForumCategory
getParentCategory in interface ForumCategorypublic int getCategoryCount()
ForumCategory
getCategoryCount in interface ForumCategorypublic java.util.Iterator getCategories()
ForumCategory
getCategories in interface ForumCategory
public java.util.Iterator getCategories(int startIndex,
int numResults)
ForumCategory
getCategories in interface ForumCategorystartIndex - the index of the first result to return.numResults - the max number of results to return.
public int getRecursiveCategoryCount()
ForumCategory
getRecursiveCategoryCount in interface ForumCategorypublic java.util.Iterator getRecursiveCategories()
ForumCategory
getRecursiveCategories in interface ForumCategorypublic int getCategoryDepth()
ForumCategory1 |-- 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
ForumCategory.getRecursiveCategories()
Iterator to build a UI of hierarchical categories.
getCategoryDepth in interface ForumCategory
public void setCategoryIndex(ForumCategory forumCategory,
int newIndex)
throws UnauthorizedException
ForumCategory
setCategoryIndex in interface ForumCategoryforumCategory - the sub category to set the index fornewIndex - the new index of the sub category
UnauthorizedException
public void moveCategory(ForumCategory forumCategory,
ForumCategory destinationCategory)
throws UnauthorizedException
ForumCategory1 |-- 3 |-- |-- 4 |-- |-- |-- 7Moving 3 to be a child of 7 is not allowed, since that breaks the tree structure.
moveCategory in interface ForumCategoryforumCategory - 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.
public ForumCategory createCategory(java.lang.String name,
java.lang.String description)
throws UnauthorizedException
ForumCategory
createCategory in interface ForumCategoryname - the name of the new category.description - the description of the new category.
UnauthorizedException - if not an admin.
public void deleteCategory(ForumCategory forumCategory)
throws UnauthorizedException
ForumCategory
deleteCategory in interface ForumCategoryforumCategory - the ForumCategory to delete.
UnauthorizedException - if not an admin.
public void deleteForum(Forum forum)
throws UnauthorizedException
ForumCategoryThis 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.
deleteForum in interface ForumCategoryforum - the forum to delete.
UnauthorizedException - if not allowed to delete a forum.public java.util.Iterator getPopularThreads()
ForumCategoryA 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.
getPopularThreads in interface ForumCategorypublic java.util.Iterator getThreads()
ContentRetrieval
getThreads in interface ContentRetrievalgetThreads in interface ForumCategorypublic java.util.Iterator getThreads(ResultFilter resultFilter)
ContentRetrieval
getThreads in interface ContentRetrievalgetThreads in interface ForumCategoryresultFilter - a ResultFilter object to perform filtering and sorting with.
public int getThreadCount()
ContentRetrievalContentRetrieval.getThreads() method.
getThreadCount in interface ContentRetrievalgetThreadCount in interface ForumCategorypublic int getThreadCount(ResultFilter resultFilter)
ContentRetrievalContentRetrieval.getThreads(com.jivesoftware.forum.ResultFilter) method.
getThreadCount in interface ContentRetrievalgetThreadCount in interface ForumCategoryresultFilter - a resultFilter to limit the query on.
public int getMessageCount()
ContentRetrievalContentRetrieval.getMessages() method.
getMessageCount in interface ContentRetrievalgetMessageCount in interface ForumCategorypublic int getMessageCount(ResultFilter resultFilter)
ContentRetrievalContentRetrieval.getMessages(ResultFilter) method.
getMessageCount in interface ContentRetrievalgetMessageCount in interface ForumCategoryresultFilter - a resultFilter to limit the query on.
public java.util.Iterator getMessages()
ContentRetrieval
getMessages in interface ContentRetrievalgetMessages in interface ForumCategorypublic java.util.Iterator getMessages(ResultFilter resultFilter)
ContentRetrieval
getMessages in interface ContentRetrievalgetMessages in interface ForumCategoryresultFilter - a ResultFilter object to perform filtering and sorting with.
public ForumMessage getLatestMessage()
ForumCategoryResultFilter, but this method offers a simpler, more optimized way to
access the data.
getLatestMessage in interface ForumCategory
public PermissionsManager getPermissionsManager()
throws UnauthorizedException
ForumCategory
getPermissionsManager in interface ForumCategoryUnauthorizedException - if not an admin.public ForumRenderManager getRenderManager()
ForumCategoryRenderManager.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.
getRenderManager in interface ForumCategoryRenderManager
public InterceptorManager getInterceptorManager()
throws UnauthorizedException
ForumCategory
getInterceptorManager in interface ForumCategoryUnauthorizedException - if not an adminpublic Permissions getPermissions(AuthToken authToken)
ForumCategory
getPermissions in interface ForumCategoryauthToken - the auth token to lookup permissions for.
public boolean isAuthorized(long type)
ForumCategoryForumPermissions.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.
isAuthorized in interface ForumCategorytype - permissionType a permission type.
ForumPermissionspublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getObjectType()
JiveObject
getObjectType in interface JiveObjectpublic int getCombinedContentCount(long[] types)
ContentRetrievalContentRetrieval.getCombinedContent(long[]) method.
getCombinedContentCount in interface ContentRetrievaltypes - the ContentTypes to include in the count.
public int getCombinedContentCount(ResultFilter filter,
long[] types)
ContentRetrievalContentRetrieval.getCombinedContent(ResultFilter, long[]) method.
getCombinedContentCount in interface ContentRetrievalfilter - the ResultFilter to filter the results.types - the ContentTypes to include in the count.
public java.util.Iterator getCombinedContent(long[] types)
ContentRetrieval
getCombinedContent in interface ContentRetrievaltypes - the ContentTypes to include in the result.
public java.util.Iterator getCombinedContent(ResultFilter filter,
long[] types)
ContentRetrievalResultFilter.
getCombinedContent in interface ContentRetrievalfilter - the ResultFilter to filter and sort the results.types - the ContentTypes to include in the result.
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||