public class CachingGroupManager extends Object implements GroupManager
| Constructor and Description |
|---|
CachingGroupManager(SecurityServerClient securityServerClient,
BasicCache basicCache) |
| Modifier and Type | Method and Description |
|---|---|
SOAPGroup |
addGroup(SOAPGroup group)
Adds
group to the Crowd server. |
List |
getAllGroupNames()
Returns a list of all available groups.
|
SOAPGroup |
getGroup(String groupName)
See also
CachingGroupMembershipManager.getMembers(String)} for similar logic. |
boolean |
isGroup(String groupName)
Returns true if
groupName represents a valid group, false otherwise. |
void |
removeGroup(String groupName)
Removes a group from Crowd.
|
List |
searchGroups(SearchRestriction[] restrictions)
Searches the list of all available groups based on the passed-in
restrictions and returns a list
of groups that match. |
void |
updateGroup(SOAPGroup group)
Updates a group's details in Crowd.
|
public CachingGroupManager(SecurityServerClient securityServerClient, BasicCache basicCache)
public boolean isGroup(String groupName) throws RemoteException, InvalidAuthorizationTokenException, InvalidAuthenticationException
GroupManagergroupName represents a valid group, false otherwise.isGroup in interface GroupManagergroupName - The name to checkRemoteException - A communication error occurred - the Crowd server may not be available.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.InvalidAuthenticationException - application authentication is not validpublic SOAPGroup getGroup(String groupName) throws RemoteException, InvalidAuthorizationTokenException, InvalidAuthenticationException, GroupNotFoundException
CachingGroupMembershipManager.getMembers(String)} for similar logic.getGroup in interface GroupManagergroupName - The name of the group to fetchRemoteException - A communication error occurred - the Crowd server may not be available.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.InvalidAuthenticationException - application authentication is not validGroupNotFoundException - The group could not be found.public SOAPGroup addGroup(SOAPGroup group) throws RemoteException, InvalidGroupException, InvalidAuthorizationTokenException, ApplicationPermissionException, InvalidAuthenticationException
GroupManagergroup to the Crowd server.addGroup in interface GroupManagergroup - The object containing the details of the group.SOAPGroup, as returned by the Crowd server.RemoteException - A communication error occurred - the Crowd server may not be available.InvalidGroupException - Could not add the group - it may be malformed, or a group with that name may already exist.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.ApplicationPermissionException - The application does not have permission to add groups.InvalidAuthenticationException - application authentication is not validpublic List searchGroups(SearchRestriction[] restrictions) throws RemoteException, InvalidAuthorizationTokenException, InvalidAuthenticationException
GroupManagerrestrictions and returns a list
of groups that match.searchGroups in interface GroupManagerrestrictions - search restrictionsList of SOAPGroups that match the criteria.RemoteException - A communication error occurred - the Crowd server may not be available.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.InvalidAuthenticationException - application authentication is not validpublic void updateGroup(SOAPGroup group) throws RemoteException, ApplicationPermissionException, InvalidAuthorizationTokenException, InvalidAuthenticationException, GroupNotFoundException
GroupManagerupdateGroup in interface GroupManagergroup - The group to updateRemoteException - A communication error occurred - the Crowd server may not be available.ApplicationPermissionException - The application does not have permission to update groups.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.InvalidAuthenticationException - application authentication is not validGroupNotFoundException - The group to update could not be found.public void removeGroup(String groupName) throws RemoteException, InvalidAuthorizationTokenException, ApplicationPermissionException, InvalidAuthenticationException, GroupNotFoundException
GroupManagerremoveGroup in interface GroupManagergroupName - The name of the group to remove.RemoteException - A communication error occurred - the Crowd server may not be available.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.ApplicationPermissionException - The application does not have permission to remove groups.InvalidAuthenticationException - application authentication is not validGroupNotFoundException - The group to remove could not be found.public List getAllGroupNames() throws RemoteException, InvalidAuthorizationTokenException, InvalidAuthenticationException
GroupManagergetAllGroupNames in interface GroupManagerList of Strings that list all the groups visible to this application.RemoteException - A communication error occurred - the Crowd server may not be available.InvalidAuthorizationTokenException - The application (not the user) was not authenticated correctly.InvalidAuthenticationException - application authentication is not validCopyright © 2016 Atlassian. All Rights Reserved.