|
Clearspace API (2.5.29) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WatchManager
Manages watches on jive objects. 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(int objectType,
long objectID)
Deletes all watches on the given objectType and objectID. |
|
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,
JiveContainer container)
Return the count of all watches in a particular container for the given user. |
|
JiveIterator<JiveObject> |
getWatches(User user,
JiveContainer container)
Returns an Iterable for all the objects a user is watching in a container. |
|
List<Watch> |
getWatchList(User user,
int objectType)
Returns an array of Watch objects for a particular object type that the given user is watching. |
|
JiveIterator<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. |
|
void |
update(Watch watch)
Persists the watches settings |
|
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| 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,
JiveContainer container)
throws UnauthorizedException
user - the user to return the watch count for.container - the container to return the watch count for.
UnauthorizedException - if not a system admin or the user.
int getTotalWatchCount(User user,
int objectType)
throws UnauthorizedException
JiveConstants.THREADJiveConstants.COMMUNITYJiveConstants.PROJECTJiveConstants.TASKJiveConstants.SOCIAL_GROUPJiveConstants.USERJiveConstants.DOCUMENTJiveConstants.DOCUMENT_TYPEJiveConstants.SEARCH_QUERYJiveConstants.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.THREADJiveConstants.COMMUNITYJiveConstants.PROJECTJiveConstants.TASKJiveConstants.SOCIAL_GROUPJiveConstants.USERJiveConstants.DOCUMENTJiveConstants.DOCUMENT_TYPEJiveConstants.SEARCH_QUERYJiveConstants.BLOG
user - the user to get the watch count for.
UnauthorizedException - if not a system admin or the user.
List<Watch> getWatchList(User user,
int objectType)
JiveConstants.THREADJiveConstants.COMMUNITYJiveConstants.PROJECTJiveConstants.TASKJiveConstants.SOCIAL_GROUPJiveConstants.USERJiveConstants.DOCUMENTJiveConstants.DOCUMENT_TYPEJiveConstants.SEARCH_QUERYJiveConstants.BLOG
user - the user to retrieve watches forobjectType - the object type.
<A extends JiveObject> Iterable<A> getAllWatches(User user,
int objectType)
throws UnauthorizedException
JiveConstants.THREADJiveConstants.COMMUNITYJiveConstants.PROJECTJiveConstants.TASKJiveConstants.SOCIAL_GROUPJiveConstants.USERJiveConstants.DOCUMENTJiveConstants.DOCUMENT_TYPEJiveConstants.SEARCH_QUERYJiveConstants.BLOG
user - the user.objectType - the object type.
UnauthorizedException - if not a system admin or the user.
<A extends JiveObject> Iterable<A> getAllWatches(User user)
throws UnauthorizedException
JiveConstants.THREADJiveConstants.COMMUNITYJiveConstants.PROJECTJiveConstants.TASKJiveConstants.SOCIAL_GROUPJiveConstants.USERJiveConstants.DOCUMENTJiveConstants.DOCUMENT_TYPEJiveConstants.SEARCH_QUERYJiveConstants.BLOG
user - the user.
UnauthorizedException - if not a system admin or the user.
JiveIterator<JiveObject> getWatches(User user,
JiveContainer container)
throws UnauthorizedException
user - the user.container - the container.
UnauthorizedException - if not a system admin or the user.
Watch getWatch(User user,
JiveObject jiveObject)
throws UnauthorizedException
JiveObject, or null if there isn't a watch.
user - the user with the watch.jiveObject - the jive object being watched.
UnauthorizedException - if not a system admin or the user.
JiveIterator<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.
void deleteWatches(int objectType,
long objectID)
throws UnauthorizedException
objectType - the type of object being watchedobjectID - the ID of the object being watched
UnauthorizedException - if not a system admin or user admin.
com.jivesoftware.community.impl.dao.WatchSettingsBean getSettings(User user)
throws UnauthorizedException
user - the user to return a watch settings object for
UnauthorizedException - if not a system admin or the user.
void saveSettings(User user,
com.jivesoftware.community.impl.dao.WatchSettingsBean settings)
throws UnauthorizedException
user - the user to save the watch settings forsettings - the watch settings to save
UnauthorizedException - if not a system admin or the user.
void deleteSettings(User user)
throws UnauthorizedException
user - the user to delete the watch settings for
UnauthorizedException - if not a system admin or the user.
void update(Watch watch)
throws UnauthorizedException
watch - The watch to persist.
UnauthorizedException - if not a system admin or the user owning the watch
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||