public class ProjectRoleResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ProjectRoleResource.ActorsMap |
Modifier and Type | Field and Description |
---|---|
static Map<String,String> |
GET_ROLES_DOC_EXAMPLE |
Constructor and Description |
---|
ProjectRoleResource(ProjectRoleService projectRoleService,
AvatarService avatarService,
ProjectFinder projectFinder,
JiraAuthenticationContext authContext,
javax.ws.rs.core.UriInfo uriInfo,
UserManager userManager,
ProjectRoleBeanFactory projectRoleBeanFactory) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addActorUsers(String projectIdOrKey,
Long id,
ProjectRoleResource.ActorsMap actors)
Adds an actor (user or group) to a project role.
|
javax.ws.rs.core.Response |
deleteActor(String projectIdOrKey,
Long id,
String username,
String groupname)
Deletes actors (users or groups) from a project role.
|
javax.ws.rs.core.Response |
getProjectRole(String projectIdOrKey,
Long id)
Returns the details for a given project role in a project.
|
javax.ws.rs.core.Response |
getProjectRoles(String projectIdOrKey)
Returns all roles in the given project Id or key, with links to full details on each role.
|
javax.ws.rs.core.Response |
setActors(String projectIdOrKey,
Long id,
ProjectRoleActorsUpdateBean actors)
Updates a project role to include the specified actors (users or groups).
|
public ProjectRoleResource(ProjectRoleService projectRoleService, AvatarService avatarService, ProjectFinder projectFinder, JiraAuthenticationContext authContext, javax.ws.rs.core.UriInfo uriInfo, UserManager userManager, ProjectRoleBeanFactory projectRoleBeanFactory)
public javax.ws.rs.core.Response getProjectRoles(String projectIdOrKey)
projectIdOrKey
- the project id or project keypublic javax.ws.rs.core.Response getProjectRole(String projectIdOrKey, Long id)
projectIdOrKey
- the project id or project keyid
- the project role idpublic javax.ws.rs.core.Response setActors(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean actors)
For user actors, their usernames should be used.
projectIdOrKey
- the project id or project keyid
- the project role idactors
- the actors to set for the rolepublic javax.ws.rs.core.Response addActorUsers(String projectIdOrKey, Long id, ProjectRoleResource.ActorsMap actors)
For user actors, their usernames should be used.
projectIdOrKey
- the project id or project keyid
- the project role idactors
- the actors to add to the rolepublic javax.ws.rs.core.Response deleteActor(String projectIdOrKey, Long id, String username, String groupname)
/rest/api/2/project/{projectIdOrKey}/role/{roleId}?user={username}
/rest/api/2/project/{projectIdOrKey}/role/{roleId}?group={groupname}
projectIdOrKey
- the project id or project keyid
- the project role idusername
- the username of the user to remove from the project rolegroupname
- the groupname to remove from the project roleCopyright © 2002-2019 Atlassian. All Rights Reserved.