|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.rest.v2.issue.IssueResource
public class IssueResource
Constructor Summary | |
---|---|
IssueResource(IssueService issueService,
JiraAuthenticationContext authContext,
WorkflowManager workflowManager,
UserManager userManager,
ProjectRoleManager projectRoleManager,
ResolverManager resolverManager,
VoteService voteService,
ContextI18n i18n,
WatcherOps watcherOps,
WatcherService watcherService,
BeanBuilderFactory beanBuilderFactory,
ContextUriInfo contextUriInfo,
IssueFinder issueFinder,
CreateIssueResource createIssueResource,
UpdateIssueResource updateIssueResource,
DeleteIssueResource deleteIssueResource,
RemoteIssueLinkResource remoteIssueLinkResource,
WorklogResource worklogResource)
|
Method Summary | |
---|---|
javax.ws.rs.core.Response |
addVote(String issueIdOrKey)
Cast your vote in favour of an issue. |
javax.ws.rs.core.Response |
addWatcher(String issueIdOrKey,
String userName)
Adds a user to an issue's watcher list. |
javax.ws.rs.core.Response |
addWorklog(String issueIdOrKey,
String adjustEstimate,
String newEstimate,
String reduceBy,
WorklogJsonBean request)
Adds a new worklog entry to an issue. |
protected javax.ws.rs.core.Response |
BAD_REQUEST()
Returns a Response with a status code of 400. |
javax.ws.rs.core.Response |
createIssue(IssueUpdateBean createRequest)
Creates an issue from a JSON representation. |
javax.ws.rs.core.Response |
createOrUpdateRemoteIssueLink(String issueIdOrKey,
RemoteIssueLinkCreateOrUpdateRequest request)
Creates or updates a remote issue link from a JSON representation. |
javax.ws.rs.core.Response |
deleteIssue(String issueIdOrKey,
String deleteSubtasks)
Delete an issue. |
javax.ws.rs.core.Response |
deleteRemoteIssueLinkByGlobalId(String issueIdOrKey,
String globalId)
Delete the remote issue link with the given global id on the issue. |
javax.ws.rs.core.Response |
deleteRemoteIssueLinkById(String issueIdOrKey,
String remoteIssueLinkId)
Delete the remote issue link with the given id on the issue. |
javax.ws.rs.core.Response |
deleteWorklog(String issueIdOrKey,
String worklogId,
String adjustEstimate,
String newEstimate,
String increaseBy)
Deletes an existing worklog entry . |
javax.ws.rs.core.Response |
doTransition(String issueIdOrKey,
String requestBody)
Perform a transition on an issue. |
javax.ws.rs.core.Response |
editIssue(String issueIdOrKey,
IssueUpdateBean updateRequest)
Edits an issue from a JSON representation. |
javax.ws.rs.core.Response |
getCreateIssueMeta(List<StringList> projectIds,
List<StringList> projectKeys,
List<StringList> issuetypeIds,
List<String> issuetypeNames)
Returns the meta data for creating issues. |
javax.ws.rs.core.Response |
getEditIssueMeta(String issueIdOrKey)
Returns the meta data for editing an issue. |
javax.ws.rs.core.Response |
getIssue(String issueIdOrKey,
List<StringList> fields,
String expand)
Returns a full representation of the issue for the given issue key. |
javax.ws.rs.core.Response |
getIssueWatchers(String issueIdOrKey)
Returns the list of watchers for the issue with the given key. |
javax.ws.rs.core.Response |
getIssueWorklog(String issueIdOrKey)
Returns all work logs for an issue. |
javax.ws.rs.core.Response |
getRemoteIssueLinkById(String issueIdOrKey,
String linkId)
Get the remote issue link with the given id on the issue. |
javax.ws.rs.core.Response |
getRemoteIssueLinks(String issueIdOrKey,
String globalId)
A REST sub-resource representing the remote issue links on the issue. |
Collection<FieldMetaBean> |
getRequiredFields(FieldScreenRenderer fieldScreenRenderer,
Issue issue)
|
javax.ws.rs.core.Response |
getTransitions(String issueIdOrKey)
Get a list of the transitions possible for this issue by the current user, along with fields that are required and their types. |
javax.ws.rs.core.Response |
getVotes(String issueIdOrKey)
A REST sub-resource representing the voters on the issue. |
javax.ws.rs.core.Response |
getWorklog(String issueIdOrKey,
String worklogId)
Returns a specific worklog. |
protected static javax.ws.rs.core.Response |
NO_CONTENT()
Returns a Response with a status code of 204. |
javax.ws.rs.core.Response |
removeVote(String issueIdOrKey)
Remove your vote from an issue. |
javax.ws.rs.core.Response |
removeWatcher(String issueIdOrKey,
String userName)
Removes a user from an issue's watcher list. |
javax.ws.rs.core.Response |
updateRemoteIssueLink(String issueIdOrKey,
String linkId,
RemoteIssueLinkCreateOrUpdateRequest updateRequest)
Updates a remote issue link from a JSON representation. |
javax.ws.rs.core.Response |
updateWorklog(String issueIdOrKey,
String worklogId,
String adjustEstimate,
String newEstimate,
WorklogJsonBean request)
Updates an existing worklog entry using its JSON representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IssueResource(IssueService issueService, JiraAuthenticationContext authContext, WorkflowManager workflowManager, UserManager userManager, ProjectRoleManager projectRoleManager, ResolverManager resolverManager, VoteService voteService, ContextI18n i18n, WatcherOps watcherOps, WatcherService watcherService, BeanBuilderFactory beanBuilderFactory, ContextUriInfo contextUriInfo, IssueFinder issueFinder, CreateIssueResource createIssueResource, UpdateIssueResource updateIssueResource, DeleteIssueResource deleteIssueResource, RemoteIssueLinkResource remoteIssueLinkResource, WorklogResource worklogResource)
Method Detail |
---|
public javax.ws.rs.core.Response getTransitions(String issueIdOrKey)
issueIdOrKey
- the issue whose transitions you want to view
public javax.ws.rs.core.Response doTransition(String issueIdOrKey, String requestBody)
issueIdOrKey
- the issue you want to transitionrequestBody
- JSON representing the transition you want to perform along with the fields that will be updated.
JSONException
- the JSON you passed in is not validpublic javax.ws.rs.core.Response removeVote(String issueIdOrKey)
issueIdOrKey
- the issue the current user is unvoting on
public javax.ws.rs.core.Response addVote(String issueIdOrKey)
issueIdOrKey
- the issue to vote for
public javax.ws.rs.core.Response getVotes(String issueIdOrKey)
issueIdOrKey
- the issue to view voting information for
public javax.ws.rs.core.Response getIssue(String issueIdOrKey, List<StringList> fields, String expand)
issueIdOrKey
- the issue id or key to request (i.e. JRA-1330)fields
- the list of fields to return for the issue. If null, all fields are returned.
public javax.ws.rs.core.Response getIssueWatchers(String issueIdOrKey)
issueIdOrKey
- the issue key to request (i.e. JRA-1330)
public javax.ws.rs.core.Response addWatcher(String issueIdOrKey, String userName)
issueIdOrKey
- a String containing an issue keyuserName
- the name of the user to add to the watcher list. If no name is specified, the current user is added.
public javax.ws.rs.core.Response removeWatcher(String issueIdOrKey, String userName)
issueIdOrKey
- a String containing an issue keyuserName
- a String containing the name of the user to remove from the watcher list
public javax.ws.rs.core.Response createIssue(IssueUpdateBean createRequest)
createRequest
- an issue create request
public javax.ws.rs.core.Response deleteIssue(String issueIdOrKey, String deleteSubtasks)
issueIdOrKey
- a String containing an issue id or keydeleteSubtasks
- a String of true or false indicating that any subtasks should also be deleted. If the
issue has no subtasks this parameter is ignored. If the issue has subtasks and this parameter is missing or false,
then the issue will not be deleted and an error will be returned.
public javax.ws.rs.core.Response getCreateIssueMeta(List<StringList> projectIds, List<StringList> projectKeys, List<StringList> issuetypeIds, List<String> issuetypeNames)
Fields will only be returned if expand=projects.issuetypes.fields
.
The results can be filtered by project and/or issue type, given by the query params.
projectIds
- combined with the projectKeys param, lists the projects with which to filter the results. If absent, all projects are returned.
This parameter can be specified multiple times, and/or be a comma-separated list.
Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.projectKeys
- combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned.
This parameter can be specified multiple times, and/or be a comma-separated list.
Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.issuetypeIds
- combinded with issuetypeNames, lists the issue types with which to filter the results. If null, all issue types are returned.
This parameter can be specified multiple times, and/or be a comma-separated list.
Specifiying an issue type that does not exist is not an error.issuetypeNames
- combinded with issuetypeIds, lists the issue types with which to filter the results. If null, all issue types are returned.
This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list.
Specifiying an issue type that does not exist is not an error.
public javax.ws.rs.core.Response getEditIssueMeta(String issueIdOrKey)
issueIdOrKey
- the issue whose edit meta data you want to view
public javax.ws.rs.core.Response editIssue(String issueIdOrKey, IssueUpdateBean updateRequest)
issueIdOrKey
- the issue id or key to update (i.e. JRA-1330)
public javax.ws.rs.core.Response getRemoteIssueLinks(String issueIdOrKey, String globalId)
issueIdOrKey
- the issue to view the remote issue links forglobalId
- if not null, return only the remote issue link with this globalId
public javax.ws.rs.core.Response getRemoteIssueLinkById(String issueIdOrKey, String linkId)
issueIdOrKey
- the issue to view the remote issue links forlinkId
- the id of the remote issue link
public javax.ws.rs.core.Response createOrUpdateRemoteIssueLink(String issueIdOrKey, RemoteIssueLinkCreateOrUpdateRequest request)
issueIdOrKey
- the issue to create the remote issue link forrequest
- a request to create or update a remote issue link
public javax.ws.rs.core.Response updateRemoteIssueLink(String issueIdOrKey, String linkId, RemoteIssueLinkCreateOrUpdateRequest updateRequest)
issueIdOrKey
- the issue to update the remote issue link forupdateRequest
- a request to update a remote issue link
public javax.ws.rs.core.Response deleteRemoteIssueLinkById(String issueIdOrKey, String remoteIssueLinkId)
issueIdOrKey
- the issue to create the remote issue link forremoteIssueLinkId
- the id of the remote issue link
public javax.ws.rs.core.Response deleteRemoteIssueLinkByGlobalId(String issueIdOrKey, String globalId)
issueIdOrKey
- the issue to create the remote issue link forglobalId
- the global id of the remote issue link
public javax.ws.rs.core.Response getIssueWorklog(String issueIdOrKey)
issueIdOrKey
- the worklog belongs to
public javax.ws.rs.core.Response getWorklog(String issueIdOrKey, String worklogId)
issueIdOrKey
- a string containing the issue id or key the worklog belongs toworklogId
- a String containing the work log id
public javax.ws.rs.core.Response updateWorklog(String issueIdOrKey, String worklogId, String adjustEstimate, String newEstimate, WorklogJsonBean request)
issueIdOrKey
- a string containing the issue id or key the worklog belongs toworklogId
- id of the worklog to be updatedadjustEstimate
- (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
"new" - sets the estimate to a specific value
"leave"- leaves the estimate as is
"auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklognewEstimate
- (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field.request
- json body of request converted to a WorklogJsonBean
public javax.ws.rs.core.Response deleteWorklog(String issueIdOrKey, String worklogId, String adjustEstimate, String newEstimate, String increaseBy)
issueIdOrKey
- a string containing the issue id or key the worklog belongs toworklogId
- id of the worklog to be deletedadjustEstimate
- (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
"new" - sets the estimate to a specific value
"leave"- leaves the estimate as is
"manual" - specify a specific amount to increase remaining estimate by
"auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklognewEstimate
- (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"increaseBy
- (required when "manual" is selected for adjustEstimate) the amount to increase the remaining estimate by e.g. "2d"
public javax.ws.rs.core.Response addWorklog(String issueIdOrKey, String adjustEstimate, String newEstimate, String reduceBy, WorklogJsonBean request)
issueIdOrKey
- a string containing the issue id or key the worklog will be added toadjustEstimate
- (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
"new" - sets the estimate to a specific value
"leave"- leaves the estimate as is
"manual" - specify a specific amount to increase remaining estimate by
"auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklognewEstimate
- (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"reduceBy
- (required when "manual" is selected for adjustEstimate) the amount to reduce the remaining estimate by e.g. "2d"request
- json body of request converted to a WorklogJsonBean
protected javax.ws.rs.core.Response BAD_REQUEST()
protected static javax.ws.rs.core.Response NO_CONTENT()
public Collection<FieldMetaBean> getRequiredFields(FieldScreenRenderer fieldScreenRenderer, Issue issue)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |