|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface GroupManager
This object can be used to manage groups in JIRA. This manager offers the following advantages over using the Open Symphony UserManager class:
| Method Detail |
|---|
boolean groupExists(String groupName)
true if the given group name exists.
groupName - The group name.
true if the given group name exists.Collection<com.atlassian.crowd.embedded.api.Group> getAllGroups()
com.atlassian.crowd.embedded.api.Group createGroup(String groupName)
throws com.atlassian.crowd.exception.OperationNotPermittedException,
com.atlassian.crowd.exception.embedded.InvalidGroupException
groupName - The group name.
com.atlassian.crowd.exception.InvalidGroupException - if the group already exists in ANY associated directory or the group template does not have the required properties populated.
com.atlassian.crowd.exception.OperationNotPermittedException - if the directory has been configured to not allow the operation to be performed
com.atlassian.crowd.exception.OperationFailedException - underlying directory implementation failed to execute the operation.
com.atlassian.crowd.exception.embedded.InvalidGroupExceptionGroup getGroup(String groupName)
getGroupObject(String groupName) Since v4.3.
groupName - The group name.
com.atlassian.crowd.embedded.api.Group getGroupObject(String groupName)
groupName - The group name.
boolean isUserInGroup(String username,
String groupname)
true if the user is a member of the group.
Note that if the username or groupname is null, then it will return false.
username - user to inspect.groupname - group to inspect.
true if and only if the user is a direct or indirect (nested) member of the group.isUserInGroup(com.atlassian.crowd.embedded.api.User, com.atlassian.crowd.embedded.api.Group)
boolean isUserInGroup(com.atlassian.crowd.embedded.api.User user,
com.atlassian.crowd.embedded.api.Group group)
true if the user is a member of the group.
Note that if the User or Group object is null, then it will return false. This was done to retain consistency with the old OSUser behaviour of User.inGroup() and Group.containsUser()
user - user to inspect.group - group to inspect.
true if and only if the user is a direct or indirect (nested) member of the group.isUserInGroup(String, String)
boolean isUserInGroup(User user,
Group group)
isUserInGroup(com.atlassian.crowd.embedded.api.User, com.atlassian.crowd.embedded.api.Group) instead. Since v4.4.
true if the user is a member of the group.
Note that if the User or Group object is null, then it will return false. This was done to retain consistency with the old OSUser behaviour of User.inGroup() and Group.containsUser()
user - user to inspect.group - group to inspect.
true if and only if the user is a direct or indirect (nested) member of the group.Collection<com.atlassian.crowd.embedded.api.User> getUsersInGroup(String groupName)
groupName - The group
#getUsersInGroup(Group)}Collection<com.atlassian.crowd.embedded.api.User> getUsersInGroup(com.atlassian.crowd.embedded.api.Group group)
group - The group
NullPointerException - if the group is null#getUsersInGroup(String)}Collection<com.atlassian.crowd.embedded.api.User> getDirectUsersInGroup(com.atlassian.crowd.embedded.api.Group group)
group - The group
NullPointerException - if the group is null#getUsersInGroup(String)}Collection<com.atlassian.crowd.embedded.api.Group> getGroupsForUser(String userName)
userName - The user
getGroupNamesForUser(String)Collection<String> getGroupNamesForUser(String userName)
userName - The user
getGroupsForUser(String)
void addUserToGroup(com.atlassian.crowd.embedded.api.User user,
com.atlassian.crowd.embedded.api.Group group)
throws com.atlassian.crowd.exception.GroupNotFoundException,
com.atlassian.crowd.exception.UserNotFoundException,
com.atlassian.crowd.exception.OperationNotPermittedException,
com.atlassian.crowd.exception.OperationFailedException
user - The user that will become a member of the group.group - The group that will gain a new member.
com.atlassian.crowd.exception.UserNotFoundException - if the user could not be found
com.atlassian.crowd.exception.GroupNotFoundException - if the group could not be found
com.atlassian.crowd.exception.OperationNotPermittedException - if the directory has been configured to not allow the operation to be performed
com.atlassian.crowd.exception.OperationFailedException - If the underlying directory implementation failed to execute the operation.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||