|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jivesoftware.messenger.group.GroupManager
public class GroupManager
Manages groups.
Group
Method Summary | |
---|---|
Group |
createGroup(String name)
Factory method for creating a new Group. |
void |
deleteGroup(Group group)
Deletes a group from the system. |
void |
deleteUser(User user)
Deletes a user from all the groups where he/she belongs. |
Group |
getGroup(String name)
Returns a Group by name. |
int |
getGroupCount()
Returns the total number of groups in the system. |
Collection<Group> |
getGroups()
Returns an unmodifiable Collection of all groups in the system. |
Collection<Group> |
getGroups(int startIndex,
int numResults)
Returns an iterator for all groups according to a filter. |
Collection<Group> |
getGroups(User user)
Returns an iterator for all groups that a user is a member of. |
static GroupManager |
getInstance()
Returns a singleton instance of GroupManager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static GroupManager getInstance()
public Group createGroup(String name) throws GroupAlreadyExistsException
name
- the new and unique name for the group.
GroupAlreadyExistsException
- if the group name already exists in the system.public Group getGroup(String name) throws GroupNotFoundException
name
- The name of the group to retrieve
GroupNotFoundException
- if the group does not exist.public void deleteGroup(Group group)
group
- the group to delete.public void deleteUser(User user)
user
- the deleted user from the system.public int getGroupCount()
public Collection<Group> getGroups()
public Collection<Group> getGroups(int startIndex, int numResults)
startIndex
- start index in results.numResults
- number of results to return.
public Collection<Group> getGroups(User user)
user
- the user to get a list of groups for.
|
Jive Messenger 2.2.2 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |