|
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 |
java.lang.Objectcom.jivesoftware.forum.ForumFactory
public abstract class ForumFactory
A ForumFactory provides access to and management of Forums. It is the point of entry for the entire Jive system.
A concrete instance of ForumFactory can be obtained by calling the getInstance() method with an AuthToken. The AuthToken determines the access rights the user will have on all other objects in the system. Usually the first steps of any program interacting with the Jive system are:
Finer grained pluggability for the user and group system is also available. See the UserManager and GroupManager classes for more information.
AuthFactory
,
UserManager
,
GroupManager
Constructor Summary | |
---|---|
ForumFactory()
|
Method Summary | |
---|---|
abstract Forum |
createForum(java.lang.String name,
java.lang.String description)
Creates a new forum. |
abstract Forum |
createForum(java.lang.String name,
java.lang.String description,
ForumCategory category)
Creates a new forum in the specified category. |
abstract Query |
createQuery()
Creates a query object to search through all forums. |
abstract Query |
createQuery(Forum[] forums)
Creates a query object to search through the specified list of forums. |
abstract void |
deleteForum(Forum forum)
Deprecated. the ForumCategory.deleteForum(Forum) method should now be used
instead of this method. |
abstract com.jivesoftware.forum.abuse.AbuseManager |
getAbuseManager()
Returns an abuse manager that can be used for managing abuse reports |
abstract AnnouncementManager |
getAnnouncementManager()
Returns an announcement manager, which is used to create and retrieve announcements. |
abstract ArchiveManager |
getArchiveManager()
Returns an archive manager that can be used to manage archiving for forums. |
abstract AttachmentManager |
getAttachmentManager()
Returns an attachment manager that can be used to manage attachment rules. |
abstract AvatarManager |
getAvatarManager()
Returns a AvatarManager that can be used to find, create, delete, and make avatars active |
abstract com.jivesoftware.base.ban.BanManager |
getBanManager()
Returns a ban manager that can be used for banning users |
abstract com.jivesoftware.forum.DraftManager |
getDraftManager()
Returns a DraftManager that can be used to manager message drafts. |
abstract EmailManager |
getEmailManager()
Returns an EmailManager that can be used for sending out emails |
abstract Forum |
getForum(long forumID)
Returns the forum with the specified forumID. |
abstract Forum |
getForum(java.lang.String nntpName)
Returns the forum with the specified NNTP name. |
abstract ForumCategory |
getForumCategory(long categoryID)
Returns the forum category with the specified categoryID. |
abstract int |
getForumCount()
Returns the total number of forums in the system. |
abstract int |
getForumCount(ResultFilter resultFilter)
Returns the total number of forums in the system matching the ResultFilter. |
abstract java.util.Iterator |
getForums()
Returns all forums in the system that the user has read permission for. |
abstract java.util.Iterator |
getForums(ResultFilter resultFilter)
Returns all forums in the system that the user has read permission for and that matche the specified ResultFilter. |
abstract ForumThread |
getForumThread(long threadID)
Returns the thread with the specified threadID. |
abstract com.jivesoftware.forum.gateway.GatewayManager |
getGatewayManager()
Returns a gateway manager that can be used for managing gateways |
abstract GroupManager |
getGroupManager()
Returns a GroupManager that can be used to manage groups. |
static ForumFactory |
getInstance(AuthToken authToken)
Returns a concrete ForumFactory instance. |
abstract InterceptorManager |
getInterceptorManager()
Returns a message interceptor manager that can be used to manage global interceptors. |
abstract ForumMessage |
getMessage(long messageID)
Returns the forum message with the specified messageID. |
abstract long |
getMessageID(long forumID,
int forumIndex)
Returns the message ID with the specified forumID and forumIndex, or -1 if the forumIndex does not map to a message. |
abstract com.jivesoftware.forum.moderation.ModerationManager |
getModerationManager()
Returns a moderation manager that can be used for moderating messages |
abstract Permissions |
getPermissions(AuthToken authToken)
Returns the permissions for the factory that correspond to the passed-in Authorization. |
abstract PermissionsManager |
getPermissionsManager()
Returns a permissions manager that can be used to set system wide permissions. |
abstract com.jivesoftware.base.plugin.PluginManager |
getPluginManager()
Returns an instance of PluginManager that can be used for acquiring
plugin instances. |
abstract PollManager |
getPollManager()
Returns a poll manager that can be used to retrieve and manager polls. |
abstract java.util.Iterator |
getPopularForums()
Returns an Iterator for the most popular forums in the system as Forum objects. |
abstract java.util.Iterator |
getPopularThreads()
Returns an Iterator for the most threads in the system as ForumThread objects. |
abstract PresenceManager |
getPresenceManager()
Returns a presence manager that can be used to retrieve and manage presences. |
abstract PrivateMessageManager |
getPrivateMessageManager()
Returns a private message manager, which controls private message settings. |
abstract QueryManager |
getQueryManager()
Returns a query manager that can be used to retrieve and manage search queries. |
abstract com.jivesoftware.forum.QuestionManager |
getQuestionManager()
Returns a QuestionManager, which can be used to manage Questions. |
abstract ReadTracker |
getReadTracker()
Returns a read tracker that can be used to track which threads and messages a user has read. |
abstract com.jivesoftware.base.registration.RegistrationManager |
getRegistrationManager()
Returns a validation manager that can be used for validating user accounts |
abstract RenderManager |
getRenderManager()
Returns a render manager that can be used to manage system wide render filters and macros. |
abstract RewardManager |
getRewardManager()
Returns a reward manager that can be used to manage reward points. |
abstract ForumCategory |
getRootForumCategory()
Returns the "root" forum category, that all other categories are children of. |
abstract SearchManager |
getSearchManager()
Returns the search manger which can be used to manage the index used by Jive to perform searches. |
abstract StatusLevelManager |
getStatusLevelManager()
Returns a StatusLevelManager that can be used to check a user status level, find leaders system wide, or by forum/category. |
abstract TagManager |
getTagManager()
Returns a tag manager that can be used for managing tags |
abstract UserManager |
getUserManager()
Returns a UserManager that can be used to manage users. |
abstract int |
getUserMessageCount(User user)
Returns the total number of messages a user has posted in all forums. |
abstract int |
getUserMessageCount(User user,
ResultFilter resultFilter)
Returns the total number of messages a user has posted in all forums that obey the parameters set by the specificed ResultFilter. |
abstract java.util.Iterator |
getUserMessages(User user)
Returns an iterator for all messages posted by a user. |
abstract java.util.Iterator |
getUserMessages(User user,
ResultFilter resultFilter)
Returns an iterator for all messages posted by a user that obey the parameters set by the specified ResultFilter. |
abstract WatchManager |
getWatchManager()
Returns a watch manager that can be used to manage watches. |
abstract com.jivesoftware.forum.watches.WatchSettingsManager |
getWatchSettingsManager()
Returns a watch settings manager that can be used to manage watch settings. |
abstract boolean |
isAuthorized(long permissionType)
Returns true if the handle on the object has the permission specified. |
abstract void |
mergeForums(Forum forum1,
Forum forum2)
Merges the content of two forums by copying the threads from forum2 to forum1. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForumFactory()
Method Detail |
---|
public static ForumFactory getInstance(AuthToken authToken)
authToken
- the auth token for the user.
public abstract Forum createForum(java.lang.String name, java.lang.String description) throws UnauthorizedException
name
- the name of the forum.description
- the description of the forum.
UnauthorizedException
- if not allowed to create a Forum.public abstract Forum createForum(java.lang.String name, java.lang.String description, ForumCategory category) throws UnauthorizedException
name
- the name of the forum.description
- the description of the forum.
UnauthorizedException
- if not allowed to create a Forum.public abstract ForumCategory getForumCategory(long categoryID) throws ForumCategoryNotFoundException
categoryID
- the id of the forum category to return.
ForumCategoryNotFoundException
- if the requested category does
not exist.public abstract ForumCategory getRootForumCategory()
public abstract Forum getForum(long forumID) throws ForumNotFoundException, UnauthorizedException
forumID
- the id of the forum to return.
UnauthorizedException
- if not allowed to read the forum.
ForumNotFoundException
- if the requested forum does not exist.public abstract Forum getForum(java.lang.String nntpName) throws ForumNotFoundException, UnauthorizedException
nntpName
- the NNTP Name of the forum to return.
UnauthorizedException
- if not allowed to read the forum.
ForumNotFoundException
- if the requested forum does not exist.public abstract 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.public abstract 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.public abstract long getMessageID(long forumID, int forumIndex)
forumID
- the forum ID of the message.forumIndex
- the forum index value of the message.
public abstract int getForumCount()
public abstract int getForumCount(ResultFilter resultFilter)
resultFilter
- a ResultFilter used to filter the result.
public abstract java.util.Iterator getForums()
ForumCategory.getRecursiveForums()
public abstract java.util.Iterator getForums(ResultFilter resultFilter)
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
ForumCategory.getRecursiveForums(ResultFilter)
public abstract Query createQuery()
public abstract Query createQuery(Forum[] forums)
public abstract java.util.Iterator getPopularForums()
popularForums.number
-- The maximum number of
forums that will be returned in the list of popular forums.
Default is 4.
popularForums.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.
public abstract java.util.Iterator 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.
public abstract void deleteForum(Forum forum) throws UnauthorizedException
ForumCategory.deleteForum(Forum)
method should now be used
instead of this method.
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.public abstract void mergeForums(Forum forum1, Forum forum2) throws UnauthorizedException
You may only execute this operation if you are a system administrator.
forum1
- the Forum to merge threads into.forum2
- the Forum to move all threads from.
UnauthorizedException
public abstract int getUserMessageCount(User user)
In order to get a count of user messages in an individual forum, use the Forum.getMessageCount(ResultFilter) method.
user
- the user to tally results for.
public abstract int getUserMessageCount(User user, ResultFilter resultFilter)
In order to get a count of user messages in an individual forum, use the Forum.getMessageCount(ResultFilter) method.
user
- the user to tally results for.resultFilter
- a resultFilter to limit the query on.
public abstract java.util.Iterator getUserMessages(User user)
user
- the user to get messages for.public abstract java.util.Iterator getUserMessages(User user, ResultFilter resultFilter)
user
- the user to get messages for.resultFilter
- a resultFilter to limit the query on.
public abstract com.jivesoftware.forum.abuse.AbuseManager getAbuseManager()
public abstract TagManager getTagManager()
public abstract AnnouncementManager getAnnouncementManager()
public abstract ArchiveManager getArchiveManager()
public abstract AttachmentManager getAttachmentManager()
public abstract AvatarManager getAvatarManager()
public abstract com.jivesoftware.base.ban.BanManager getBanManager()
public abstract EmailManager getEmailManager()
public abstract com.jivesoftware.base.plugin.PluginManager getPluginManager()
PluginManager
that can be used for acquiring
plugin instances.
PluginManager
that can be used for acquiring
plugin instances.public abstract com.jivesoftware.forum.gateway.GatewayManager getGatewayManager()
public abstract GroupManager getGroupManager()
GroupManager
public abstract InterceptorManager getInterceptorManager() throws UnauthorizedException
UnauthorizedException
- if not a system administrator.public abstract com.jivesoftware.forum.DraftManager getDraftManager()
public abstract com.jivesoftware.forum.moderation.ModerationManager getModerationManager()
public abstract PermissionsManager getPermissionsManager() throws UnauthorizedException
UnauthorizedException
- if not a system admin.public abstract PollManager getPollManager()
public abstract PresenceManager getPresenceManager()
PresenceManager
public abstract PrivateMessageManager getPrivateMessageManager()
public abstract QueryManager getQueryManager()
QueryManager
public abstract com.jivesoftware.forum.QuestionManager getQuestionManager()
public abstract ReadTracker getReadTracker()
public abstract com.jivesoftware.base.registration.RegistrationManager getRegistrationManager()
public abstract RenderManager getRenderManager()
RenderManager
public abstract RewardManager getRewardManager()
public abstract SearchManager getSearchManager() throws UnauthorizedException
UnauthorizedException
- if not a system administator.public abstract StatusLevelManager getStatusLevelManager()
public abstract UserManager getUserManager()
UserManager
public abstract WatchManager getWatchManager()
public abstract com.jivesoftware.forum.watches.WatchSettingsManager getWatchSettingsManager()
public abstract Permissions getPermissions(AuthToken authToken)
authToken
- the auth token for the user.
public abstract boolean isAuthorized(long permissionType)
permissionType
- a permission type.ForumPermissions
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |