|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.integration.service.cache.CachingGroupMembershipManager
public class CachingGroupMembershipManager
This class handles group memberships, but also handles some funky translation
| Constructor Summary | |
|---|---|
CachingGroupMembershipManager(SecurityServerClient securityServerClient,
UserManager userManager,
GroupManager groupManager,
BasicCache basicCache)
|
|
| 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)
Also see CachingGroupManager.getGroup(String) for very similar logic. |
java.util.List |
getMemberships(java.lang.String userName)
Obtains a list of all groups that the user identified by userName belongs to, sorted naturally. |
boolean |
isMember(java.lang.String userName,
java.lang.String groupName)
Returns true if the user represented by userName is a member of groupName |
java.lang.Boolean |
isUserOrGroup(java.lang.String name)
|
void |
removeMembership(java.lang.String userName,
java.lang.String groupName)
Removes a user identified by userName from the group identified by groupName. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CachingGroupMembershipManager(SecurityServerClient securityServerClient,
UserManager userManager,
GroupManager groupManager,
BasicCache basicCache)
| Method Detail |
|---|
public boolean isMember(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException
GroupMembershipManageruserName is a member of groupName
isMember in interface GroupMembershipManageruserName - 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.
public void addMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException,
ApplicationPermissionException
GroupMembershipManageruserName to the group identified by groupName. If the user
is already a member of the group, this method will return successfully.
addMembership in interface GroupMembershipManageruserName - 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.
public void removeMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException,
ApplicationPermissionException
GroupMembershipManageruserName from the group identified by groupName. If the
user was not a member of the group, this method will return successfully.
removeMembership in interface GroupMembershipManageruserName - 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.
public java.util.List getMemberships(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException
GroupMembershipManageruserName belongs to, sorted naturally.
This can be a slow call, particularly on some LDAP directories, and so should be avoided. Use
isMember() instead.
getMemberships in interface GroupMembershipManageruserName - 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.
public java.util.List getMembers(java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ObjectNotFoundException
CachingGroupManager.getGroup(String) for very similar logic.
getMembers in interface GroupMembershipManagergroupName -
java.rmi.RemoteException
InvalidAuthorizationTokenException
ObjectNotFoundException - If the group could not be found.
public java.lang.Boolean isUserOrGroup(java.lang.String name)
throws InvalidAuthorizationTokenException,
java.rmi.RemoteException
InvalidAuthorizationTokenException
java.rmi.RemoteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||