public class GroupResource extends Object
Constructor and Description |
---|
GroupResource(GlobalPermissionManager permissionManager,
JiraAuthenticationContext authContext,
I18nHelper i18n,
GroupManager groupManager,
GroupService groupService,
JiraBaseUrls jiraBaseUrls,
SelfLinkBuilder selfLinkBuilder,
com.atlassian.crowd.embedded.api.CrowdService crowdService,
UserBeanFactory userBeanFactory,
ResponseFactory responses) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addUserToGroup(String groupName,
UpdateUserToGroupBean userBean)
Adds given user to a group.
|
javax.ws.rs.core.Response |
createGroup(AddGroupBean groupBean)
Creates a group by given group parameter
|
javax.ws.rs.core.Response |
getGroup(String groupName,
StringList expand)
Deprecated.
|
javax.ws.rs.core.Response |
getUsersFromGroup(String groupName,
boolean includeInactiveUsers,
Long startAt,
Integer maxResults)
This resource returns a paginated list of users who are members of the specified group and its subgroups.
|
javax.ws.rs.core.Response |
removeGroup(String groupName,
String swapGroup)
Deletes a group by given group parameter.
|
javax.ws.rs.core.Response |
removeUserFromGroup(String groupName,
String username)
Removes given user from a group.
|
public GroupResource(GlobalPermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, SelfLinkBuilder selfLinkBuilder, com.atlassian.crowd.embedded.api.CrowdService crowdService, UserBeanFactory userBeanFactory, ResponseFactory responses)
@Deprecated public javax.ws.rs.core.Response getGroup(String groupName, StringList expand)
This resource is deprecated, please use group/member API instead.
groupName
- A name of requested group.expand
- List of fields to expand. Currently only available expand is "users".public javax.ws.rs.core.Response getUsersFromGroup(String groupName, boolean includeInactiveUsers, Long startAt, Integer maxResults)
startAt
- the index of the first user in group to return (0 based).maxResults
- the maximum number of users to return (max 50).groupName
- a name of the group for which members will be returned.includeInactiveUsers
- inactive users will be included in the response if set to true.public javax.ws.rs.core.Response createGroup(AddGroupBean groupBean)
Returns REST representation for the requested group.
groupBean
- a group to addpublic javax.ws.rs.core.Response removeGroup(String groupName, String swapGroup)
Returns no content
groupName
- (mandatory) The name of the group to delete.swapGroup
- If you delete a group and content is restricted to that group, the content will be hidden from all users.
To prevent this, use this parameter to specify a different group to transfer the restrictions (comments and worklogs only) to.public javax.ws.rs.core.Response addUserToGroup(String groupName, UpdateUserToGroupBean userBean)
Returns the current state of the group.
groupName
- A name of requested group.userBean
- User to add to a grouppublic javax.ws.rs.core.Response removeUserFromGroup(String groupName, String username)
Returns no content
groupName
- A name of requested group.username
- User to remove from a groupCopyright © 2002-2019 Atlassian. All Rights Reserved.