com.atlassian.jira.rest.v2.issue
Class ComponentResource

java.lang.Object
  extended by com.atlassian.jira.rest.v2.issue.ComponentResource

public class ComponentResource
extends Object

Since:
4.2

Constructor Summary
ComponentResource(ProjectComponentService projectComponentService, ProjectService projectService, UserManager userManager, AvatarService avatarService, IssueManager issueManager, ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory, JiraAuthenticationContext authContext, ContextI18n i18n, PermissionManager permissionManager, ProjectManager projectManager)
           
 
Method Summary
 javax.ws.rs.core.Response createComponent(ComponentBean bean, javax.ws.rs.core.UriInfo uriInfo)
          Create a component via POST.
 javax.ws.rs.core.Response delete(String id, String moveIssuesTo)
          Delete a project component.
 javax.ws.rs.core.Response getComponent(String id, javax.ws.rs.core.UriInfo uriInfo)
          Returns a project component.
 javax.ws.rs.core.Response getComponentRelatedIssues(String id)
          Returns counts of issues related to this component.
 javax.ws.rs.core.Response updateComponent(String id, javax.ws.rs.core.UriInfo uriInfo, ComponentBean bean)
          Modify a component via PUT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentResource

public ComponentResource(ProjectComponentService projectComponentService,
                         ProjectService projectService,
                         UserManager userManager,
                         AvatarService avatarService,
                         IssueManager issueManager,
                         ComponentIssueCountsBeanFactory componentIssueCountsBeanFactory,
                         JiraAuthenticationContext authContext,
                         ContextI18n i18n,
                         PermissionManager permissionManager,
                         ProjectManager projectManager)
Method Detail

getComponent

public javax.ws.rs.core.Response getComponent(String id,
                                              @Context
                                              javax.ws.rs.core.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.

createComponent

public javax.ws.rs.core.Response createComponent(ComponentBean bean,
                                                 @Context
                                                 javax.ws.rs.core.UriInfo uriInfo)
Create a component via POST.


updateComponent

public javax.ws.rs.core.Response updateComponent(String id,
                                                 @Context
                                                 javax.ws.rs.core.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.


getComponentRelatedIssues

public javax.ws.rs.core.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

delete

public javax.ws.rs.core.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.


Copyright © 2002-2012 Atlassian. All Rights Reserved.