|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.ForumFactory
com.jivesoftware.forum.database.DbForumFactory
public class DbForumFactory
Database implementation of the ForumFactory interface.
Field Summary | |
---|---|
DatabaseCacheManager |
cacheManager
The cache manager is the global entry point for all the various object caches in Jive. |
protected GroupManager |
groupManager
|
protected DbPermissionsManager |
permissionsManager
|
protected DbQueryManager |
queryManager
|
protected DbRewardManager |
rewardManager
|
protected UserManager |
userManager
|
protected DbWatchManager |
watchManager
|
protected WatchSettingsManagerImpl |
watchSettingsManager
|
Method Summary | |
---|---|
static void |
clear()
Resets the singleton instance, effectively resetting the entire application. |
Forum |
createForum(java.lang.String name,
java.lang.String description)
Creates a new forum. |
Forum |
createForum(java.lang.String name,
java.lang.String description,
ForumCategory category)
Creates a new forum in the specified category. |
Query |
createQuery()
Creates a query object to search through all forums. |
Query |
createQuery(Forum[] forums)
Creates a query object to search through the specified list of forums. |
void |
deleteForum(Forum forum)
Deletes a forum and all of its content. |
protected void |
expirePopularObjects(boolean forceReload)
Expire the popularForums and popularThreads objects as long as at least 15 minutes has passed since the last expiration. |
AbuseManager |
getAbuseManager()
Returns an abuse manager that can be used for managing abuse reports |
AnnouncementManager |
getAnnouncementManager()
Returns an announcement manager, which is used to create and retrieve announcements. |
ArchiveManager |
getArchiveManager()
Returns an archive manager that can be used to manage archiving for forums. |
AttachmentManager |
getAttachmentManager()
Returns an attachment manager that can be used to manage attachment rules. |
AvatarManager |
getAvatarManager()
Returns a AvatarManager that can be used to find, create, delete, and make avatars active |
BanManager |
getBanManager()
Returns a ban manager that can be used for banning users |
DatabaseCacheManager |
getCacheManager()
Returns the cache manager object. |
CronTaskManager |
getCronTaskManager()
|
DraftManager |
getDraftManager()
Returns a DraftManager that can be used to manager message drafts. |
EmailManager |
getEmailManager()
Returns an EmailManager that can be used for sending out emails |
Forum |
getForum(long forumID)
Returns the forum with the specified forumID. |
Forum |
getForum(java.lang.String nntpName)
Returns the forum with the specified NNTP name. |
ForumCategory |
getForumCategory(long categoryID)
Returns the forum category with the specified categoryID. |
int |
getForumCount()
Returns the total number of forums in the system. |
int |
getForumCount(ResultFilter resultFilter)
Returns the total number of forums in the system matching the ResultFilter. |
protected static long |
getForumID(java.lang.String name)
Returns the id of the forum with the specified name. |
java.util.Iterator |
getForums()
Returns all forums in the system that the user has read permission for. |
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. |
ForumThread |
getForumThread(long threadID)
Returns the thread with the specified threadID. |
GatewayManager |
getGatewayManager()
Returns a gateway manager that can be used for managing gateways |
GroupManager |
getGroupManager()
Returns a GroupManager that can be used to manage groups. |
static DbForumFactory |
getInstance()
Provides singleton access to a DbForumFactory instance. |
InterceptorManager |
getInterceptorManager()
Returns a message interceptor manager that can be used to manage global interceptors. |
ForumMessage |
getMessage(long messageID)
Returns the forum message with the specified messageID. |
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. |
ModerationManager |
getModerationManager()
Returns a moderation manager that can be used for moderating messages |
NNTPServer |
getNNTPServer()
|
static DbForumFactory |
getNonInitializedInstance()
|
Permissions |
getPermissions(AuthToken authToken)
Returns the permissions for the factory that correspond to the passed-in Authorization. |
PermissionsManager |
getPermissionsManager()
Returns a permissions manager that can be used to set system wide permissions. |
PluginManager |
getPluginManager()
Returns an instance of PluginManager that can be used for acquiring
plugin instances. |
PollManager |
getPollManager()
Returns a poll manager that can be used to retrieve and manager polls. |
java.util.Iterator |
getPopularForums()
Returns an Iterator for the most popular forums in the system as Forum objects. |
java.util.Iterator |
getPopularThreads()
Returns an Iterator for the most threads in the system as ForumThread objects. |
PresenceManager |
getPresenceManager()
Returns a presence manager that can be used to retrieve and manage presences. |
PrivateMessageManager |
getPrivateMessageManager()
Returns a private message manager, which controls private message settings. |
QueryManager |
getQueryManager()
Returns a query manager that can be used to retrieve and manage search queries. |
com.jivesoftware.forum.QuestionManager |
getQuestionManager()
Returns a QuestionManager, which can be used to manage Questions. |
ReadTracker |
getReadTracker()
Returns a read tracker that can be used to track which threads and messages a user has read. |
RegistrationManager |
getRegistrationManager()
Returns a validation manager that can be used for validating user accounts |
RenderManager |
getRenderManager()
Returns a render manager that can be used to manage system wide render filters and macros. |
RewardManager |
getRewardManager()
Returns a reward manager that can be used to manage reward points. |
ForumCategory |
getRootForumCategory()
Returns the "root" forum category, that all other categories are children of. |
SearchManager |
getSearchManager()
Returns the search manger which can be used to manage the index used by Jive to perform searches. |
StatusLevelManager |
getStatusLevelManager()
Returns a StatusLevelManager that can be used to check a user status level, find leaders system wide, or by forum/category. |
TagManager |
getTagManager()
Returns a tag manager that can be used for managing tags |
UserManager |
getUserManager()
Returns a UserManager that can be used to manage users. |
int |
getUserMessageCount(User user)
Returns the total number of messages a user has posted in all forums. |
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. |
java.util.Iterator |
getUserMessages(User user)
Returns an iterator for all messages posted by a user. |
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. |
VirusScanManager |
getVirusScanManager()
|
WatchManager |
getWatchManager()
Returns a watch manager that can be used to manage watches. |
WatchSettingsManager |
getWatchSettingsManager()
Returns a watch settings manager that can be used to manage watch settings. |
static void |
initializeInstance()
|
boolean |
isAuthorized(long type)
Returns true if the handle on the object has the permission specified. |
static boolean |
isInitialized()
|
boolean |
isModerationEnabled()
|
void |
mergeForums(Forum forum1,
Forum forum2)
Merges the content of two forums by copying the threads from forum2 to forum1. |
protected boolean |
moderationDisabled()
Returns true if moderation has been disabled by setting the Jive property "database.moderationDisabled" to true. |
static void |
shutdown()
|
Methods inherited from class com.jivesoftware.forum.ForumFactory |
---|
getInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public DatabaseCacheManager cacheManager
protected UserManager userManager
protected GroupManager groupManager
protected DbPermissionsManager permissionsManager
protected DbWatchManager watchManager
protected DbRewardManager rewardManager
protected DbQueryManager queryManager
protected WatchSettingsManagerImpl watchSettingsManager
Method Detail |
---|
public static DbForumFactory getInstance()
public static DbForumFactory getNonInitializedInstance()
public static void initializeInstance()
public static boolean isInitialized()
public static void clear()
public static void shutdown()
public Forum createForum(java.lang.String name, java.lang.String description)
ForumFactory
createForum
in class ForumFactory
name
- the name of the forum.description
- the description of the forum.public Forum createForum(java.lang.String name, java.lang.String description, ForumCategory category)
ForumFactory
createForum
in class ForumFactory
name
- the name of the forum.description
- the description of the forum.public void deleteForum(Forum forum) throws UnauthorizedException
ForumFactory
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.
deleteForum
in class ForumFactory
forum
- the forum to delete.
UnauthorizedException
- if not allowed to delete a forum.public void mergeForums(Forum forum1, Forum forum2) throws UnauthorizedException
ForumFactory
You may only execute this operation if you are a system administrator.
mergeForums
in class ForumFactory
forum1
- the Forum to merge threads into.forum2
- the Forum to move all threads from.
UnauthorizedException
public ForumCategory getForumCategory(long categoryID) throws ForumCategoryNotFoundException
ForumFactory
getForumCategory
in class ForumFactory
categoryID
- the id of the forum category to return.
ForumCategoryNotFoundException
- if the requested category does
not exist.public ForumCategory getRootForumCategory()
ForumFactory
getRootForumCategory
in class ForumFactory
public Forum getForum(long forumID) throws ForumNotFoundException
ForumFactory
getForum
in class ForumFactory
forumID
- the id of the forum to return.
ForumNotFoundException
- if the requested forum does not exist.public Forum getForum(java.lang.String nntpName) throws ForumNotFoundException
ForumFactory
getForum
in class ForumFactory
nntpName
- the NNTP Name of the forum to return.
ForumNotFoundException
- if the requested forum does not exist.public ForumThread getForumThread(long threadID) throws ForumThreadNotFoundException
ForumFactory
getForumThread
in class ForumFactory
threadID
- the id of the thread to return.
ForumThreadNotFoundException
- if the requested thread does not exist.public ForumMessage getMessage(long messageID) throws ForumMessageNotFoundException
ForumFactory
getMessage
in class ForumFactory
messageID
- the id of the message to return.
ForumMessageNotFoundException
- if the requested message does not exist.public long getMessageID(long forumID, int forumIndex)
ForumFactory
getMessageID
in class ForumFactory
forumID
- the forum ID of the message.forumIndex
- the forum index value of the message.
public int getForumCount()
ForumFactory
getForumCount
in class ForumFactory
public int getForumCount(ResultFilter resultFilter)
ForumFactory
getForumCount
in class ForumFactory
resultFilter
- a ResultFilter used to filter the result.
public java.util.Iterator getForums()
ForumFactory
getForums
in class ForumFactory
ForumCategory.getRecursiveForums()
public java.util.Iterator getForums(ResultFilter resultFilter)
ForumFactory
getForums
in class ForumFactory
resultFilter
- a ResultFilter object to perform filtering and
sorting with.
ForumCategory.getRecursiveForums(ResultFilter)
public Query createQuery()
ForumFactory
createQuery
in class ForumFactory
public Query createQuery(Forum[] forums)
ForumFactory
createQuery
in class ForumFactory
public java.util.Iterator getPopularForums()
ForumFactory
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.
getPopularForums
in class ForumFactory
public java.util.Iterator getPopularThreads()
ForumFactory
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.
getPopularThreads
in class ForumFactory
public int getUserMessageCount(User user)
ForumFactory
In order to get a count of user messages in an individual forum, use the Forum.getMessageCount(ResultFilter) method.
getUserMessageCount
in class ForumFactory
user
- the user to tally results for.
public int getUserMessageCount(User user, ResultFilter resultFilter)
ForumFactory
In order to get a count of user messages in an individual forum, use the Forum.getMessageCount(ResultFilter) method.
getUserMessageCount
in class ForumFactory
user
- the user to tally results for.resultFilter
- a resultFilter to limit the query on.
public java.util.Iterator getUserMessages(User user)
ForumFactory
getUserMessages
in class ForumFactory
user
- the user to get messages for.public java.util.Iterator getUserMessages(User user, ResultFilter resultFilter)
ForumFactory
getUserMessages
in class ForumFactory
user
- the user to get messages for.resultFilter
- a resultFilter to limit the query on.
public UserManager getUserManager()
ForumFactory
getUserManager
in class ForumFactory
UserManager
public GroupManager getGroupManager()
ForumFactory
getGroupManager
in class ForumFactory
GroupManager
public SearchManager getSearchManager()
ForumFactory
getSearchManager
in class ForumFactory
public InterceptorManager getInterceptorManager()
ForumFactory
getInterceptorManager
in class ForumFactory
public WatchManager getWatchManager()
ForumFactory
getWatchManager
in class ForumFactory
public RewardManager getRewardManager()
ForumFactory
getRewardManager
in class ForumFactory
public AttachmentManager getAttachmentManager()
ForumFactory
getAttachmentManager
in class ForumFactory
public ArchiveManager getArchiveManager()
ForumFactory
getArchiveManager
in class ForumFactory
public PresenceManager getPresenceManager()
ForumFactory
getPresenceManager
in class ForumFactory
PresenceManager
public PermissionsManager getPermissionsManager()
ForumFactory
getPermissionsManager
in class ForumFactory
public QueryManager getQueryManager()
ForumFactory
getQueryManager
in class ForumFactory
QueryManager
public ReadTracker getReadTracker()
ForumFactory
getReadTracker
in class ForumFactory
public PollManager getPollManager()
ForumFactory
getPollManager
in class ForumFactory
public PrivateMessageManager getPrivateMessageManager()
ForumFactory
getPrivateMessageManager
in class ForumFactory
public AnnouncementManager getAnnouncementManager()
ForumFactory
getAnnouncementManager
in class ForumFactory
public CronTaskManager getCronTaskManager()
public com.jivesoftware.forum.QuestionManager getQuestionManager()
ForumFactory
getQuestionManager
in class ForumFactory
public NNTPServer getNNTPServer()
public VirusScanManager getVirusScanManager()
public GatewayManager getGatewayManager()
ForumFactory
getGatewayManager
in class ForumFactory
public BanManager getBanManager()
ForumFactory
getBanManager
in class ForumFactory
public RegistrationManager getRegistrationManager()
ForumFactory
getRegistrationManager
in class ForumFactory
public ModerationManager getModerationManager()
ForumFactory
getModerationManager
in class ForumFactory
public AbuseManager getAbuseManager()
ForumFactory
getAbuseManager
in class ForumFactory
public TagManager getTagManager()
ForumFactory
getTagManager
in class ForumFactory
public WatchSettingsManager getWatchSettingsManager()
ForumFactory
getWatchSettingsManager
in class ForumFactory
public RenderManager getRenderManager()
ForumFactory
getRenderManager
in class ForumFactory
RenderManager
public DraftManager getDraftManager()
ForumFactory
getDraftManager
in class ForumFactory
public Permissions getPermissions(AuthToken authToken)
ForumFactory
getPermissions
in class ForumFactory
authToken
- the auth token for the user.
public boolean isAuthorized(long type)
ForumFactory
isAuthorized
in class ForumFactory
type
- a permission type.ForumPermissions
public DatabaseCacheManager getCacheManager()
public StatusLevelManager getStatusLevelManager()
ForumFactory
getStatusLevelManager
in class ForumFactory
public AvatarManager getAvatarManager()
ForumFactory
getAvatarManager
in class ForumFactory
public EmailManager getEmailManager()
ForumFactory
getEmailManager
in class ForumFactory
public PluginManager getPluginManager()
ForumFactory
PluginManager
that can be used for acquiring
plugin instances.
getPluginManager
in class ForumFactory
PluginManager
that can be used for acquiring
plugin instances.protected static long getForumID(java.lang.String name) throws ForumNotFoundException
name
- the name of the forum to lookup.
ForumNotFoundException
public boolean isModerationEnabled()
protected void expirePopularObjects(boolean forceReload)
forceReload
- true if you want to force reloading the objects, ignoring the
normal 15 minute time window.protected final boolean moderationDisabled()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |