Package org.jivesoftware.openfire.crowd
Class CrowdManager
- java.lang.Object
-
- org.jivesoftware.openfire.crowd.CrowdManager
-
public class CrowdManager extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
authenticate(String username, String password)
Authenticates a user with crowd.List<String>
getAllGroupNames()
Get all the crowd groupsList<User>
getAllUsers()
Get all the users from CrowdGroup
getGroup(String groupName)
Get the description of a group from crowdList<String>
getGroupMembers(String groupName)
Get the members of the given groupstatic CrowdManager
getInstance()
List<String>
getUserGroups(String username)
Get all the groups of a given username
-
-
-
Method Detail
-
getInstance
public static CrowdManager getInstance()
-
authenticate
public void authenticate(String username, String password) throws RemoteException
Authenticates a user with crowd. If authentication failed, raises aRemoteException
- Parameters:
username
- the usernamepassword
- the password- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
getAllUsers
public List<User> getAllUsers() throws RemoteException
Get all the users from Crowd- Returns:
- a List of User containing all the users stored in Crowd
- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
getAllGroupNames
public List<String> getAllGroupNames() throws RemoteException
Get all the crowd groups- Returns:
- a List of group names
- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
getUserGroups
public List<String> getUserGroups(String username) throws RemoteException
Get all the groups of a given username- Parameters:
username
- the user- Returns:
- a List of groups name
- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
getGroup
public Group getGroup(String groupName) throws RemoteException
Get the description of a group from crowd- Parameters:
groupName
- the name of the group- Returns:
- a Group object
- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
getGroupMembers
public List<String> getGroupMembers(String groupName) throws RemoteException
Get the members of the given group- Parameters:
groupName
- the name of the group- Returns:
- a List of String with the usernames members of the given group
- Throws:
RemoteException
- if an exception occurred communicating with the crowd server
-
-