public class

ComponentResource

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

Summary

Public Constructors
ComponentResource(ProjectComponentService projectComponentService, ProjectComponentManager projectComponentManager, ProjectService projectService, UserManager userManager, AvatarService avatarService, IssueManager issueManager, ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory, JiraAuthenticationContext authContext, I18nHelper i18n, PermissionManager permissionManager, ProjectManager projectManager, JiraBaseUrls jiraBaseUrls, EventPublisher eventPublisher)
Public Methods
Response createComponent(ComponentBean bean, UriInfo uriInfo)
Create a component via POST.
Response delete(String id, String moveIssuesTo)
Delete a project component.
Response getComponent(String id, UriInfo uriInfo)
Returns a project component.
Response getComponentRelatedIssues(String id)
Returns counts of issues related to this component.
Response updateComponent(String id, UriInfo uriInfo, ComponentBean bean)
Modify a component via PUT.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ComponentResource (ProjectComponentService projectComponentService, ProjectComponentManager projectComponentManager, ProjectService projectService, UserManager userManager, AvatarService avatarService, IssueManager issueManager, ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory, JiraAuthenticationContext authContext, I18nHelper i18n, PermissionManager permissionManager, ProjectManager projectManager, JiraBaseUrls jiraBaseUrls, EventPublisher eventPublisher)

Public Methods

public Response createComponent (ComponentBean bean, UriInfo uriInfo)

Create a component via POST.

public Response delete (String id, 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.

public Response getComponent (String id, UriInfo uriInfo)

Returns a project component.

Parameters
id a String containing the component key
uriInfo a UriInfo
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.

public Response getComponentRelatedIssues (String id)

Returns counts of issues related to this component.

Parameters
id a String containing the component id
Returns
  • an issue counts bean

public Response updateComponent (String id, UriInfo uriInfo, 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.