Class GenericIssueWrapper

java.lang.Object
com.atlassian.jira.issue.GenericIssueWrapper
All Implemented Interfaces:
WithId, WithKey, IssueContext, Issue, OfBizValueWrapper, Serializable
Direct Known Subclasses:
GenericMutableIssueWrapper, RenderParameterHoldingIssueWrapper, TemplateIssue

public class GenericIssueWrapper extends Object implements Issue
Please extend this class if you want to change the behaviour of just a few methods of `Issue`. Thanks
See Also:
  • Constructor Details

    • GenericIssueWrapper

      public GenericIssueWrapper(Issue delegate)
  • Method Details

    • getDelegate

      public Issue getDelegate()
    • getId

      public Long getId()
      Specified by:
      getId in interface Issue
      Specified by:
      getId in interface WithId
      Returns:
      the unique id of the entity.
    • getProject

      public org.ofbiz.core.entity.GenericValue getProject()
      Specified by:
      getProject in interface Issue
    • getProjectObject

      public Project getProjectObject()
      Description copied from interface: Issue
      Gets the Project for this Issue.
      Specified by:
      getProjectObject in interface Issue
      Specified by:
      getProjectObject in interface IssueContext
      Returns:
      The Project for this Issue.
    • getProjectId

      public Long getProjectId()
      Description copied from interface: Issue
      Gets the ID of the Project for this Issue.
      Specified by:
      getProjectId in interface Issue
      Specified by:
      getProjectId in interface IssueContext
      Returns:
      The ID of the Project for this Issue.
    • getIssueType

      public IssueType getIssueType()
      Description copied from interface: Issue
      Gets the IssueType for this Issue.
      Specified by:
      getIssueType in interface Issue
      Specified by:
      getIssueType in interface IssueContext
      Returns:
      The IssueType for this Issue.
    • getIssueTypeObject

      public IssueType getIssueTypeObject()
      Description copied from interface: Issue
      Gets the IssueType for this Issue.
      Specified by:
      getIssueTypeObject in interface Issue
      Specified by:
      getIssueTypeObject in interface IssueContext
      Returns:
      The IssueType for this Issue.
    • getIssueTypeId

      public String getIssueTypeId()
      Description copied from interface: Issue
      Gets the ID of the IssueType for this Issue.
      Specified by:
      getIssueTypeId in interface Issue
      Specified by:
      getIssueTypeId in interface IssueContext
      Returns:
      The ID of the IssueType for this Issue.
    • getSummary

      public String getSummary()
      Specified by:
      getSummary in interface Issue
    • getAssigneeUser

      public ApplicationUser getAssigneeUser()
      Description copied from interface: Issue
      Returns the Assignee User.

      If there is no assignee it returns null, else it is guaranteed to return a non-null User. If the User is no longer available, it will create a dummy User object based on the username.

      Legacy synonym for Issue.getAssignee()

      Specified by:
      getAssigneeUser in interface Issue
      Returns:
      the Assignee User.
      See Also:
    • getAssignee

      public ApplicationUser getAssignee()
      Description copied from interface: Issue
      Returns the Assignee User.

      Warning: previous incarnations of this method returned com.opensymphony.user.User. This class has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with earlier versions.

      Specified by:
      getAssignee in interface Issue
      Returns:
      the Assignee User.
    • getAssigneeId

      public String getAssigneeId()
      Specified by:
      getAssigneeId in interface Issue
      Returns:
      a user key of the assignee
    • getComponentObjects

      public Collection<ProjectComponent> getComponentObjects()
      Specified by:
      getComponentObjects in interface Issue
      Returns:
      collection of project components (as objects) that this issue is assigned to
    • getComponents

      public Collection<ProjectComponent> getComponents()
      Specified by:
      getComponents in interface Issue
      Returns:
      collection of project components (as objects) that this issue is assigned to
    • getReporterUser

      public ApplicationUser getReporterUser()
      Description copied from interface: Issue
      Returns the Reporter User.

      This will return a non-null User object even if the User has been deleted.

      Legacy synonym for Issue.getReporter().

      Specified by:
      getReporterUser in interface Issue
      Returns:
      the Reporter User.
      See Also:
    • getReporter

      public ApplicationUser getReporter()
      Description copied from interface: Issue
      Returns the Reporter User.

      Warning: previous incarnations of this method returned com.opensymphony.user.User. This class has now been removed from the JIRA API, meaning that the 5.0 version is not binary or source compatible with earlier versions.

      Specified by:
      getReporter in interface Issue
      Returns:
      the Reporter User.
    • getReporterId

      public String getReporterId()
      Specified by:
      getReporterId in interface Issue
      Returns:
      a user key of the reporter
    • getCreator

      public ApplicationUser getCreator()
      Specified by:
      getCreator in interface Issue
    • getCreatorId

      public String getCreatorId()
      Specified by:
      getCreatorId in interface Issue
      Returns:
      a user key of the creator
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface Issue
    • getEnvironment

      public String getEnvironment()
      Specified by:
      getEnvironment in interface Issue
    • getAffectedVersions

      public Collection<Version> getAffectedVersions()
      Specified by:
      getAffectedVersions in interface Issue
      Returns:
      a collection of 'affects' Version objects.
    • getFixVersions

      public Collection<Version> getFixVersions()
      Specified by:
      getFixVersions in interface Issue
      Returns:
      a collection of fix-for Version objects.
    • getDueDate

      public Timestamp getDueDate()
      Specified by:
      getDueDate in interface Issue
    • getSecurityLevel

      public org.ofbiz.core.entity.GenericValue getSecurityLevel()
      Description copied from interface: Issue
      Returns the Security Level for this Issue.
      Specified by:
      getSecurityLevel in interface Issue
      Returns:
      the Security Level for this Issue.
    • getSecurityLevelId

      public Long getSecurityLevelId()
      Description copied from interface: Issue
      Returns the Security Level for this Issue.
      Specified by:
      getSecurityLevelId in interface Issue
      Returns:
      the Security Level for this Issue.
    • getPriority

      @Nullable public Priority getPriority()
      Description copied from interface: Issue
      Returns the Priority for this Issue.
      Specified by:
      getPriority in interface Issue
      Returns:
      the Priority for this Issue.
    • getPriorityObject

      @Nullable public Priority getPriorityObject()
      Description copied from interface: Issue
      Returns the Priority for this Issue.
      Specified by:
      getPriorityObject in interface Issue
      Returns:
      the Priority for this Issue.
    • getResolutionId

      public String getResolutionId()
      Specified by:
      getResolutionId in interface Issue
    • getResolution

      public Resolution getResolution()
      Description copied from interface: Issue
      Returns the Resolution for this Issue.
      Specified by:
      getResolution in interface Issue
      Returns:
      the Resolution for this Issue.
    • getResolutionObject

      public Resolution getResolutionObject()
      Description copied from interface: Issue
      Returns the Resolution for this Issue.
      Specified by:
      getResolutionObject in interface Issue
      Returns:
      the Resolution for this Issue.
    • getKey

      public String getKey()
      Specified by:
      getKey in interface Issue
      Specified by:
      getKey in interface WithKey
      Returns:
      the entity key.
    • getNumber

      public Long getNumber()
      Specified by:
      getNumber in interface Issue
    • getVotes

      public Long getVotes()
      Specified by:
      getVotes in interface Issue
    • getWatches

      public Long getWatches()
      Specified by:
      getWatches in interface Issue
    • getCreated

      public Timestamp getCreated()
      Specified by:
      getCreated in interface Issue
    • getUpdated

      public Timestamp getUpdated()
      Specified by:
      getUpdated in interface Issue
    • getResolutionDate

      public Timestamp getResolutionDate()
      Description copied from interface: Issue
      Returns the datetime that an issue was resolved on. Will be null if it hasn't been resolved yet, or if an issue has been returned to the 'unresolved' state.
      Specified by:
      getResolutionDate in interface Issue
      Returns:
      Timestamp of when an issue was resolved, or null
    • getWorkflowId

      public Long getWorkflowId()
      Specified by:
      getWorkflowId in interface Issue
    • getCustomFieldValue

      public Object getCustomFieldValue(CustomField customField)
      Specified by:
      getCustomFieldValue in interface Issue
      Parameters:
      customField - the CustomField
      Returns:
      A custom field's value. Will be a List, User, Timestamp etc, depending on custom field type.
    • getStatus

      public Status getStatus()
      Specified by:
      getStatus in interface Issue
    • getStatusId

      public String getStatusId()
      Specified by:
      getStatusId in interface Issue
    • getStatusObject

      public Status getStatusObject()
      Specified by:
      getStatusObject in interface Issue
    • getOriginalEstimate

      public Long getOriginalEstimate()
      Description copied from interface: Issue
      This is the "original estimate" of work to be performed on this issue, in seconds.
      Specified by:
      getOriginalEstimate in interface Issue
      Returns:
      the "original estimate" of work to be performed on this issue, in seconds.
    • getEstimate

      public Long getEstimate()
      Description copied from interface: Issue
      This is the "remaining estimate" of work left to be performed on this issue, in seconds.

      A better name would be getRemainingEstimate but for historical reasons it is called what it is called.

      Specified by:
      getEstimate in interface Issue
      Returns:
      the "remaining estimate" of work left to be performed on this issue, in seconds.
    • getTimeSpent

      public Long getTimeSpent()
      Description copied from interface: Issue
      This is the "total time spent" working on this issue, in seconds.
      Specified by:
      getTimeSpent in interface Issue
      Returns:
      the "total time spent" working on this issue, in seconds.
    • getExternalFieldValue

      public Object getExternalFieldValue(String fieldId)
      Specified by:
      getExternalFieldValue in interface Issue
    • isSubTask

      public boolean isSubTask()
      Specified by:
      isSubTask in interface Issue
    • getParentId

      public Long getParentId()
      Specified by:
      getParentId in interface Issue
    • isCreated

      public boolean isCreated()
      Specified by:
      isCreated in interface Issue
    • getParentObject

      public Issue getParentObject()
      Description copied from interface: Issue
      If this issue is a subtask, return its parent.
      Specified by:
      getParentObject in interface Issue
      Returns:
      The parent Issue, or null if the issue is not a subtask.
    • getParent

      public org.ofbiz.core.entity.GenericValue getParent()
      Specified by:
      getParent in interface Issue
    • getSubTasks

      public Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
      Specified by:
      getSubTasks in interface Issue
    • getSubTaskObjects

      public Collection<Issue> getSubTaskObjects()
      Description copied from interface: Issue
      Gets all the issue's subtasks.
      Specified by:
      getSubTaskObjects in interface Issue
      Returns:
      A collection of MutableIssues
    • isEditable

      public boolean isEditable()
      Specified by:
      isEditable in interface Issue
    • getIssueRenderContext

      public IssueRenderContext getIssueRenderContext()
      Specified by:
      getIssueRenderContext in interface Issue
    • getAttachments

      public Collection<Attachment> getAttachments()
      Specified by:
      getAttachments in interface Issue
      Returns:
      A collection of Attachment objects
    • getLabels

      public Set<Label> getLabels()
      Description copied from interface: Issue
      Returns a set of all the labels for this issue or an empty set if none exist yet.
      Specified by:
      getLabels in interface Issue
      Returns:
      a set of all the labels for this issue or an empty set if none exist yet
    • isArchived

      public boolean isArchived()
      Description copied from interface: Issue
      Returns true if issue is archived
      Specified by:
      isArchived in interface Issue
      Returns:
      is issue archived
    • getArchivedByUser

      public ApplicationUser getArchivedByUser()
      Description copied from interface: Issue
      Returns the user who archived this issue, or null if it wasn't archived.
      Specified by:
      getArchivedByUser in interface Issue
      Returns:
      the user who archived this issue, or null if it wasn't archived.
    • getArchivedById

      public String getArchivedById()
      Description copied from interface: Issue
      Returns the userid of user who archived this issue, or null if it wasn't archived.
      Specified by:
      getArchivedById in interface Issue
      Returns:
      the userid of user who archived this issue, or null if it wasn't archived.
    • getArchivedDate

      public Timestamp getArchivedDate()
      Description copied from interface: Issue
      Returns the timestamp when this issue was archived, or null if it wasn't archived.
      Specified by:
      getArchivedDate in interface Issue
      Returns:
      timestamp when this issue was archived, or null if it wasn't archived.
    • getString

      public String getString(String name)
      Description copied from interface: OfBizValueWrapper
      Retrieve a String field.
      Specified by:
      getString in interface OfBizValueWrapper
      Parameters:
      name - the field name
      Returns:
      the value for the given field.
    • getTimestamp

      public Timestamp getTimestamp(String name)
      Description copied from interface: OfBizValueWrapper
      Retrieve a timestamp field.
      Specified by:
      getTimestamp in interface OfBizValueWrapper
      Parameters:
      name - the field name
      Returns:
      the value for the given field.
    • getLong

      public Long getLong(String name)
      Description copied from interface: OfBizValueWrapper
      Retrieve a numeric field.
      Specified by:
      getLong in interface OfBizValueWrapper
      Parameters:
      name - the field name
      Returns:
      the value for the given field.
    • getGenericValue

      public org.ofbiz.core.entity.GenericValue getGenericValue()
      Description copied from interface: Issue
      Get the backing GenericValue object.
      Specified by:
      getGenericValue in interface Issue
      Specified by:
      getGenericValue in interface OfBizValueWrapper
      Returns:
      the backing GenericValue object.
    • store

      public void store()
      Description copied from interface: OfBizValueWrapper
      Persist this object's immediate fields.

      As of JIRA 7.0 this method is considered optional. If this object is actually immutable, then it will throw UnsupportedOperationException because there are no possible mutations to store.

      Specified by:
      store in interface OfBizValueWrapper