|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rcarz.jiraclient.Resource
net.rcarz.jiraclient.Issue
public final class Issue
Represents a JIRA issue.
Nested Class Summary | |
---|---|
static class |
Issue.FluentCreate
Used to chain fields to a create action. |
class |
Issue.FluentTransition
Used to chain fields to a transition action. |
class |
Issue.FluentUpdate
Used to chain fields to an update action. |
static class |
Issue.SearchResult
Issue search results structure. |
Field Summary |
---|
Fields inherited from class net.rcarz.jiraclient.Resource |
---|
id, RESOURCE_URI, restclient, self |
Constructor Summary | |
---|---|
protected |
Issue(RestClient restclient,
net.sf.json.JSONObject json)
Creates an issue from a JSON payload. |
Method Summary | |
---|---|
void |
addComment(String body)
Adds a comment to this issue. |
void |
addComment(String body,
String visType,
String visName)
Adds a comment to this issue with limited visibility. |
void |
addWatcher(String username)
Adds a watcher to the issue. |
static Issue.FluentCreate |
create(RestClient restclient,
String project,
String issueType)
Creates a new JIRA issue. |
Issue.FluentCreate |
createSubtask()
Creates a new sub-task. |
void |
deleteWatcher(String username)
Removes a watcher to the issue. |
static Issue |
get(RestClient restclient,
String key)
Retrieves the given issue record. |
User |
getAssignee()
|
List<Attachment> |
getAttachments()
|
List<Comment> |
getComments()
|
List<Component> |
getComponents()
|
String |
getDescription()
|
Date |
getDueDate()
|
Object |
getField(String name)
Gets an arbitrary field by its name. |
List<Version> |
getFixVersions()
|
List<IssueLink> |
getIssueLinks()
|
IssueType |
getIssueType()
|
String |
getKey()
|
List<String> |
getLabels()
|
Priority |
getPriority()
|
Project |
getProject()
|
User |
getReporter()
|
Resolution |
getResolution()
|
Date |
getResolutionDate()
|
Status |
getStatus()
|
List<Issue> |
getSubtasks()
|
String |
getSummary()
|
TimeTracking |
getTimeTracking()
|
List<Version> |
getVersions()
|
Votes |
getVotes()
|
Watches |
getWatches()
|
List<WorkLog> |
getWorkLogs()
|
void |
link(String issue,
String type)
Links this issue with another issue. |
void |
link(String issue,
String type,
String body)
Links this issue with another issue and adds a comment. |
void |
link(String issue,
String type,
String body,
String visType,
String visName)
Links this issue with another issue and adds a comment with limited visibility. |
void |
refresh()
Reloads issue data from the JIRA server. |
static Issue.SearchResult |
search(RestClient restclient,
String jql)
Search for issues with the given query. |
String |
toString()
|
Issue.FluentTransition |
transition()
Begins a transition field chain. |
void |
unvote()
Removes the current user's vote from the issue. |
Issue.FluentUpdate |
update()
Begins an update field chain. |
void |
vote()
Casts a vote in favour of an issue. |
Methods inherited from class net.rcarz.jiraclient.Resource |
---|
getId, getUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Issue(RestClient restclient, net.sf.json.JSONObject json)
restclient
- REST client instancejson
- JSON payloadMethod Detail |
---|
public void addComment(String body) throws JiraException
body
- Comment text
JiraException
- when the comment creation failspublic void addComment(String body, String visType, String visName) throws JiraException
body
- Comment textvisType
- Target audience type (role or group)visName
- Name of the role or group to limit visibility to
JiraException
- when the comment creation failspublic void link(String issue, String type) throws JiraException
issue
- Other issue keytype
- Link type name
JiraException
- when the link creation failspublic void link(String issue, String type, String body) throws JiraException
issue
- Other issue keytype
- Link type namebody
- Comment text
JiraException
- when the link creation failspublic void link(String issue, String type, String body, String visType, String visName) throws JiraException
issue
- Other issue keytype
- Link type namebody
- Comment textvisType
- Target audience type (role or group)visName
- Name of the role or group to limit visibility to
JiraException
- when the link creation failspublic static Issue.FluentCreate create(RestClient restclient, String project, String issueType) throws JiraException
restclient
- REST client instanceproject
- Key of the project to create the issue inissueType
- Name of the issue type to create
JiraException
- when the client fails to retrieve issue metadatapublic Issue.FluentCreate createSubtask() throws JiraException
JiraException
- when the client fails to retrieve issue metadatapublic static Issue get(RestClient restclient, String key) throws JiraException
restclient
- REST client instancekey
- Issue key (PROJECT-123)
JiraException
- when the retrieval failspublic static Issue.SearchResult search(RestClient restclient, String jql) throws JiraException
restclient
- REST client instancejql
- JQL statement
JiraException
- when the search failspublic void refresh() throws JiraException
JiraException
- when the retrieval failspublic Object getField(String name)
name
- Name of the field to retrieve
public Issue.FluentTransition transition() throws JiraException
JiraException
- when the client fails to retrieve issue metadatapublic Issue.FluentUpdate update() throws JiraException
JiraException
- when the client fails to retrieve issue metadatapublic void vote() throws JiraException
JiraException
- when the voting failspublic void unvote() throws JiraException
JiraException
- when the voting failspublic void addWatcher(String username) throws JiraException
username
- Username of the watcher to add
JiraException
- when the operation failspublic void deleteWatcher(String username) throws JiraException
username
- Username of the watcher to remove
JiraException
- when the operation failspublic String toString()
toString
in class Object
public String getKey()
public User getAssignee()
public List<Attachment> getAttachments()
public List<Comment> getComments()
public List<Component> getComponents()
public String getDescription()
public Date getDueDate()
public List<Version> getFixVersions()
public List<IssueLink> getIssueLinks()
public IssueType getIssueType()
public List<String> getLabels()
public Priority getPriority()
public Project getProject()
public User getReporter()
public Resolution getResolution()
public Date getResolutionDate()
public Status getStatus()
public List<Issue> getSubtasks()
public String getSummary()
public TimeTracking getTimeTracking()
public List<Version> getVersions()
public Votes getVotes()
public Watches getWatches()
public List<WorkLog> getWorkLogs()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |