Jive Forums API (5.5.20.2-oracle) Core Javadocs

com.jivesoftware.base
Interface Roster


public interface Roster

A roster is a list of users that the user wishes to know if they are online. Rosters are similar to buddy groups in popular IM clients.


Method Summary
 void addUser(User user)
          Add a user to the roster.
 int getOnlineUserCount()
          Returns the number of users in the roster who are currently online.
 java.util.Iterator getOnlineUsers()
          Returns an iterator of users in the roster who are currently online.
 java.util.Iterator getOnlineUsers(boolean ascending, int sortField)
          Returns an iterator of users sorted in the manner requested who are currently online.
 java.util.Iterator getOnlineUsers(boolean ascending, int sortField, int numResults)
          Returns an iterator of users who are currently online matching the criteria given.
 int getTotalUserCount()
          Returns the total number of users in the roster.
 User getUser()
          Returns the user that this roster belongs to.
 java.util.Iterator getUsers()
          Returns an iterator of users in this roster.
 boolean isRosterMember(User user)
          Returns true if the specified user is a member of the roster, false otherwise.
 void removeUser(User user)
          Remove a user from the roster.
 

Method Detail

getUser

User getUser()
Returns the user that this roster belongs to.

Returns:
the user that this roster belongs to.

isRosterMember

boolean isRosterMember(User user)
Returns true if the specified user is a member of the roster, false otherwise.

Parameters:
user - the user object to check.
Returns:
true if the specified user is a member of the roster, false otherwise.

getUsers

java.util.Iterator getUsers()
                            throws UnauthorizedException
Returns an iterator of users in this roster.

Returns:
an iterator of users in this roster.
Throws:
UnauthorizedException

getTotalUserCount

int getTotalUserCount()
                      throws UnauthorizedException
Returns the total number of users in the roster.

Returns:
the number of online users in the roster.
Throws:
UnauthorizedException

getOnlineUserCount

int getOnlineUserCount()
                       throws UnauthorizedException
Returns the number of users in the roster who are currently online. Online users with a presence status set to invisible will not be included.

Returns:
the number of online users in the roster.
Throws:
UnauthorizedException

getOnlineUsers

java.util.Iterator getOnlineUsers()
                                  throws UnauthorizedException
Returns an iterator of users in the roster who are currently online. Online users with a presence statas set to invisible will not be included.

Returns:
an iterator of online users in the roster.
Throws:
UnauthorizedException

getOnlineUsers

java.util.Iterator getOnlineUsers(boolean ascending,
                                  int sortField)
Returns an iterator of users sorted in the manner requested who are currently online. Online users with a presence status other that online or idle will not be included.

Parameters:
ascending - sort ascending if true, descending if false.
sortField - a valid sort field from the PresenceManager interface.
Returns:
an iterator of online users.

getOnlineUsers

java.util.Iterator getOnlineUsers(boolean ascending,
                                  int sortField,
                                  int numResults)
Returns an iterator of users who are currently online matching the criteria given. Online users with a presence status other than online or idle will not be included.

Parameters:
ascending - sort ascending if true, descending if false.
sortField - a valid sort field from the PresenceManager interface.
numResults - - the number of results to return.
Returns:
an iterator of online users matching the given criteria.

addUser

void addUser(User user)
             throws UnauthorizedException
Add a user to the roster.

Parameters:
user - the user to add to the roster.
Throws:
UnauthorizedException - if not the user or an administrator.

removeUser

void removeUser(User user)
                throws UnauthorizedException
Remove a user from the roster.

Parameters:
user - the user to remove from the roster.
Throws:
UnauthorizedException - if not the user or an administrator.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.