|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.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. |
Group |
getGroup(String name,
boolean forceLookup)
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 all groups given a start index and desired number of results. |
Collection<Group> |
getGroups(JID user)
Returns an iterator for all groups that the entity with the specified JID is a member of. |
Collection<Group> |
getGroups(User user)
Returns an iterator for all groups that the User is a member of. |
static GroupManager |
getInstance()
Returns a singleton instance of GroupManager. |
GroupProvider |
getProvider()
Returns the configured group provider. |
Collection<Group> |
getSharedGroups()
Returns an unmodifiable Collection of all shared groups in the system. |
boolean |
isPropertyReadOnly()
Returns true if properties of groups are read only. |
boolean |
isReadOnly()
Returns true if groups are read-only. |
boolean |
isSearchSupported()
Returns true if searching for groups is supported. |
Collection<Group> |
search(String query)
Returns the groups that match the search. |
Collection<Group> |
search(String query,
int startIndex,
int numResults)
Returns the groups that match the search given a start index and desired number of results. |
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 Group getGroup(String name, boolean forceLookup) 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> getSharedGroups()
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.
public Collection<Group> getGroups(JID user)
user
- the JID of the entity to get a list of groups for.
public boolean isReadOnly()
public boolean isPropertyReadOnly()
public boolean isSearchSupported()
public Collection<Group> search(String query)
Before searching or showing a search UI, use the isSearchSupported()
method
to ensure that searching is supported.
query
- the search string for group names.
public Collection<Group> search(String query, int startIndex, int numResults)
Before searching or showing a search UI, use the isSearchSupported()
method
to ensure that searching is supported.
query
- the search string for group names.
public GroupProvider getProvider()
|
Openfire 3.6.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |