|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.crowd.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,
InvalidAuthenticationException
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.
InvalidAuthenticationException
public void addMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ApplicationPermissionException,
InvalidAuthenticationException,
UserNotFoundException,
GroupNotFoundException
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.
ApplicationPermissionException - This application does not have permission to update group memberships.
UserNotFoundException - the user could not be found
GroupNotFoundException - the group could not be found
InvalidAuthenticationException
public void removeMembership(java.lang.String userName,
java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
ApplicationPermissionException,
MembershipNotFoundException,
UserNotFoundException,
InvalidAuthenticationException,
GroupNotFoundException
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.
ApplicationPermissionException - This application does not have permission to update group memberships.
UserNotFoundException - the user could not be found
GroupNotFoundException - the group could not be found
MembershipNotFoundException
InvalidAuthenticationException
public java.util.List getMemberships(java.lang.String userName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException,
UserNotFoundException
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.
UserNotFoundException - If the user could not be found.
InvalidAuthenticationException
public java.util.List getMembers(java.lang.String groupName)
throws java.rmi.RemoteException,
InvalidAuthorizationTokenException,
InvalidAuthenticationException,
GroupNotFoundException
CachingGroupManager.getGroup(String) for very similar logic.
getMembers in interface GroupMembershipManagergroupName -
java.rmi.RemoteException
InvalidAuthorizationTokenException
GroupNotFoundException - If the group could not be found.
InvalidAuthenticationException
public java.lang.Boolean isUserOrGroup(java.lang.String name)
throws InvalidAuthorizationTokenException,
java.rmi.RemoteException,
InvalidAuthenticationException
InvalidAuthorizationTokenException
java.rmi.RemoteException
InvalidAuthenticationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||