Class ProjectRoleResource
java.lang.Object
com.atlassian.jira.rest.v2.issue.project.ProjectRoleResource
@Path("project/{projectIdOrKey}/role")
@Consumes("application/json")
@Produces("application/json")
public class ProjectRoleResource
extends Object
- Since:
- v4.4
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProjectRoleResource(ProjectRoleService projectRoleService, AvatarService avatarService, ProjectFinder projectFinder, JiraAuthenticationContext authContext, javax.ws.rs.core.UriInfo uriInfo, UserManager userManager, ProjectRoleBeanFactory projectRoleBeanFactory, GroupManager groupManager) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.ResponseaddActorUsers(String projectIdOrKey, Long id, ProjectRoleResource.ActorsMap actors) Adds an actor (user or group) to a project role.javax.ws.rs.core.ResponsedeleteActor(String projectIdOrKey, Long id, String username, String groupname) Deletes actors (users or groups) from a project role.javax.ws.rs.core.ResponsegetProjectRole(String projectIdOrKey, Long id) Returns the details for a given project role in a project.javax.ws.rs.core.ResponsegetProjectRoles(String projectIdOrKey) Returns all roles in the given project Id or key, with links to full details on each role.javax.ws.rs.core.ResponsesetActors(String projectIdOrKey, Long id, ProjectRoleActorsUpdateBean actors) Updates a project role to include the specified actors (users or groups).
-
Constructor Details
-
ProjectRoleResource
@Inject public ProjectRoleResource(ProjectRoleService projectRoleService, AvatarService avatarService, ProjectFinder projectFinder, JiraAuthenticationContext authContext, javax.ws.rs.core.UriInfo uriInfo, UserManager userManager, ProjectRoleBeanFactory projectRoleBeanFactory, GroupManager groupManager)
-
-
Method Details
-
getProjectRoles
@GET public javax.ws.rs.core.Response getProjectRoles(@PathParam("projectIdOrKey") 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
-
getProjectRole
@GET @Path("{id}") public javax.ws.rs.core.Response getProjectRole(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id) Returns the details for a given project role in a project.- Parameters:
projectIdOrKey- the project id or project keyid- the project role id- Returns:
- full details on the role and its actors. Actors are sorted by their display name.
-
setActors
@PUT @Path("{id}") public javax.ws.rs.core.Response setActors(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, ProjectRoleActorsUpdateBean actors) Updates a project role to include the specified actors (users or groups). Can be also used to clear roles to not include any users or groups.For user actors, their usernames should be used.
- Parameters:
projectIdOrKey- the project id or project keyid- the project role idactors- the actors to set for the role- Returns:
- full details on the role and its actors after modification
-
addActorUsers
@POST @Path("{id}") public javax.ws.rs.core.Response addActorUsers(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, ProjectRoleResource.ActorsMap actors) Adds an actor (user or group) to a project role.For user actors, their usernames should be used.
- Parameters:
projectIdOrKey- the project id or project keyid- the project role idactors- the actors to add to the role- Returns:
- full details on the role and its actors after modification
-
deleteActor
@DELETE @Path("{id}") public javax.ws.rs.core.Response deleteActor(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, @QueryParam("user") String username, @QueryParam("group") String groupname) Deletes actors (users or groups) from a project role.- Parameters:
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 role- Returns:
- no content on success
-