|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GroupMembershipManager
This interface allows applications to query relationships between users and groups.
| Method Summary | |
|---|---|
void |
addMembership(java.lang.String userName,
java.lang.String groupName)
Adds a user identified by userName to the group identified by groupName. |
java.util.List |
getMembers(java.lang.String groupName)
Obtains a list of all users in the group identified by groupName, sorted naturally. |
java.util.List |
getMemberships(java.lang.String userName)
Deprecated. Since 1.4 |
boolean |
isMember(java.lang.String userName,
java.lang.String groupName)
Returns true if the user represented by userName is a member of groupName |
void |
removeMembership(java.lang.String userName,
java.lang.String groupName)
Removes a user identified by userName from the group identified by groupName. |
| Method Detail |
|---|
boolean isMember(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException
userName is a member of groupName
userName - The user to checkgroupName - The group to check.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
void addMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException,
ApplicationPermissionException
userName to the group identified by groupName. If the user
is already a member of the group, this method will return successfully.
userName - The user to addgroupName - The group the user will be added to
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ObjectNotFoundException - Either the user or the group could not be found
ApplicationPermissionException - This application does not have permission to update group memberships.
void removeMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException,
ApplicationPermissionException
userName from the group identified by groupName. If the
user was not a member of the group, this method will return successfully.
userName - The user to removegroupName - The group the user will be added from
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ObjectNotFoundException - Either the user or the group could not be found
ApplicationPermissionException - This application does not have permission to update group memberships.
java.util.List getMemberships(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException
userName belongs to, sorted naturally.
This can be a slow call, particularly on some LDAP directories, and so should be avoided. Use
isMember() instead.
userName - The user whose group memberships are desired.
List of Strings containing all the groups the user belongs to, or an empty List
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ObjectNotFoundException - If the user could not be found.
java.util.List getMembers(java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException
groupName, sorted naturally.
This is a fairly fast call, but implementors should still be using isMember() wherever practicable.
groupName - The group whose member users are desired.
List of Strings containing all the users in the group, or an empty list.
java.rmi.RemoteException - A communication error occurred - the Crowd server may not be available.
InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.
ObjectNotFoundException - If the group could not be found.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||