|
Clearspace API (1.7.0) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ForumManager
This manager provides methods to load forum threads, user messages and to retrieve popular forum threads.
JiveContext,
Community| Method Summary | |
|---|---|
void |
deleteThread(ForumThread thread)
Deletes a thread and all of its messages. |
ForumThread |
getForumThread(long threadID)
Returns the thread with the specified threadID. |
ForumMessage |
getMessage(long messageID)
Returns the forum message with the specified messageID. |
long |
getMessageID(long communityID,
int communityIndex)
Returns the message ID with the specified communityID and communityIndex, or -1 if the communityIndex does not map to a message. |
JiveIterator<ForumThread> |
getPopularThreads()
Returns an Iterable for the most threads in the system as ForumThread objects. |
int |
getUserMessageCount(User user)
Returns the total number of messages a user has posted in all communities. |
int |
getUserMessageCount(User user,
ThreadResultFilter resultFilter)
Returns the total number of messages a user has posted in all communities that obey the parameters set by the specificed ResultFilter. |
JiveIterator<ForumMessage> |
getUserMessages(User user)
Returns an iterable for all messages posted by a user. |
JiveIterator<ForumMessage> |
getUserMessages(User user,
ThreadResultFilter resultFilter)
Returns an iterable for all messages posted by a user that obey the parameters set by the specified ResultFilter. |
boolean |
isModerationEnabled()
Returns true if moderation has been enabled by setting the Jive property "database.moderationEnabled" to true. |
void |
moveThread(ForumThread thread,
Community newCommunity)
Moves a thread from one community to another. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| Method Detail |
|---|
ForumThread getForumThread(long threadID)
throws ForumThreadNotFoundException,
UnauthorizedException
threadID - the id of the thread to return.
UnauthorizedException - if not allowed to read the thread.
ForumThreadNotFoundException - if the requested thread does not exist.
ForumMessage getMessage(long messageID)
throws ForumMessageNotFoundException,
UnauthorizedException
messageID - the id of the message to return.
UnauthorizedException - if not allowed to read the message.
ForumMessageNotFoundException - if the requested message does not exist.
long getMessageID(long communityID,
int communityIndex)
communityID - the id of the community to retrieve the messageID forcommunityIndex - the community index value of the message.
JiveIterator<ForumThread> getPopularThreads()
popularThreads.number -- The number of
threads that will be returned in the list of popular threads.
Default is 4.
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.
void moveThread(ForumThread thread,
Community newCommunity)
throws UnauthorizedException
newCommunity.
The main purpose of this method is to allow admins to move non-topical threads into a more
appropriate community.
thread - the thread to move to another community.newCommunity - the new community to move the thread to
UnauthorizedException - if does not have admin or moderator permissions for the
thread's current community and the newCommunity.
void deleteThread(ForumThread thread)
throws UnauthorizedException
thread - the thread to delete.
UnauthorizedException - if not an admin or moderator of the thread's communityint getUserMessageCount(User user)
In order to get a count of user messages in an individual communities,
use the ContentRetrieval.getMessageCount(ThreadResultFilter) method.
user - the user to tally results for.
int getUserMessageCount(User user,
ThreadResultFilter resultFilter)
In order to get a count of user messages in an individual community,
use the ContentRetrieval.getMessageCount(ThreadResultFilter) method.
user - the user to tally results for.resultFilter - a resultFilter to limit the query on.
JiveIterator<ForumMessage> getUserMessages(User user)
user - the user to get messages for.
JiveIterator<ForumMessage> getUserMessages(User user,
ThreadResultFilter resultFilter)
user - the user to get messages for.resultFilter - a resultFilter to limit the query on.
boolean isModerationEnabled()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||