java.lang.Object | |
↳ | com.atlassian.jira.bc.group.DefaultGroupService |
Default implementation of a GroupService
.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method will add the provided groups to the specified groups.
| |||||||||||
This method will add the provided users to the specified groups.
| |||||||||||
This is a validation utility method that will determine if the specified groups are the only groups that are
granting the current user their
ADMINISTER permissions. | |||||||||||
This will delete a group from JIRA.
| |||||||||||
Return the name of groups that are members of this Group.
| |||||||||||
Return the name of groups that are parents of this Group.
| |||||||||||
This is a validation utility method that will determine if the current user is only a JIRA Administrator
and they are trying to delete a group that is associated with JIRA System Administrators.
| |||||||||||
This method will remove the provided child groups from the specified groups.
| |||||||||||
This method will remove the provided users from the specified groups.
| |||||||||||
Performs validation to see if the provided groups (identified by the groupNames collection) can be added to the
provided group by the current user (as specified in the jiraServiceContext).
| |||||||||||
Performs validation to see if the provided user (identified by username) can be added to the provided group
by the current user (as specified in the jiraServiceContext).
| |||||||||||
Performs validation to see if the provided users (identified by the userNames collection) can be added to the
provided group by the current user (as specified in the jiraServiceContext).
| |||||||||||
Validates if the group provided can be deleted in JIRA.
| |||||||||||
Performs validation to see if the groups identified in
mapper can be removed from
their respective groups by the current user (as specified in the jiraServiceContext). | |||||||||||
Performs validation to see if the user can be removed from the groups by the current user (as specified in
the jiraServiceContext).
| |||||||||||
Performs validation to see if the users identified in
mapper can be removed from
their respective groups by the current user (as specified in the jiraServiceContext). |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.jira.bc.group.GroupService
|
This method will add the provided groups to the specified groups. It is assumed that
validateAddGroupsToGroup(com.atlassian.jira.bc.JiraServiceContext, java.util.Collection, java.util.Collection)
has been called and not returned any errors. This method will not perform any validation other than simple
permissions checks.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToJoin | a collection of String 's that represent groupNames that the child group should be added to.
This must not be null. |
childNames | collection of String childNames that identifies the child groups to be added to the groups,
must not be null. |
This method will add the provided users to the specified groups. It is assumed that either
validateAddUsersToGroup(com.atlassian.jira.bc.JiraServiceContext, java.util.Collection, java.util.Collection)
or validateAddUserToGroup(com.atlassian.jira.bc.JiraServiceContext, java.util.Collection, String)
has
been called and not returned any errors. This method will not perform any validation other than simple
permissions checks.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToJoin | a collection of String 's that represent groupNames that the user should be added to.
This must not be null. |
userNames | collection of String userNames that identifies the users to be added to the groups,
must not be null. |
This is a validation utility method that will determine if the specified groups are the only groups that are
granting the current user their ADMINISTER
permissions.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupNames | identifies the groups in question. |
This will delete a group from JIRA. This method will remove the group from any notifications schemes,
any associated permissions, and any associated project roles. This method will also update any
Comment
's and Worklog
's
that have visibility restrictions set to the current group such that their restrictions will be changed to
the swapGroup.
This method assumes that the validateDelete(com.atlassian.jira.bc.JiraServiceContext, String, String)
method has been called and that it did not generate any errors.
You must have ADMINISTER
permissions or higher to invoke this
method.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupName | identifies the group to delete. |
swapGroup | identifies the group to change comment and worklog visibility to. |
Return the name of groups that are members of this Group.
group | to search for. |
---|
This method will return the count of all Comment
's and
Worklog
's that have the named group set as its
visibility restriction.
groupName | identifies the group that the worklog or comments visibility is restricted by. |
---|
Return the name of groups that are parents of this Group.
group | to search for. |
---|
This is a validation utility method that will determine if the current user is only a JIRA Administrator and they are trying to delete a group that is associated with JIRA System Administrators.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupName | identifies the group in question. |
This method will remove the provided child groups from the specified groups. It is assumed that
validateRemoveGroupsFromGroups(com.atlassian.jira.bc.JiraServiceContext, GroupRemoveChildMapper)
has been called and not returned any errors. This method will not perform any validation other than simple
permissions checks.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
mapper | represents which child groups to remove from which groups. |
This method will remove the provided users from the specified groups. It is assumed that either
validateRemoveUsersFromGroups(com.atlassian.jira.bc.JiraServiceContext, GroupRemoveChildMapper)
or validateRemoveUserFromGroups(com.atlassian.jira.bc.JiraServiceContext, java.util.List, String)
been called and not returned any errors. This method will not perform any validation other than simple
permissions checks.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
mapper | represents which users to remove from which groups. |
Performs validation to see if the provided groups (identified by the groupNames collection) can be added to the provided group by the current user (as specified in the jiraServiceContext). If there are any problems with adding the users to the groups this method will returns an unsuccessful result and the errors will be reported in the errorCollection. The operation will not be valid if external user management is enabled, the parent or child groups do not exist, the child is already a member of the groups, or the current user does not have permission to add the group to the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToJoin | a collection of String 's that represent groupNames that the user should be added to.
This must not be null. |
groupNames | collection of String groupNames that identifies the groups to be added to the groups,
must not be null. |
GroupService.BulkEditGroupValidationResult
which if the groups
can be added to the groups will have isSuccess be true. Otherwise isSuccess will be false and if there was
any problem validating the users to add the
getInvalidChildren()
method will
contain the groups that were not valid to add to the groups.Performs validation to see if the provided user (identified by username) can be added to the provided group by the current user (as specified in the jiraServiceContext). If there are any problems with adding the user to the groups this method will return false and the error will be reported in the errorCollection. The operation will not be valid if external user management is enabled, the groups or user does not exist, the user is already a member of all the groups, or the current user does not have permission to add the user to the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToJoin | a collection of String 's that represent groupNames that the user should be added to.
This must not be null. |
userName | identifies the user to be added to the groups, must not be null. |
Performs validation to see if the provided users (identified by the userNames collection) can be added to the provided group by the current user (as specified in the jiraServiceContext). If there are any problems with adding the users to the groups this method will returns an unsuccessful result and the errors will be reported in the errorCollection. The operation will not be valid if external user management is enabled, the groups or user does not exist, the user is already a member of the groups, or the current user does not have permission to add the user to the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToJoin | a collection of String 's that represent groupNames that the user should be added to.
This must not be null. |
userNames | collection of String userNames that identifies the users to be added to the groups,
must not be null. |
GroupService.BulkEditGroupValidationResult
which if the users
can be added to the groups will have isSuccess be true. Otherwise isSuccess will be false and if there was
any problem validating the users to add the
getInvalidChildren()
method will
contain the usernames that were not valid to add to the groups.Validates if the group provided can be deleted in JIRA. If there are any problems deleting the group they will be reported in the error collection and the method will return false. Comment and worklogs visibility can be restricted by groups. If there are any associated comments or worklogs and a swap group is not provided then errors will be added to the error collection.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupName | identifies the group to delete. |
swapGroup | identifies the group to change comment and worklog visibility to. |
Performs validation to see if the groups identified in mapper
can be removed from
their respective groups by the current user (as specified in the jiraServiceContext). If there are any problems with
removing the groups from the groups this method will return false and the errors will be reported in the errorCollection.
The operation will not be valid if external user management is enabled, the parent or child groups do
not exist, the group is not currently a member of the groups, or the current user does not have permission
to remove the groups from the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
mapper | represents which groups to remove from which groups. |
Performs validation to see if the user can be removed from the groups by the current user (as specified in the jiraServiceContext). If there are any problems with removing the user from the groups this method will return false and the errors will be reported in the errorCollection. The operation will not be valid if external user management is enabled, the groups or user does not exist, the user is not currently a member of the groups, or the current user does not have permission to remove the user from the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
groupsToLeave | the group names to remove the user from. |
userName | the name of the user to remove from the groupsToLeave. |
Performs validation to see if the users identified in mapper
can be removed from
their respective groups by the current user (as specified in the jiraServiceContext). If there are any problems with
removing the users from the groups this method will return false and the errors will be reported in the errorCollection.
The operation will not be valid if external user management is enabled, the groups or users do
not exist, the user is not currently a member of the groups, or the current user does not have permission
to remove the users from the groups.
jiraServiceContext | containing the user who the permission checks will be run against (can be null, indicating an anonymous user) and the errorCollection that will contain any errors in calling the method |
---|---|
mapper | represents which users to remove from which groups. |