|
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 PresenceManager
The presence manager creates presences and keeps track on a global basis who's online. Also included is the ability to enable or disable global presence support.
| Field Summary | |
|---|---|
static int |
SORT_ONLINE_TIME
Sort by online time. |
static int |
SORT_USERNAME
Sort by username. |
| Method Summary | |
|---|---|
Presence |
createPresence(User user,
String uid,
String IPAddress)
Create a presence for a user. |
void |
deletePresence(User user)
Remove the given user's presence and roster entry. |
int |
getOnlineUserCount()
Returns the number of users who are currently online. |
int |
getOnlineUserCount(Group group)
Returns the number of users in the group who are currently online. |
Iterator<User> |
getOnlineUsers()
Returns an iterator of users who are currently online. |
Iterator<User> |
getOnlineUsers(boolean ascending,
int sortField)
Returns an iterator of users sorted in the manner requested who are currently online. |
Iterator<User> |
getOnlineUsers(boolean ascending,
int sortField,
int numResults)
Returns an iterator of users who are currently online matching the criteria given. |
Iterator<User> |
getOnlineUsers(boolean ascending,
int sortField,
int start,
int numResults)
Returns an iterator of users who are currently online matching the criteria given. |
Iterator<User> |
getOnlineUsers(Group group)
Returns an iterator of users in the group who are currently online. |
Iterator<User> |
getOnlineUsers(Group group,
boolean ascending,
int sortField)
Returns an iterator of users sorted in the manner requested who are currently online. |
Iterator<User> |
getOnlineUsers(Group group,
boolean ascending,
int sortField,
int numResults)
Returns an iterator of users who are currently online matching the criteria given. |
Presence |
getPresence(User user)
Returns the presence for the user, or null if the user isn't online. |
Roster |
getRoster(User user)
Returns the user's roster. |
boolean |
isOnline(User user)
Returns whether the user is currently online or not. |
boolean |
isPresencesEnabled()
Returns whether presences are enabled on a global basis or not. |
void |
setOffline(Presence presence)
Sets a presence to be offline which causes the presence to be removed from the system. |
void |
setPresencesEnabled(boolean enabled)
Sets whether presences are enabled on a global basis or not. |
| Methods inherited from interface com.jivesoftware.community.JiveManager |
|---|
destroy |
| Field Detail |
|---|
static final int SORT_USERNAME
static final int SORT_ONLINE_TIME
| Method Detail |
|---|
boolean isPresencesEnabled()
void setPresencesEnabled(boolean enabled)
throws UnauthorizedException
enabled - true if presences should be enabled, false otherwise.
UnauthorizedException - if not a system administrator.int getOnlineUserCount()
int getOnlineUserCount(Group group)
group - the group to return the online user count.
boolean isOnline(User user)
user - the user to check to see if they're online.
Iterator<User> getOnlineUsers()
Iterator<User> getOnlineUsers(Group group)
group - the group to return the online users.
Iterator<User> getOnlineUsers(boolean ascending,
int sortField)
ascending - sort ascending if true, descending if false.sortField - a valid sort field from the PresenceManager interface.
Iterator<User> getOnlineUsers(Group group,
boolean ascending,
int sortField)
group - the group to return the online users.ascending - sort ascending if true, descending if false.sortField - a valid sort field from the PresenceManager interface.
Iterator<User> getOnlineUsers(boolean ascending,
int sortField,
int numResults)
ascending - sort ascending if true, descending if false.sortField - a valid sort field from the PresenceManager interface.numResults - - the number of results to return.
Iterator<User> getOnlineUsers(boolean ascending,
int sortField,
int start,
int numResults)
ascending - sort ascending if true, descending if false.sortField - a valid sort field from the PresenceManager interface.start - the index into the sorted set of users to start iterating from.numResults - - the number of results to return.
Iterator<User> getOnlineUsers(Group group,
boolean ascending,
int sortField,
int numResults)
group - the group to narrow users down toascending - sort ascending if true, descending if false.sortField - a valid sort field from the PresenceManager interface.numResults - - the number of results to return.
Presence getPresence(User user)
user - the user to return the presence for.
Roster getRoster(User user)
throws UnauthorizedException
user - the user to return the roster for.
UnauthorizedException - if not the user or an administrator.
Presence createPresence(User user,
String uid,
String IPAddress)
throws UnauthorizedException
The uid should be unique within the application instance. A good source of a uid is the servlet session id.
user - the user to create a presence for.uid - a unique string.IPAddress - the IP address of the user.
UnauthorizedException - if not the user.
void deletePresence(User user)
throws UnauthorizedException
user - having their presence removed
UnauthorizedException - If currently authenticated user is not a sys-admin.
void setOffline(Presence presence)
throws UnauthorizedException
presence - to presence to set to be offline.
UnauthorizedException - if not the user.
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||