|
Clearspace API (2.0.15) Web Services Client Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WatchService
A service for manipulating a user's watches on objects.
| Field Summary | |
|---|---|
static int |
OBJECT_COMMUNITY
An integer representing Community objects. |
static int |
OBJECT_THREAD
An integer representing Forum Thread objects. |
static int |
OBJECT_USER
An integer representing User objects. |
| Method Summary | |
|---|---|
WSWatch |
createCommunityWatch(long userID,
long communityID)
Create a watch on a community for the specified user. |
WSWatch |
createThreadWatch(long userID,
long threadID)
Create a watch on a thread for the specified user. |
WSWatch |
createUserWatch(long userID,
long watchedUserID)
Create a watch on a user for the specified user. |
void |
deleteWatch(WSWatch watch)
Delete the specified watch. |
void |
deleteWatches(long userID)
Deletes all watches that a user has. |
WSWatch |
getCommunityWatch(long userID,
long communityID)
Returns a watch on a particular community, or null if there isn't a watch. |
int |
getCommunityWatchCount(long userID,
long communityID)
Return the count of all community watches in a particular communityID for the given userID. |
long[] |
getCommunityWatches(long userID,
long communityID)
Returns an array of IDs for all the community objects a user is watching in a community. |
int |
getDeleteDays()
Returns the number of days that a watched object can remain inactive before watches on that object are deleted. |
WSWatch |
getThreadWatch(long userID,
long threadID)
Returns a watch on a particular thread, or null if there isn't a watch. |
int |
getTotalWatchCount(long userID,
int objectType)
Returns a count of all watches that a userID has of a particular type. |
WSWatch |
getUserWatch(long userID,
long watchedUserID)
Returns a watch on a particular user, or null if there isn't a watch. |
java.util.List<WSWatch> |
getWatchList(long userID,
int objectType)
Returns an array of Watch objects for a particular object type that the given user is watching. |
java.util.List<WSUser> |
getWatchUsers(int objectType,
long objectID,
int watchType)
Returns all the users who are watching this objectType and objectID. |
boolean |
isCommunityWatched(long userID,
long communityID)
Returns true if the user is watching the specified community. |
boolean |
isThreadWatched(long userID,
long threadID)
Returns true if the user is watching the specified thread. |
boolean |
isUserWatched(long userID,
long watchedUserID)
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. |
| Field Detail |
|---|
static final int OBJECT_THREAD
static final int OBJECT_COMMUNITY
static final int OBJECT_USER
| Method Detail |
|---|
int getDeleteDays()
void setDeleteDays(int deleteDays)
deleteDays - The number days a watch can be inactive before being automatically deleted.
WSWatch createUserWatch(long userID,
long watchedUserID)
throws UserNotFoundException
userID - The ID of the user to set the watch for.watchedUserID - The ID of the user to watch.
UserNotFoundException - if the user represented by either userid doesn't exist
WSWatch createThreadWatch(long userID,
long threadID)
throws UserNotFoundException,
ForumThreadNotFoundException
userID - The ID of the user to set the watch for.threadID - The ID of thread to watch.
UserNotFoundException - if the user represented by the user id doesn't exist
ForumThreadNotFoundException - if the thread the user is trying to watch doesn't exist
WSWatch createCommunityWatch(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - The ID of the user to set the watch for.communityID - The ID of the community to watch.
UserNotFoundException - if the user represented by the user id doesn't exist
CommunityNotFoundException - if the community represented by the community id doesn't exist
int getCommunityWatchCount(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - The userID to return the watch count for.communityID - The communityID to return the watch count for.
UnauthorizedException - if not a system admin or the userID.
UserNotFoundException - if the user represented by the user id doesn't exist
CommunityNotFoundException - if the community represented by the community id doesn't exist
int getTotalWatchCount(long userID,
int objectType)
throws UserNotFoundException
userID - The ID of the user to get the watch count for.objectType - The object type to get a watch count for.
UserNotFoundException - if the user represented by the user id doesn't exist
java.util.List<WSWatch> getWatchList(long userID,
int objectType)
throws UserNotFoundException
userID - the userID to retrieve watches forobjectType - the object type.
UserNotFoundException - if the user represented by the userid doesn't exist
long[] getCommunityWatches(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - The ID of the user.communityID - The ID of the community.
UserNotFoundException - if the user represented by the user id doesn't exist
CommunityNotFoundException - if the community represented by the community id doesn't exist
WSWatch getUserWatch(long userID,
long watchedUserID)
throws UserNotFoundException
userID - the userID with the watch.watchedUserID - the userID being watched.
UserNotFoundException - if the user represented by either userid doesn't exists*
WSWatch getThreadWatch(long userID,
long threadID)
throws UserNotFoundException,
ForumThreadNotFoundException
userID - The ID of the user with the watch.threadID - The ID of the thread being watched.
UserNotFoundException - if the user represented by the userid doesn't exist
ForumThreadNotFoundException - if the thread we're trying to watch doesn't exist
WSWatch getCommunityWatch(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - The ID of the user to acquire a watch for.communityID - The ID of the community to acquire the watch for.
UserNotFoundException - if the user represented by the user id doesn't exist
CommunityNotFoundException - if the community represented by the community id doesn't exist
boolean isCommunityWatched(long userID,
long communityID)
throws UserNotFoundException,
CommunityNotFoundException
userID - The ID of the user.communityID - The ID of the community.
UserNotFoundException - if the user represented by the user id doesn't exists
CommunityNotFoundException - if the community represented by the community id doesn't exist
boolean isThreadWatched(long userID,
long threadID)
throws NotFoundException
userID - The ID of the user.threadID - The ID of the thread.
com.jivesoftware.community.NotFoundException - if either the user or thread doesn't exist
NotFoundException
boolean isUserWatched(long userID,
long watchedUserID)
throws UserNotFoundException
userID - The ID of the user.watchedUserID - The ID of the watched user.
UserNotFoundException - if the user represented by either userid doesn't exist
void deleteWatch(WSWatch watch)
throws NotFoundException
watch - The watch to delete.
com.jivesoftware.community.NotFoundException - if the watch are trying to delete doesn't exist
NotFoundException
void deleteWatches(long userID)
throws UserNotFoundException
userID - The ID of the user.
UserNotFoundException - if the user whose watches we are trying to delete doesn't exist
java.util.List<WSUser> 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 (EMAIL, BATCH).
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||