|
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 WatchManager
Manages watches on communities, 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,
JiveObject jiveObject)
Create a watch on a jive object for the specified user. |
|
void |
deleteSettings(User user)
Delete the watch settings for a user |
|
void |
deleteWatch(Watch watch)
Delete the specified watch. |
|
void |
deleteWatches(User user)
Deletes all watches that a user has. |
|
|
getAllWatches(User user)
Returns an iterable for all objects that a user is watching. |
|
|
getAllWatches(User user,
int objectType)
Returns an iterable 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. |
|
com.jivesoftware.community.impl.dao.WatchSettingsBean |
getSettings(User user)
Retrieve a watch settings for the given user |
|
int |
getTotalWatchCount(User user)
Returns a count of all watches that a user has for all types. |
|
int |
getTotalWatchCount(User user,
int objectType)
Returns a count of all watches that a user has of a particular type. |
|
Watch |
getWatch(User user,
JiveObject jiveObject)
Returns a watch on a particular JiveObject, or null if there isn't a watch. |
|
int |
getWatchCount(User user,
Community community)
Return the count of all forum watches in a particular community for the given user. |
|
JiveIterator<JiveObject> |
getWatches(User user,
Community community)
Returns an Iterable for all the Community objects a user is watching in a community. |
|
java.util.List<Watch> |
getWatchList(User user,
int objectType)
Returns an array of Watch objects for a particular object type that the given user is watching. |
|
java.lang.Iterable<User> |
getWatchUsers(int objectType,
long objectID,
int watchType)
Returns all the users watching a specific objectType, objectID, and watchType. |
|
boolean |
isWatched(User user,
JiveObject jiveObject)
Returns true if the user is watching the specified jive object. |
|
void |
saveSettings(User user,
com.jivesoftware.community.impl.dao.WatchSettingsBean settings)
Save the watch settings for a user |
|
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 interface com.jivesoftware.community.JiveManager |
|---|
destroy, initialize |
| 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,
JiveObject jiveObject)
throws UnauthorizedException
user - the user to set the watch for.jiveObject - the jive object to create a watch on.
UnauthorizedException - if not an admin or the user.
int getWatchCount(User user,
Community community)
throws UnauthorizedException
user - the user to return the watch count for.community - the community to return the watch count for.
UnauthorizedException - if not a system admin or the user.
int getTotalWatchCount(User user,
int objectType)
throws UnauthorizedException
JiveConstants.THREAD
JiveConstants.COMMUNITY
JiveConstants.USER
JiveConstants.DOCUMENT
JiveConstants.DOCUMENT_TYPE
JiveConstants.SEARCH_QUERY
JiveConstants.BLOG
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.
int getTotalWatchCount(User user)
throws UnauthorizedException
JiveConstants.THREAD
JiveConstants.COMMUNITY
JiveConstants.USER
JiveConstants.DOCUMENT
JiveConstants.DOCUMENT_TYPE
JiveConstants.SEARCH_QUERY
JiveConstants.BLOG
user - the user to get the watch count for.
UnauthorizedException - if not a system admin or the user.
java.util.List<Watch> getWatchList(User user,
int objectType)
JiveConstants.THREAD
JiveConstants.COMMUNITY
JiveConstants.USER
JiveConstants.DOCUMENT
JiveConstants.DOCUMENT_TYPE
JiveConstants.SEARCH_QUERY
JiveConstants.BLOG
user - the user to retrieve watches forobjectType - the object type.
<A extends JiveObject> java.lang.Iterable<A> getAllWatches(User user,
int objectType)
throws UnauthorizedException
JiveConstants.THREAD
JiveConstants.COMMUNITY
JiveConstants.USER
JiveConstants.DOCUMENT
JiveConstants.DOCUMENT_TYPE
JiveConstants.SEARCH_QUERY
JiveConstants.BLOG
user - the user.objectType - the object type.
UnauthorizedException - if not a system admin or the user.
<A extends JiveObject> java.lang.Iterable<A> getAllWatches(User user)
throws UnauthorizedException
JiveConstants.THREAD
JiveConstants.COMMUNITY
JiveConstants.USER
JiveConstants.DOCUMENT
JiveConstants.DOCUMENT_TYPE
JiveConstants.SEARCH_QUERY
JiveConstants.BLOG
user - the user.
UnauthorizedException - if not a system admin or the user.
JiveIterator<JiveObject> getWatches(User user,
Community community)
throws UnauthorizedException
user - the user.community - the community.
UnauthorizedException - if not a system admin or the user.
Watch getWatch(User user,
JiveObject jiveObject)
JiveObject, or null if there isn't a watch.
user - the user with the watch.jiveObject - the jive object being watched.
java.lang.Iterable<User> getWatchUsers(int objectType,
long objectID,
int watchType)
objectType - the type of object being watched.objectID - the ID of the object being watched.watchType - the type of watch.
boolean isWatched(User user,
JiveObject jiveObject)
user - the user watching the object.jiveObject - The jive object to check.
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 - if not a system admin or the user owning the watch.com.jivesoftware.community.impl.dao.WatchSettingsBean getSettings(User user)
user - the user to return a watch settings object for
void saveSettings(User user,
com.jivesoftware.community.impl.dao.WatchSettingsBean settings)
user - the user to save the watch settings forsettings - the watch settings to savevoid deleteSettings(User user)
user - the user to delete the watch settings for
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||