|
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.database.DbWatchManager
public class DbWatchManager
Database implementation of the WatchManager interface.
| Constructor Summary | |
|---|---|
DbWatchManager()
Creates a new DbWatchManager. |
|
| Method Summary | |
|---|---|
Watch |
createWatch(User user,
Forum forum)
Create a watch on a forum for the specified user. |
Watch |
createWatch(User user,
ForumCategory category)
Create a watch on a category for the specified user. |
Watch |
createWatch(User user,
ForumThread thread)
Create a watch on a thread for the specified user. |
Watch |
createWatch(User user,
User watchedUser)
Create a watch on a user for the specified user. |
void |
deleteThreadWatches(long forumID)
Deletes all thread watches in a specific forum. |
void |
deleteWatch(Watch watch)
Delete the specified watch. |
void |
deleteWatches(int objectType,
long objectID)
|
void |
deleteWatches(User user)
Deletes all watches that a user has. |
void |
demoteBatchWatches()
|
void |
destroy()
Notifies the manager to release any resources that may be holding on too. |
java.util.Iterator |
getAllWatches(User user,
int objectType)
Returns an iterator for all objects of a particular type that a user is watching. |
int |
getDeleteDays()
Returns the number of days that a watched object can remain inactive before watches on that object are deleted. |
java.util.Iterator |
getRecursiveForumWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
Returns all the Forum objects the user is watching under the category and its subcategories. |
java.util.Iterator |
getRecursiveThreadWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
Returns the ForumThread objects the user is watching under the provided ForumCategory. |
java.util.Iterator |
getThreadWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
Returns the ForumThread objects the user is watching under the provided ForumCategory. |
int |
getTotalWatchCount(User user,
int objectType)
Returns a count of all watches that a user has of a particular type. |
Watch |
getWatch(User user,
Forum forum)
Returns a watch on a particular forum, or null if there isn't a watch. |
Watch |
getWatch(User user,
ForumCategory category)
Returns a watch on a particular category, or null if there isn't a watch. |
Watch |
getWatch(User user,
ForumThread thread)
Returns a watch on a particular thread, or null if there isn't a watch. |
Watch |
getWatch(User user,
User watchedUser)
Returns a watch on a particular thread, or null if there isn't a watch. |
int |
getWatchCount(User user,
Forum forum)
Return the count of all thread watches in a particular forum for the given user. |
int |
getWatchCount(User user,
ForumCategory category)
Return the count of all forum watches in a particular category for the given user. |
java.util.Iterator |
getWatchers(int objectType,
long objectID)
Returns an Iterator of User objects who are watching the specified object. |
java.util.Iterator |
getWatches(User user,
Forum forum)
Returns an Iterator for all the thread objects a user is watching in a forum. |
java.util.Iterator |
getWatches(User user,
ForumCategory category)
Returns an Iterator for all the forum objects a user is watching in a category. |
java.util.Iterator |
getWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
Returns the Forums watched by the User under the given Category. |
java.util.Iterator |
getWatches(User user,
Forum forum,
int startIndex,
int numResults)
Returns all the ForumThreads watched by the User under the given Forum. |
Watch[] |
getWatchList(User user,
int objectType)
Returns the watch list of a particular object type for a user. |
void |
initialize()
Initialize the manager. |
boolean |
isWatched(User user,
Forum forum)
Returns true if the user is watching the specified forum. |
boolean |
isWatched(User user,
ForumCategory category)
Returns true if the user is watching the specified category. |
boolean |
isWatched(User user,
ForumThread thread)
Returns true if the user is watching the specified thread. |
boolean |
isWatched(User user,
User watchedUser)
Returns true if the user is watching the specified user. |
void |
notifyWatchUpdate(ForumMessage message)
|
void |
setDeleteDays(int deleteDays)
Sets the number of days that a watched object can remain inactive before watches on that object are deleted. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DbWatchManager()
| Method Detail |
|---|
public void initialize()
JiveManagerThis method is used internally by Jive during application startup and should not be called during normal usage of the class.
initialize in interface JiveManagerpublic void destroy()
JiveManager
destroy in interface JiveManagerpublic int getDeleteDays()
WatchManager
getDeleteDays in interface WatchManagerpublic void setDeleteDays(int deleteDays)
WatchManager
setDeleteDays in interface WatchManagerdeleteDays - the number days a watch can be inactive before being
automatically deleted.public void demoteBatchWatches()
public Watch createWatch(User user,
User watchedUser)
WatchManager
createWatch in interface WatchManageruser - the user to set the watch for.watchedUser - the user to watch.
public Watch createWatch(User user,
ForumThread thread)
WatchManager
createWatch in interface WatchManageruser - the user to set the watch for.thread - the thread to watch.
public Watch createWatch(User user,
Forum forum)
WatchManager
createWatch in interface WatchManageruser - the user to set the watch for.forum - the forum to watch.
public Watch createWatch(User user,
ForumCategory category)
WatchManager
createWatch in interface WatchManageruser - the user to set the watch for.category - the category to watch.
public int getTotalWatchCount(User user,
int objectType)
WatchManager
getTotalWatchCount in interface WatchManageruser - the user to get the watch count for.objectType - the object type to get a watch count for.
public Watch[] getWatchList(User user,
int objectType)
getWatchList in interface WatchManageruser - the user.objectType - the object type.
public java.util.Iterator getAllWatches(User user,
int objectType)
WatchManager
getAllWatches in interface WatchManageruser - the user.objectType - the object type.
public int getWatchCount(User user,
Forum forum)
WatchManager
getWatchCount in interface WatchManageruser - the user to return the watch count for.
public int getWatchCount(User user,
ForumCategory category)
WatchManager
getWatchCount in interface WatchManageruser - the user to return the watch count for.category - the category to return the watch count for.
public java.util.Iterator getWatches(User user,
ForumCategory category)
throws UnauthorizedException
WatchManager
getWatches in interface WatchManageruser - the user.category - the category.
UnauthorizedException - if not a system admin or the user.
public java.util.Iterator getWatches(User user,
Forum forum)
WatchManager
getWatches in interface WatchManageruser - the user.forum - the forum.
public java.util.Iterator getWatches(User user,
Forum forum,
int startIndex,
int numResults)
WatchManager
getWatches in interface WatchManageruser - the user.forum - the forum to begin looking for watches.startIndex - the start index.numResults - the number of results to return.
public java.util.Iterator getWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
WatchManager
getWatches in interface WatchManageruser - the user.category - the category to begin looking for watches.startIndex - the start index.numResults - the number of results to return
public java.util.Iterator getRecursiveForumWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
WatchManager
getRecursiveForumWatches in interface WatchManageruser - the user.category - the category to begin looking for watches.startIndex - the start index.numResults - the number of results to return.
public java.util.Iterator getThreadWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
WatchManager
getThreadWatches in interface WatchManageruser - the user.category - the category to begin looking for watches.startIndex - the start index.numResults - the number of results to return.
public java.util.Iterator getRecursiveThreadWatches(User user,
ForumCategory category,
int startIndex,
int numResults)
WatchManager
getRecursiveThreadWatches in interface WatchManageruser - the user.category - the category to begin looking for watches.startIndex - the start index.numResults - the number of results to return.
public Watch getWatch(User user,
User watchedUser)
WatchManager
getWatch in interface WatchManageruser - the user with the watch.watchedUser - the user being watched.
public Watch getWatch(User user,
ForumThread thread)
WatchManager
getWatch in interface WatchManageruser - the user with the watch.thread - the thread being watched.
public Watch getWatch(User user,
Forum forum)
WatchManager
getWatch in interface WatchManageruser - the user with the watch.forum - the forum being watched.
public Watch getWatch(User user,
ForumCategory category)
WatchManager
getWatch in interface WatchManageruser - the user with the watch.category - the category being watched.
public boolean isWatched(User user,
ForumCategory category)
WatchManager
isWatched in interface WatchManageruser - the User watching the object.category - the category to check.
public boolean isWatched(User user,
Forum forum)
WatchManager
isWatched in interface WatchManageruser - the User watching the object.forum - the forum to check.
public boolean isWatched(User user,
ForumThread thread)
WatchManager
isWatched in interface WatchManageruser - the User watching the object.thread - the thread to check.
public boolean isWatched(User user,
User watchedUser)
WatchManager
isWatched in interface WatchManageruser - the User watching the object.watchedUser - the user to check.
public void deleteWatch(Watch watch)
WatchManager
deleteWatch in interface WatchManagerwatch - the watch to delete.
public void deleteWatches(int objectType,
long objectID)
public void deleteThreadWatches(long forumID)
forumID - the forum.public void deleteWatches(User user)
WatchManager
deleteWatches in interface WatchManageruser - the user.public void notifyWatchUpdate(ForumMessage message)
public java.util.Iterator getWatchers(int objectType,
long objectID)
getWatchers in interface WatchManagerobjectType - the object type.objectID - the object ID.
|
Jive Forums Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||