Modifier and Type | Method and Description |
---|---|
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(org.xmpp.packet.JID jid)
Returns the corresponding group if the given JID represents a group.
|
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(org.xmpp.packet.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> |
getPublicSharedGroups()
Returns an unmodifiable Collection of all public shared groups in the system.
|
Collection<Group> |
getSharedGroups()
Returns an unmodifiable Collection of all shared groups in the system.
|
Collection<Group> |
getSharedGroups(String userName)
Returns an unmodifiable Collection of all shared groups in the system for a given userName.
|
Collection<Group> |
getVisibleGroups(Group groupToCheck)
Returns an unmodifiable Collection of all shared groups in the system for a given userName.
|
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.
|
Collection<Group> |
search(String propName,
String propValue)
Returns an unmodifiable Collection of all groups in the system that
match given propValue for the specified propName.
|
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(org.xmpp.packet.JID jid) throws GroupNotFoundException
groupJID
- The JID for the group to retrieveGroupNotFoundException
- if the JID represents a group that does not existpublic Group getGroup(String name) throws GroupNotFoundException
name
- The name of the group to retrieveGroupNotFoundException
- if the group does not exist.public Group getGroup(String name, boolean forceLookup) throws GroupNotFoundException
name
- The name of the group to retrieveforceLookup
- Invalidate the group cache for this groupGroupNotFoundException
- 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> getSharedGroups(String userName)
public Collection<Group> getVisibleGroups(Group groupToCheck)
public Collection<Group> getPublicSharedGroups()
public Collection<Group> search(String propName, String propValue)
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(org.xmpp.packet.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()
Copyright © 2003-2008 Jive Software.