Commit 037fc68d authored by Matt Tucker's avatar Matt Tucker Committed by matt

Added method to get groups for a user, added method to get provider.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@3527 b35dd754-fafc-0310-a699-88a17e54d16e
parent 3df5ea4d
...@@ -192,6 +192,16 @@ public class GroupManager { ...@@ -192,6 +192,16 @@ public class GroupManager {
return groups; return groups;
} }
/**
* Returns an iterator for all groups that the User is a member of.
*
* @param user the user.
* @return all groups the user belongs to.
*/
public Collection<Group> getGroups(User user) {
return getGroups(XMPPServer.getInstance().createJID(user.getUsername(), null));
}
/** /**
* Returns an iterator for all groups that the entity with the specified JID is a member of. * Returns an iterator for all groups that the entity with the specified JID is a member of.
* *
...@@ -205,6 +215,16 @@ public class GroupManager { ...@@ -205,6 +215,16 @@ public class GroupManager {
return groups; return groups;
} }
/**
* Returns the configured group provider. Note that this method has special access
* privileges since only a few certain classes need to access the provider directly.
*
* @return the group provider.
*/
GroupProvider getProvider() {
return provider;
}
/** /**
* Caches groups present in the specified collection that are not already cached and * Caches groups present in the specified collection that are not already cached and
* ensures correct identity of already cached groups. * ensures correct identity of already cached groups.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment