Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base
Class RosterProxy

java.lang.Object
  extended by com.jivesoftware.base.RosterProxy
All Implemented Interfaces:
Roster

public class RosterProxy
extends java.lang.Object
implements Roster

Protection proxy for the Roster interface. It restricts access of certain methods to those that have the proper permissions to administer this object.


Constructor Summary
RosterProxy(Roster roster, AuthToken authToken, Permissions permissions)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RosterProxy

public RosterProxy(Roster roster,
                   AuthToken authToken,
                   Permissions permissions)
Method Detail

getUser

public User getUser()
Description copied from interface: Roster
Returns the user that this roster belongs to.

Specified by:
getUser in interface Roster
Returns:
the user that this roster belongs to.

isRosterMember

public boolean isRosterMember(User user)
Description copied from interface: Roster
Returns true if the specified user is a member of the roster, false otherwise.

Specified by:
isRosterMember in interface Roster
Parameters:
user - the user object to check.
Returns:
true if the specified user is a member of the roster, false otherwise.

getUsers

public java.util.Iterator getUsers()
                            throws UnauthorizedException
Description copied from interface: Roster
Returns an iterator of users in this roster.

Specified by:
getUsers in interface Roster
Returns:
an iterator of users in this roster.
Throws:
UnauthorizedException

getTotalUserCount

public int getTotalUserCount()
                      throws UnauthorizedException
Description copied from interface: Roster
Returns the total number of users in the roster.

Specified by:
getTotalUserCount in interface Roster
Returns:
the number of online users in the roster.
Throws:
UnauthorizedException

getOnlineUserCount

public int getOnlineUserCount()
                       throws UnauthorizedException
Description copied from interface: Roster
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.

Specified by:
getOnlineUserCount in interface Roster
Returns:
the number of online users in the roster.
Throws:
UnauthorizedException

getOnlineUsers

public java.util.Iterator getOnlineUsers()
                                  throws UnauthorizedException
Description copied from interface: Roster
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.

Specified by:
getOnlineUsers in interface Roster
Returns:
an iterator of online users in the roster.
Throws:
UnauthorizedException

getOnlineUsers

public java.util.Iterator getOnlineUsers(boolean ascending,
                                         int sortField)
Description copied from interface: Roster
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.

Specified by:
getOnlineUsers in interface Roster
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

public java.util.Iterator getOnlineUsers(boolean ascending,
                                         int sortField,
                                         int numResults)
Description copied from interface: Roster
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.

Specified by:
getOnlineUsers in interface Roster
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

public void addUser(User user)
             throws UnauthorizedException
Description copied from interface: Roster
Add a user to the roster.

Specified by:
addUser in interface Roster
Parameters:
user - the user to add to the roster.
Throws:
UnauthorizedException - if not the user or an administrator.

removeUser

public void removeUser(User user)
                throws UnauthorizedException
Description copied from interface: Roster
Remove a user from the roster.

Specified by:
removeUser in interface 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.