|
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 |
public interface WatchManager
Manages watches on categories, forums, and threads. A watch is a way for a user to track updates to an object. Users add watches on individual objects and can specify whether or not they want to be notified by email each time the object is updated.
Because the number of watches could build up and overload the system over time, watches are automatically deleted after the objects they are attached to are inactive for a certain number of days or if the object expires. Individual watches can be toggled to be undeletable so that it is possible to circumvent this behavior.
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 |
deleteWatch(Watch watch)
Delete the specified watch. |
void |
deleteWatches(User user)
Deletes all watches that a user has. |
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. |
int |
getRecursiveForumWatchCount(User user,
ForumCategory category)
Returns number of Forum objects the user is watching under the category and its subcategories. |
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. |
int |
getRecursiveThreadWatchCount(User user,
ForumCategory category)
Returns the number of ForumThread objects the user is watching under the provided ForumCategory. |
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 all the Users 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 an array of Watch objects for a particular object type that the given user is watching. |
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 |
setDeleteDays(int deleteDays)
Sets the number of days that a watched object can remain inactive before watches on that object are deleted. |
Method Detail |
---|
int getDeleteDays()
void setDeleteDays(int deleteDays) throws UnauthorizedException
deleteDays
- the number days a watch can be inactive before being
automatically deleted.
UnauthorizedException
- if not a system admin.Watch createWatch(User user, User watchedUser) throws UnauthorizedException
user
- the user to set the watch for.watchedUser
- the user to watch.
UnauthorizedException
- if not an admin or the user.Watch createWatch(User user, ForumThread thread) throws UnauthorizedException
user
- the user to set the watch for.thread
- the thread to watch.
UnauthorizedException
- if not an admin or the user.Watch createWatch(User user, Forum forum) throws UnauthorizedException
user
- the user to set the watch for.forum
- the forum to watch.
UnauthorizedException
- if not an admin or the user.Watch createWatch(User user, ForumCategory category) throws UnauthorizedException
user
- the user to set the watch for.category
- the category to watch.
UnauthorizedException
- if not an admin or the user.int getWatchCount(User user, Forum forum) throws UnauthorizedException
user
- the user to return the watch count for.
UnauthorizedException
- if not a system admin or the user.int getWatchCount(User user, ForumCategory category) throws UnauthorizedException
user
- the user to return the watch count for.category
- the category to return the watch count for.
UnauthorizedException
- if not a system admin or the user.int getTotalWatchCount(User user, int objectType) throws UnauthorizedException
user
- the user to get the watch count for.objectType
- the object type to get a watch count for.
UnauthorizedException
- if not a system admin or the user.Watch[] getWatchList(User user, int objectType)
user
- the user to retrieve watches forobjectType
- the object type.
java.util.Iterator getAllWatches(User user, int objectType) throws UnauthorizedException
user
- the user.objectType
- the object type.
UnauthorizedException
- if not a system admin or the user.java.util.Iterator getWatches(User user, Forum forum) throws UnauthorizedException
user
- the user.forum
- the forum.
UnauthorizedException
- if not a system admin or the user.java.util.Iterator getWatches(User user, ForumCategory category) throws UnauthorizedException
user
- the user.category
- the category.
UnauthorizedException
- if not a system admin or the user.Watch getWatch(User user, User watchedUser) throws UnauthorizedException
user
- the user with the watch.watchedUser
- the user being watched.
UnauthorizedException
- if not a system admin or the user.Watch getWatch(User user, ForumThread thread) throws UnauthorizedException
user
- the user with the watch.thread
- the thread being watched.
UnauthorizedException
- if not a system admin or the user.Watch getWatch(User user, Forum forum) throws UnauthorizedException
user
- the user with the watch.forum
- the forum being watched.
UnauthorizedException
- if not a system admin or the user.Watch getWatch(User user, ForumCategory category) throws UnauthorizedException
user
- the user with the watch.category
- the category being watched.
UnauthorizedException
- if not a system admin or the user.boolean isWatched(User user, ForumCategory category) throws UnauthorizedException
user
- the User watching the object.category
- the category to check.
UnauthorizedException
- if not a system admin or the user.boolean isWatched(User user, Forum forum) throws UnauthorizedException
user
- the User watching the object.forum
- the forum to check.
UnauthorizedException
- if not a system admin or the user.boolean isWatched(User user, ForumThread thread) throws UnauthorizedException
user
- the User watching the object.thread
- the thread to check.
UnauthorizedException
- if not a system admin or the user.boolean isWatched(User user, User watchedUser) throws UnauthorizedException
user
- the User watching the object.watchedUser
- the user to check.
UnauthorizedException
- if not a system admin or the user.void deleteWatch(Watch watch) throws UnauthorizedException
watch
- the watch to delete.
UnauthorizedException
- if not a system admin or the user owning the watch.void deleteWatches(User user) throws UnauthorizedException
user
- the user.
UnauthorizedException
java.util.Iterator getWatchers(int objectType, long objectID) throws UnauthorizedException
objectID
- the ID of the object.objectType
- the type of the object from JiveConstants.
UnauthorizedException
- if not a system adminjava.util.Iterator getWatches(User user, Forum forum, int startIndex, int numResults)
user
- the user.forum
- the forum to begin looking for watches.startIndex
- the start index.numResults
- the number of results to return.
java.util.Iterator getWatches(User user, ForumCategory category, int startIndex, int numResults)
user
- the user.category
- the category to begin looking for watches.startIndex
- the start index.numResults
- the number of results to return
java.util.Iterator getRecursiveForumWatches(User user, ForumCategory category, int startIndex, int numResults)
user
- the user.category
- the category to begin looking for watches.startIndex
- the start index.numResults
- the number of results to return.
int getRecursiveForumWatchCount(User user, ForumCategory category)
user
- the user.category
- the category to begin looking for watches.
java.util.Iterator getThreadWatches(User user, ForumCategory category, int startIndex, int numResults)
user
- the user.category
- the category to begin looking for watches.startIndex
- the start index.numResults
- the number of results to return.
java.util.Iterator getRecursiveThreadWatches(User user, ForumCategory category, int startIndex, int numResults)
user
- the user.category
- the category to begin looking for watches.startIndex
- the start index.numResults
- the number of results to return.
int getRecursiveThreadWatchCount(User user, ForumCategory category)
user
- the user.category
- the category to begin looking for watches.
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |