public class

ProjectRoleResource

extends Object
java.lang.Object
   ↳ com.atlassian.jira.rest.v2.issue.project.ProjectRoleResource

Summary

Nested Classes
class ProjectRoleResource.ActorsMap  
Fields
public static Map<StringString> GET_ROLES_DOC_EXAMPLE
Public Constructors
ProjectRoleResource(ProjectRoleService projectRoleService, AvatarService avatarService, ProjectFinder projectFinder, JiraAuthenticationContext authContext, UriInfo uriInfo, UserManager userManager, ProjectRoleBeanFactory projectRoleBeanFactory)
Public Methods
Response addActorUsers(String projectIdOrKey, Long id, ProjectRoleResource.ActorsMap actors)
Adds an actor (user or group) to a project role.
Response deleteActor(String projectIdOrKey, Long id, String username, String groupname)
Deletes actors (users or groups) from a project role.
Response getProjectRole(String projectIdOrKey, Long id)
Returns the details for a given project role in a project.
Response getProjectRoles(String projectIdOrKey)
Returns all roles in the given project Id or key, with links to full details on each role.
Response setActors(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean actors)
Updates a project role to include the specified actors (users or groups).
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static Map<StringString> GET_ROLES_DOC_EXAMPLE

Public Constructors

public ProjectRoleResource (ProjectRoleService projectRoleService, AvatarService avatarService, ProjectFinder projectFinder, JiraAuthenticationContext authContext, UriInfo uriInfo, UserManager userManager, ProjectRoleBeanFactory projectRoleBeanFactory)

Public Methods

public Response addActorUsers (String projectIdOrKey, Long id, ProjectRoleResource.ActorsMap actors)

Adds an actor (user or group) to a project role.

Parameters
projectIdOrKey the project id or project key
id the project role id
actors the actors to add to the role
Returns
  • full details on the role and its actors after modification

public Response deleteActor (String projectIdOrKey, Long id, String username, String groupname)

Deletes actors (users or groups) from a project role.

  • Delete a user from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?user={username}
  • Delete a group from the role: /rest/api/2/project/{projectIdOrKey}/role/{roleId}?group={groupname}

Parameters
projectIdOrKey the project id or project key
id the project role id
username the username to remove from the project role
groupname the groupname to remove from the project role
Returns
  • no content on success

public Response getProjectRole (String projectIdOrKey, Long id)

Returns the details for a given project role in a project.

Parameters
projectIdOrKey the project id or project key
id the project role id
Returns
  • full details on the role and its actors. Actors are sorted by their display name.

public Response getProjectRoles (String projectIdOrKey)

Returns all roles in the given project Id or key, with links to full details on each role.

Parameters
projectIdOrKey the project id or project key
Returns
  • list of roles and URIs to full details

public Response setActors (String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean actors)

Updates a project role to include the specified actors (users or groups).

Parameters
projectIdOrKey the project id or project key
id the project role id
actors the actors to set for the role
Returns
  • full details on the role and its actors after modification