com.atlassian.jira.rest.v2.issue
Class GroupResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.GroupResource

public class GroupResource
extends Object

Since:
v6.0

Constructor Summary
GroupResource(PermissionManager permissionManager, JiraAuthenticationContext authContext, I18nHelper i18n, GroupManager groupManager, GroupService groupService, JiraBaseUrls jiraBaseUrls, com.atlassian.crowd.embedded.api.CrowdService crowdService, UserBeanFactory userBeanFactory)
           
 
Method Summary
 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 Returns REST representation for the requested group.
 javax.ws.rs.core.Response getGroup(String groupName, StringList expand)
          Returns REST representation for the requested group.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupResource

public GroupResource(PermissionManager permissionManager,
                     JiraAuthenticationContext authContext,
                     I18nHelper i18n,
                     GroupManager groupManager,
                     GroupService groupService,
                     JiraBaseUrls jiraBaseUrls,
                     com.atlassian.crowd.embedded.api.CrowdService crowdService,
                     UserBeanFactory userBeanFactory)
Method Detail

getGroup

public javax.ws.rs.core.Response getGroup(String groupName,
                                          StringList expand)
Returns REST representation for the requested group. Allows to get list of active users belonging to the specified group and its subgroups if "users" expand option is provided. You can page through users list by using indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]" expand value. This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and inclusive.

Parameters:
groupName - A name of requested group.
expand - List of fields to expand. Currently only available expand is "users".
Returns:
REST representation of a group
Since:
6.0

createGroup

@ExperimentalApi
public javax.ws.rs.core.Response createGroup(AddGroupBean groupBean)
Creates a group by given group parameter Returns REST representation for the requested group.

Parameters:
groupBean - a group to add
Returns:
REST representation of a group
Since:
6.1

removeGroup

@ExperimentalApi
public javax.ws.rs.core.Response removeGroup(String groupName,
                                                             String swapGroup)
Deletes a group by given group parameter. Returns no content

Parameters:
groupName - a group to delete
swapGroup - a group to transfer visibility restrictions of the group that is being deleted
Returns:
no content
Since:
6.1

addUserToGroup

@ExperimentalApi
public javax.ws.rs.core.Response addUserToGroup(String groupName,
                                                                UpdateUserToGroupBean userBean)
Adds given user to a group. Returns the current state of the group.

Parameters:
groupName - A name of requested group.
userBean - User to add to a group
Returns:
REST representation of a group
Since:
6.1

removeUserFromGroup

@ExperimentalApi
public javax.ws.rs.core.Response removeUserFromGroup(String groupName,
                                                                     String username)
Removes given user from a group. Returns no content

Parameters:
groupName - A name of requested group.
username - User to remove from a group
Returns:
REST representation of a group
Since:
6.1


Copyright © 2002-2014 Atlassian. All Rights Reserved.