Package com.atlassian.jira.rest.v2.issue
Class ComponentResource
java.lang.Object
com.atlassian.jira.rest.v2.issue.ComponentResource
@Path("component")
@Consumes("application/json")
@Produces("application/json")
public class ComponentResource
extends Object
- Since:
- 4.2
-
Constructor Summary
ConstructorsConstructorDescriptionComponentResource
(ProjectComponentService projectComponentService, ProjectComponentManager projectComponentManager, ProjectService projectService, UserManager userManager, AvatarService avatarService, ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory, JiraAuthenticationContext authContext, I18nHelper i18n, PermissionManager permissionManager, ProjectManager projectManager, JiraBaseUrls jiraBaseUrls, com.atlassian.event.api.EventPublisher eventPublisher, ResponseFactory responseFactory) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
createComponent
(ComponentBean bean) Create a component via POST.javax.ws.rs.core.Response
Delete a project component.javax.ws.rs.core.Response
getComponent
(String id) Returns a project component.javax.ws.rs.core.Response
Returns counts of issues related to this component.javax.ws.rs.core.Response
Returns paginated list of filtered active componentsjavax.ws.rs.core.Response
updateComponent
(String id, ComponentBean bean) Modify a component via PUT.
-
Constructor Details
-
ComponentResource
@Inject public ComponentResource(ProjectComponentService projectComponentService, ProjectComponentManager projectComponentManager, ProjectService projectService, UserManager userManager, AvatarService avatarService, ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory, JiraAuthenticationContext authContext, I18nHelper i18n, PermissionManager permissionManager, ProjectManager projectManager, JiraBaseUrls jiraBaseUrls, com.atlassian.event.api.EventPublisher eventPublisher, ResponseFactory responseFactory)
-
-
Method Details
-
getComponent
Returns a project component.- Parameters:
id
- a String containing the component key- Returns:
- a response containing a JSOn representation of a project component, or a 404 NOT FOUND if there is no component with the given id or the calling user does not have permission to view it.
-
createComponent
Create a component via POST. -
updateComponent
@PUT @Path("{id}") public javax.ws.rs.core.Response updateComponent(@PathParam("id") String id, ComponentBean bean) Modify a component via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored.If leadUserName is an empty string ("") the component lead will be removed.
-
getComponentRelatedIssues
@GET @Path("{id}/relatedIssueCounts") public javax.ws.rs.core.Response getComponentRelatedIssues(@PathParam("id") String id) Returns counts of issues related to this component.- Parameters:
id
- a String containing the component id- Returns:
- an issue counts bean
-
delete
@DELETE @Path("{id}") public javax.ws.rs.core.Response delete(@PathParam("id") String id, @QueryParam("moveIssuesTo") String moveIssuesTo) Delete a project component.- Parameters:
id
- The component to delete.moveIssuesTo
- The new component applied to issues whose 'id' component will be deleted. If this value is null, then the 'id' component is simply removed from the related isues.- Returns:
- An empty or error response.
-
getPaginatedComponents
@GET @Path("page") @Produces("application/json") @ExperimentalApi public javax.ws.rs.core.Response getPaginatedComponents(@DefaultValue("0") @QueryParam("startAt") Long startAt, @DefaultValue("100") @QueryParam("maxResults") Integer maxResults, @DefaultValue("") @QueryParam("query") String query, @QueryParam("projectIds") List<Long> projectIds) Returns paginated list of filtered active components- Parameters:
startAt
- the index of the first components to returnmaxResults
- the maximum number of components to returnquery
- the string that components names will be matched withprojectIds
- the set of project ids to filter components- Since:
- 9.2
-