com.atlassian.jira.rest.client.api.domain
Class Issue

java.lang.Object
  extended by com.atlassian.jira.rest.client.api.domain.BasicIssue
      extended by com.atlassian.jira.rest.client.api.domain.Issue
All Implemented Interfaces:
AddressableEntity, ExpandableResource, IdentifiableEntity<java.lang.Long>

public class Issue
extends BasicIssue
implements ExpandableResource

Single JIRA issue

Since:
v0.1

Constructor Summary
Issue(java.lang.String summary, java.net.URI self, java.lang.String key, java.lang.Long id, BasicProject project, BasicIssueType issueType, BasicStatus status, java.lang.String description, BasicPriority priority, BasicResolution resolution, java.util.Collection<Attachment> attachments, User reporter, User assignee, org.joda.time.DateTime creationDate, org.joda.time.DateTime updateDate, org.joda.time.DateTime dueDate, java.util.Collection<Version> affectedVersions, java.util.Collection<Version> fixVersions, java.util.Collection<BasicComponent> components, TimeTracking timeTracking, java.util.Collection<IssueField> issueFields, java.util.Collection<Comment> comments, java.net.URI transitionsUri, java.util.Collection<IssueLink> issueLinks, BasicVotes votes, java.util.Collection<Worklog> worklogs, BasicWatchers watchers, java.lang.Iterable<java.lang.String> expandos, java.util.Collection<Subtask> subtasks, java.util.Collection<ChangelogGroup> changelog, java.util.Set<java.lang.String> labels)
           
 
Method Summary
 java.lang.Iterable<Version> getAffectedVersions()
           
 User getAssignee()
           
 java.lang.Iterable<Attachment> getAttachments()
           
 java.net.URI getAttachmentsUri()
           
 java.lang.Iterable<ChangelogGroup> getChangelog()
          Returns changelog available for issues retrieved with CHANGELOG expanded.
 java.lang.Iterable<Comment> getComments()
           
 java.net.URI getCommentsUri()
           
 java.lang.Iterable<BasicComponent> getComponents()
           
 org.joda.time.DateTime getCreationDate()
           
 java.lang.String getDescription()
           
 org.joda.time.DateTime getDueDate()
           
 java.lang.Iterable<java.lang.String> getExpandos()
           
 IssueField getField(java.lang.String id)
           
 IssueField getFieldByName(java.lang.String name)
          This method returns the first field with specified name.
 java.lang.Iterable<IssueField> getFields()
           
 java.lang.Iterable<Version> getFixVersions()
           
 java.lang.Iterable<IssueLink> getIssueLinks()
           
 BasicIssueType getIssueType()
           
 java.util.Set<java.lang.String> getLabels()
           
 BasicPriority getPriority()
           
 BasicProject getProject()
           
 User getReporter()
           
 BasicResolution getResolution()
           
 BasicStatus getStatus()
           
 java.lang.Iterable<Subtask> getSubtasks()
           
 java.lang.String getSummary()
           
 TimeTracking getTimeTracking()
           
protected  com.google.common.base.Objects.ToStringHelper getToStringHelper()
           
 java.net.URI getTransitionsUri()
           
 org.joda.time.DateTime getUpdateDate()
           
 BasicVotes getVotes()
           
 java.net.URI getVotesUri()
           
 BasicWatchers getWatchers()
           
 java.lang.Iterable<Worklog> getWorklogs()
           
 java.net.URI getWorklogUri()
           
 
Methods inherited from class com.atlassian.jira.rest.client.api.domain.BasicIssue
equals, getId, getKey, getSelf, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Issue

public Issue(java.lang.String summary,
             java.net.URI self,
             java.lang.String key,
             java.lang.Long id,
             BasicProject project,
             BasicIssueType issueType,
             BasicStatus status,
             java.lang.String description,
             @Nullable
             BasicPriority priority,
             @Nullable
             BasicResolution resolution,
             java.util.Collection<Attachment> attachments,
             @Nullable
             User reporter,
             @Nullable
             User assignee,
             org.joda.time.DateTime creationDate,
             org.joda.time.DateTime updateDate,
             org.joda.time.DateTime dueDate,
             java.util.Collection<Version> affectedVersions,
             java.util.Collection<Version> fixVersions,
             java.util.Collection<BasicComponent> components,
             @Nullable
             TimeTracking timeTracking,
             java.util.Collection<IssueField> issueFields,
             java.util.Collection<Comment> comments,
             @Nullable
             java.net.URI transitionsUri,
             @Nullable
             java.util.Collection<IssueLink> issueLinks,
             BasicVotes votes,
             java.util.Collection<Worklog> worklogs,
             BasicWatchers watchers,
             java.lang.Iterable<java.lang.String> expandos,
             @Nullable
             java.util.Collection<Subtask> subtasks,
             @Nullable
             java.util.Collection<ChangelogGroup> changelog,
             java.util.Set<java.lang.String> labels)
