public interface IssueRestClient
Modifier and Type | Interface and Description |
---|---|
static class |
IssueRestClient.Expandos
Expandos supported by
getIssue(String, Iterable) |
Modifier and Type | Method and Description |
---|---|
com.atlassian.util.concurrent.Promise<Void> |
addAttachment(URI attachmentsUri,
InputStream in,
String filename)
Uploads attachments to JIRA (adding it to selected issue)
|
com.atlassian.util.concurrent.Promise<Void> |
addAttachments(URI attachmentsUri,
AttachmentInput... attachments)
Uploads attachments to JIRA (adding it to selected issue)
|
com.atlassian.util.concurrent.Promise<Void> |
addAttachments(URI attachmentsUri,
File... files)
Uploads attachments to JIRA (adding it to selected issue)
|
com.atlassian.util.concurrent.Promise<Void> |
addComment(URI commentsUri,
Comment comment)
Adds a comment to JIRA (adding it to selected issue)
|
com.atlassian.util.concurrent.Promise<Void> |
addWatcher(URI watchersUri,
String username)
Adds selected person as a watcher for selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
addWorklog(URI worklogUri,
WorklogInput worklogInput)
Adds new worklog entry to issue.
|
com.atlassian.util.concurrent.Promise<BasicIssue> |
createIssue(IssueInput issue)
Creates new issue.
|
com.atlassian.util.concurrent.Promise<BulkOperationResult<BasicIssue>> |
createIssues(Collection<IssueInput> issues)
Creates new issues in batch.
|
com.atlassian.util.concurrent.Promise<Void> |
deleteIssue(String issueKey,
boolean deleteSubtasks)
Deletes issue with given issueKey.
|
com.atlassian.util.concurrent.Promise<InputStream> |
getAttachment(URI attachmentUri)
Retrieves the content of given attachment.
|
com.atlassian.util.concurrent.Promise<Iterable<CimProject>> |
getCreateIssueMetadata(GetCreateIssueMetadataOptions options)
Retrieves CreateIssueMetadata with specified filters.
|
com.atlassian.util.concurrent.Promise<Issue> |
getIssue(String issueKey)
Retrieves issue with selected issue key.
|
com.atlassian.util.concurrent.Promise<Issue> |
getIssue(String issueKey,
Iterable<IssueRestClient.Expandos> expand)
Retrieves issue with selected issue key, with specified additional expandos.
|
com.atlassian.util.concurrent.Promise<Iterable<Transition>> |
getTransitions(Issue issue)
Retrieves complete information (if the caller has permission) about transitions available for the selected issue in its current state.
|
com.atlassian.util.concurrent.Promise<Iterable<Transition>> |
getTransitions(URI transitionsUri)
Retrieves complete information (if the caller has permission) about transitions available for the selected issue in its current state.
|
com.atlassian.util.concurrent.Promise<Votes> |
getVotes(URI votesUri)
Retrieves complete information (if the caller has permission) about voters for selected issue.
|
com.atlassian.util.concurrent.Promise<Watchers> |
getWatchers(URI watchersUri)
Retrieves complete information (if the caller has permission) about watchers for selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
linkIssue(LinkIssuesInput linkIssuesInput)
Creates link between two issues and adds a comment (optional) to the source issues.
|
com.atlassian.util.concurrent.Promise<Void> |
removeWatcher(URI watchersUri,
String username)
Removes selected person from the watchers list for selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
transition(Issue issue,
TransitionInput transitionInput)
Performs selected transition on selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
transition(URI transitionsUri,
TransitionInput transitionInput)
Performs selected transition on selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
unvote(URI votesUri)
Removes your vote from the selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
unwatch(URI watchersUri)
Stops watching selected issue
|
com.atlassian.util.concurrent.Promise<Void> |
updateIssue(String issueKey,
IssueInput issue)
Update an existing issue.
|
com.atlassian.util.concurrent.Promise<Void> |
vote(URI votesUri)
Casts your vote on the selected issue.
|
com.atlassian.util.concurrent.Promise<Void> |
watch(URI watchersUri)
Starts watching selected issue
|
com.atlassian.util.concurrent.Promise<BasicIssue> createIssue(IssueInput issue)
issue
- populated with data to create new issueissueKey
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> updateIssue(String issueKey, IssueInput issue)
issueKey
- issue key (like TST-1, or JRA-9)issue
- populated with fields to set (no other verbs) in issueRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Iterable<CimProject>> getCreateIssueMetadata(@Nullable GetCreateIssueMetadataOptions options)
options
- optional request configuration like filters and expandos. You may use GetCreateIssueMetadataOptionsBuilder
to build them. Pass null
if you don't want to set any option.CimProject
describing projects, issue types and fields.RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<BulkOperationResult<BasicIssue>> createIssues(Collection<IssueInput> issues)
issues
- populated with data to create new issueissueKey
and errors for failed issuesRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Issue> getIssue(String issueKey)
issueKey
- issue key (like TST-1, or JRA-9)issueKey
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Issue> getIssue(String issueKey, Iterable<IssueRestClient.Expandos> expand)
issueKey
- issue key (like TST-1, or JRA-9)expand
- additional expands. Currently CHANGELOG is the only supported expand that is not expanded by default.issueKey
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> deleteIssue(String issueKey, boolean deleteSubtasks)
deleteSubtasks
to delete issue with subtasks. If issue have
subtasks and deleteSubtasks
is set to false, then issue won't be deleted.issueKey
- issue key (like TST-1, or JRA-9)deleteSubtasks
- Determines if subtask of issue should be also deleted. If false, and issue has subtasks, then it
won't be deleted.com.atlassian.util.concurrent.Promise<Watchers> getWatchers(URI watchersUri)
watchersUri
- URI of watchers resource for selected issue. Usually obtained by calling Issue.getWatchers().getSelf()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)Issue.getWatchers()
com.atlassian.util.concurrent.Promise<Votes> getVotes(URI votesUri)
votesUri
- URI of voters resource for selected issue. Usually obtained by calling Issue.getVotesUri()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)Issue.getVotesUri()
com.atlassian.util.concurrent.Promise<Iterable<Transition>> getTransitions(URI transitionsUri)
transitionsUri
- URI of transitions resource of selected issue. Usually obtained by calling Issue.getTransitionsUri()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Iterable<Transition>> getTransitions(Issue issue)
issue
- issueRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> transition(URI transitionsUri, TransitionInput transitionInput)
transitionsUri
- URI of transitions resource of selected issue. Usually obtained by calling Issue.getTransitionsUri()
transitionInput
- data for this transition (fields modified, the comment, etc.)RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> transition(Issue issue, TransitionInput transitionInput)
issue
- selected issuetransitionInput
- data for this transition (fields modified, the comment, etc.)RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> vote(URI votesUri)
votesUri
- URI of votes resource for selected issue. Usually obtained by calling Issue.getVotesUri()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> unvote(URI votesUri)
votesUri
- URI of votes resource for selected issue. Usually obtained by calling Issue.getVotesUri()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> watch(URI watchersUri)
watchersUri
- URI of watchers resource for selected issue. Usually obtained by calling Issue.getWatchers().getSelf()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> unwatch(URI watchersUri)
watchersUri
- URI of watchers resource for selected issue. Usually obtained by calling Issue.getWatchers().getSelf()
RestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> addWatcher(URI watchersUri, String username)
watchersUri
- URI of watchers resource for selected issue. Usually obtained by calling Issue.getWatchers().getSelf()
username
- user to add as a watcherRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> removeWatcher(URI watchersUri, String username)
watchersUri
- URI of watchers resource for selected issue. Usually obtained by calling Issue.getWatchers().getSelf()
username
- user to remove from the watcher listRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, etc.)com.atlassian.util.concurrent.Promise<Void> linkIssue(LinkIssuesInput linkIssuesInput)
linkIssuesInput
- details for the link and the comment (optional) to be createdRestClientException
- in case of problems (connectivity, malformed messages, invalid argument, permissions, etc.)com.atlassian.util.concurrent.Promise<Void> addAttachment(URI attachmentsUri, InputStream in, String filename)
attachmentsUri
- where to upload the attachment. You can get this URI by examining issue resource firstin
- stream from which to read data to uploadfilename
- file name to use for the uploaded attachmentcom.atlassian.util.concurrent.Promise<Void> addAttachments(URI attachmentsUri, AttachmentInput... attachments)
attachmentsUri
- where to upload the attachments. You can get this URI by examining issue resource firstattachments
- attachments to uploadcom.atlassian.util.concurrent.Promise<Void> addAttachments(URI attachmentsUri, File... files)
attachmentsUri
- where to upload the attachments. You can get this URI by examining issue resource firstfiles
- files to uploadcom.atlassian.util.concurrent.Promise<Void> addComment(URI commentsUri, Comment comment)
commentsUri
- where to add commentcomment
- the Comment
to add@Beta com.atlassian.util.concurrent.Promise<InputStream> getAttachment(URI attachmentUri)
attachmentUri
- URI for the attachment to retrievecom.atlassian.util.concurrent.Promise<Void> addWorklog(URI worklogUri, WorklogInput worklogInput)
worklogUri
- URI for worklog in issueworklogInput
- worklog input object to createCopyright © 2016 Atlassian. All rights reserved.