Method Detail

getStatus

public BasicStatus getStatus()

getReporter

@Nullable
public User getReporter()
Returns:
reporter of this issue or null if this issue has no reporter

getAssignee

@Nullable
public User getAssignee()
Returns:
assignee of this issue or null if this issue is unassigned.

getSummary

public java.lang.String getSummary()

getPriority

@Nullable
public BasicPriority getPriority()
Returns:
priority of this issue

getIssueLinks

@Nullable
public java.lang.Iterable<IssueLink> getIssueLinks()
Returns:
issue links for this issue (possibly nothing) or null when issue links are deactivated for this JIRA instance

getSubtasks

@Nullable
public java.lang.Iterable<Subtask> getSubtasks()

getFields

public java.lang.Iterable<IssueField> getFields()
Returns:
fields inaccessible by concrete getter methods (e.g. all custom issueFields)

getField

@Nullable
public IssueField getField(java.lang.String id)
Parameters:
id - identifier of the field (inaccessible by concrete getter method)
Returns:
field with given id, or null when no field with given id exists for this issue

getFieldByName

@Nullable
public IssueField getFieldByName(java.lang.String name)
This method returns the first field with specified name. Names of fields in JIRA do not need to be unique. Therefore this method does not guarantee that you will get what you really want. It's added just for convenience. For identify fields you should use id rather than name.

Parameters:
name - name of the field.
Returns:
the first field matching selected name or null when no field with given name exists for this issue

getExpandos

public java.lang.Iterable<java.lang.String> getExpandos()
Specified by:
getExpandos in interface ExpandableResource

getIssueType

public BasicIssueType getIssueType()
Returns:
issue type

getAttachments

public java.lang.Iterable<Attachment> getAttachments()
Returns:
attachments of this issue

getAttachmentsUri

public java.net.URI getAttachmentsUri()

getWorklogUri

public java.net.URI getWorklogUri()

getComments

public java.lang.Iterable<Comment> getComments()
Returns:
comments for this issue

getCommentsUri

public java.net.URI getCommentsUri()

getProject

public BasicProject getProject()
Returns:
project this issue belongs to

getVotes

@Nullable
public BasicVotes getVotes()
Returns:
null

getWorklogs

public java.lang.Iterable<Worklog> getWorklogs()

getWatchers

@Nullable
public BasicWatchers getWatchers()
Returns:
null when watching is disabled in JIRA

getFixVersions

@Nullable
public java.lang.Iterable<Version> getFixVersions()

getTransitionsUri

@Nullable
public java.net.URI getTransitionsUri()

getAffectedVersions

@Nullable
public java.lang.Iterable<Version> getAffectedVersions()

getComponents

public java.lang.Iterable<BasicComponent> getComponents()

getLabels

public java.util.Set<java.lang.String> getLabels()

getChangelog

@Nullable
public java.lang.Iterable<ChangelogGroup> getChangelog()
Returns changelog available for issues retrieved with CHANGELOG expanded.

Returns:
issue changelog or null if CHANGELOG has not been expanded or REST API on the server side does not serve this information (pre-5.0)
Since:
com.atlassian.jira.rest.client.api 0.6, server 5.0
See Also:
IssueRestClient.getIssue(String, Iterable)

getVotesUri

public java.net.URI getVotesUri()

getResolution

@Nullable
public BasicResolution getResolution()

getCreationDate

public org.joda.time.DateTime getCreationDate()

getUpdateDate

public org.joda.time.DateTime getUpdateDate()

getDueDate

public org.joda.time.DateTime getDueDate()

getTimeTracking

@Nullable
public TimeTracking getTimeTracking()

getDescription

@Nullable
public java.lang.String getDescription()

getToStringHelper

protected com.google.common.base.Objects.ToStringHelper getToStringHelper()
Overrides:
getToStringHelper in class BasicIssue


Copyright © 2013 Atlassian. All Rights Reserved.