|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.AbstractIssue com.atlassian.jira.issue.IssueImpl
public class IssueImpl
Issue implementation which caches read data, and can persist its data to the database (via an Ofbiz GenericValue
.
Field Summary |
---|
Fields inherited from class com.atlassian.jira.issue.AbstractIssue |
---|
attachmentManager, constantsManager, issueManager |
Constructor Summary | |
---|---|
IssueImpl(org.ofbiz.core.entity.GenericValue genericValue,
IssueManager issueManager,
ProjectManager projectManager,
VersionManager versionManager,
IssueSecurityLevelManager issueSecurityLevelManager,
ConstantsManager constantsManager,
SubTaskManager subTaskManager,
AttachmentManager attachmentManager,
LabelManager labelManager,
ProjectComponentManager projectComponentManager,
UserManager userManager)
Load an issue backed by the database. |
|
IssueImpl(Issue issue,
IssueManager issueManager,
ProjectManager projectManager,
VersionManager versionManager,
IssueSecurityLevelManager issueSecurityLevelManager,
ConstantsManager constantsManager,
SubTaskManager subTaskManager,
AttachmentManager attachmentManager,
LabelManager labelManager,
ProjectComponentManager projectComponentManager,
UserManager userManager)
Create an issue, cloning another issue's data. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
Collection<Version> |
getAffectedVersions()
|
com.atlassian.crowd.embedded.api.User |
getAssignee()
Returns the Assignee User. |
String |
getAssigneeId()
|
com.atlassian.crowd.embedded.api.User |
getAssigneeUser()
Returns the Assignee User. |
Collection<ProjectComponent> |
getComponentObjects()
|
Collection<org.ofbiz.core.entity.GenericValue> |
getComponents()
|
Timestamp |
getCreated()
|
Object |
getCustomFieldValue(CustomField customField)
|
String |
getDescription()
|
Timestamp |
getDueDate()
|
String |
getEnvironment()
|
Long |
getEstimate()
This is the "remaining estimate" of work left to be performed on this issue, in milliseconds. |
Object |
getExternalFieldValue(String fieldId)
|
Collection<Version> |
getFixVersions()
|
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Get the backing GenericValue object. |
Long |
getId()
|
static MutableIssue |
getIssueObject(org.ofbiz.core.entity.GenericValue genericValue)
Deprecated. You should construct this yourself if at all possible, or use IssueFactory.getIssue(org.ofbiz.core.entity.GenericValue) instead. |
IssueRenderContext |
getIssueRenderContext()
|
org.ofbiz.core.entity.GenericValue |
getIssueType()
Gets the IssueType for this Issue. |
String |
getKey()
|
Set<Label> |
getLabels()
Returns a set of all the labels for this issue or an empty set if none exist yet. |
Long |
getLong(String name)
Retrieve a numeric field. |
Map<String,ModifiedValue> |
getModifiedFields()
Retrieve a map of issue fields whose values have been set (since object creation or last MutableIssue.resetModifiedFields() call. |
Long |
getOriginalEstimate()
This is the "original estimate" of work to be performed on this issue, in milliseconds. |
org.ofbiz.core.entity.GenericValue |
getParent()
Deprecated. Use getParentObject() instead. |
Long |
getParentId()
|
Issue |
getParentObject()
If this issue is a subtask, return its parent. |
org.ofbiz.core.entity.GenericValue |
getPriority()
|
org.ofbiz.core.entity.GenericValue |
getProject()
Gets the Project for this IssueContext. |
Project |
getProjectObject()
Gets the Project for this Issue. |
com.atlassian.crowd.embedded.api.User |
getReporter()
Returns the Reporter User. |
String |
getReporterId()
|
com.atlassian.crowd.embedded.api.User |
getReporterUser()
Returns the Reporter User. |
org.ofbiz.core.entity.GenericValue |
getResolution()
|
Timestamp |
getResolutionDate()
Returns the datetime that an issue was resolved on. |
String |
getResolutionId()
|
org.ofbiz.core.entity.GenericValue |
getSecurityLevel()
|
Long |
getSecurityLevelId()
|
org.ofbiz.core.entity.GenericValue |
getStatus()
|
String |
getString(String name)
Retrieve a String field. |
Collection<Issue> |
getSubTaskObjects()
Gets all the issue's subtasks. |
Collection<org.ofbiz.core.entity.GenericValue> |
getSubTasks()
|
String |
getSummary()
|
Long |
getTimeSpent()
This is the "total time spent" working on this issue, in milliseconds. |
Timestamp |
getTimestamp(String name)
Retrieve a timestamp field. |
Timestamp |
getUpdated()
|
Long |
getVotes()
|
Long |
getWatches()
|
Long |
getWorkflowId()
|
int |
hashCode()
|
boolean |
isCreated()
|
boolean |
isSubTask()
|
void |
resetModifiedFields()
Reset the internal list of modified fields. |
void |
setAffectedVersions(Collection<Version> affectedVersions)
|
void |
setAssignee(com.atlassian.crowd.embedded.api.User assignee)
|
void |
setAssigneeId(String assigneeName)
|
void |
setComponentObjects(Collection<ProjectComponent> components)
Sets the components for this Issue. |
void |
setComponents(Collection<org.ofbiz.core.entity.GenericValue> components)
Sets the components for this Issue. |
void |
setCreated(Timestamp created)
|
void |
setCustomFieldValue(CustomField customField,
Object value)
Sets a custom field value on this Issue Object, but does not write it to the database. |
void |
setDescription(String description)
|
void |
setDueDate(Timestamp dueDate)
|
void |
setEnvironment(String environment)
|
void |
setEstimate(Long estimate)
|
void |
setExternalFieldValue(String fieldId,
Object newValue)
This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the MutableIssue.getModifiedFields() and Issue.getExternalFieldValue(String) . |
void |
setExternalFieldValue(String fieldId,
Object oldValue,
Object newValue)
This can be used bya field to "place" a custom object into the MutableIssue so that it can retrived it by key at a later point via the MutableIssue.getModifiedFields() and Issue.getExternalFieldValue(String) . |
void |
setFixVersions(Collection<Version> fixVersions)
|
void |
setIssueType(org.ofbiz.core.entity.GenericValue issueType)
Sets the IssueType for this Issue. |
void |
setIssueTypeId(String issueTypeId)
Set the issue type, by type id. |
void |
setIssueTypeObject(IssueType issueType)
Sets the IssueType for this Issue. |
void |
setKey(String key)
|
void |
setLabels(Set<Label> labels)
Set the labels for this issue. |
void |
setOriginalEstimate(Long originalEstimate)
|
void |
setParentId(Long parentId)
Sets the ParentId of this Issue. |
void |
setParentObject(Issue parentIssue)
Sets the parent Issue Object for this Issue (subtask). |
void |
setPriority(org.ofbiz.core.entity.GenericValue priority)
Sets the priority for this Issue. |
void |
setPriorityId(String priorityId)
|
void |
setPriorityObject(Priority priority)
Sets the priority for this Issue. |
void |
setProject(org.ofbiz.core.entity.GenericValue project)
Sets the Project for this Issue. |
void |
setProjectId(Long projectId)
Sets the project by id. |
void |
setProjectObject(Project project)
Sets the Project for this Issue. |
void |
setReporter(com.atlassian.crowd.embedded.api.User reporter)
|
void |
setReporterId(String reporterId)
Sets the reporter in this issue. |
void |
setResolution(org.ofbiz.core.entity.GenericValue resolution)
Sets the resolution for this Issue. |
void |
setResolutionDate(Timestamp resolutionDate)
|
void |
setResolutionId(String resolutionId)
|
void |
setResolutionObject(Resolution resolution)
Sets the resolution for this Issue. |
void |
setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
Sets the SecurityLevel for this Issue. |
void |
setSecurityLevelId(Long securityLevelId)
Sets the SecurityLevel for this Issue. |
void |
setStatus(org.ofbiz.core.entity.GenericValue status)
Sets the status for this Issue. |
void |
setStatusId(String statusId)
Set issue's status by status id ("1", "2" etc). |
void |
setStatusObject(Status status)
Sets the status for this Issue. |
void |
setSummary(String summary)
|
void |
setTimeSpent(Long timespent)
|
void |
setUpdated(Timestamp updated)
|
void |
setVotes(Long votes)
|
void |
setWatches(Long watches)
|
void |
setWorkflowId(Long workflowId)
|
void |
store()
Persist this object's immediate fields. |
String |
toString()
|
Methods inherited from class com.atlassian.jira.issue.AbstractIssue |
---|
getAttachments, getIssueTypeObject, getPriorityObject, getResolutionObject, getStatusObject, isEditable |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.atlassian.jira.issue.Issue |
---|
getAttachments, getIssueTypeObject, getPriorityObject, getResolutionObject, getStatusObject, isEditable |
Constructor Detail |
---|
public IssueImpl(org.ofbiz.core.entity.GenericValue genericValue, IssueManager issueManager, ProjectManager projectManager, VersionManager versionManager, IssueSecurityLevelManager issueSecurityLevelManager, ConstantsManager constantsManager, SubTaskManager subTaskManager, AttachmentManager attachmentManager, LabelManager labelManager, ProjectComponentManager projectComponentManager, UserManager userManager)
genericValue
- generic value of the issueissueManager
- issue managerprojectManager
- project managerversionManager
- version managerissueSecurityLevelManager
- issue security level managerconstantsManager
- constant managersubTaskManager
- sub-task managerattachmentManager
- attachment managerlabelManager
- label managerprojectComponentManager
- project component manageruserManager
- user managerpublic IssueImpl(Issue issue, IssueManager issueManager, ProjectManager projectManager, VersionManager versionManager, IssueSecurityLevelManager issueSecurityLevelManager, ConstantsManager constantsManager, SubTaskManager subTaskManager, AttachmentManager attachmentManager, LabelManager labelManager, ProjectComponentManager projectComponentManager, UserManager userManager)
issue
- issueissueManager
- issue managerprojectManager
- project managerversionManager
- version managerissueSecurityLevelManager
- issue security level managerconstantsManager
- constant managersubTaskManager
- sub-task managerattachmentManager
- attachment managerlabelManager
- label managerprojectComponentManager
- project component manageruserManager
- user managerMethod Detail |
---|
public static MutableIssue getIssueObject(org.ofbiz.core.entity.GenericValue genericValue)
IssueFactory.getIssue(org.ofbiz.core.entity.GenericValue)
instead.
genericValue
- generic value of the issue
public Long getId()
getId
in interface Issue
public org.ofbiz.core.entity.GenericValue getProject()
IssueContext
A null return value is used to represent that this context applies to all Projects.
getProject
in interface IssueContext
getProject
in interface Issue
public Project getProjectObject()
Issue
getProjectObject
in interface IssueContext
getProjectObject
in interface Issue
public void setProjectId(Long projectId)
MutableIssue
MutableIssue.setProject(org.ofbiz.core.entity.GenericValue)
setProjectId
in interface MutableIssue
projectId
- The id of the projectpublic void setProject(org.ofbiz.core.entity.GenericValue project)
MutableIssue
setProject
in interface MutableIssue
project
- the new Projectpublic void setProjectObject(Project project)
MutableIssue
setProjectObject
in interface MutableIssue
project
- the new Projectpublic org.ofbiz.core.entity.GenericValue getIssueType()
Issue
getIssueType
in interface IssueContext
getIssueType
in interface Issue
public void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
MutableIssue
setIssueType
in interface MutableIssue
issueType
- the new IssueTypepublic void setIssueTypeObject(IssueType issueType)
MutableIssue
setIssueTypeObject
in interface MutableIssue
issueType
- the new IssueTypepublic void setIssueTypeId(String issueTypeId)
setIssueTypeId
in interface MutableIssue
public String getSummary()
getSummary
in interface Issue
public void setSummary(String summary)
setSummary
in interface MutableIssue
public com.atlassian.crowd.embedded.api.User getReporterUser()
Issue
Issue.getReporter()
.
getReporterUser
in interface Issue
Issue.getReporter()
public com.atlassian.crowd.embedded.api.User getReporter()
Issue
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.
getReporter
in interface Issue
public String getReporterId()
getReporterId
in interface Issue
public void setReporter(com.atlassian.crowd.embedded.api.User reporter)
setReporter
in interface MutableIssue
public void setReporterId(String reporterId)
MutableIssue
setReporterId
in interface MutableIssue
reporterId
- username of the desired reporter.MutableIssue.setReporter(User)
public String getDescription()
getDescription
in interface Issue
public void setDescription(String description)
setDescription
in interface MutableIssue
public String getEnvironment()
getEnvironment
in interface Issue
public void setEnvironment(String environment)
setEnvironment
in interface MutableIssue
public com.atlassian.crowd.embedded.api.User getAssigneeUser()
Issue
Issue.getAssignee()
getAssigneeUser
in interface Issue
Issue.getAssignee()
public com.atlassian.crowd.embedded.api.User getAssignee()
Issue
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.
getAssignee
in interface Issue
public String getAssigneeId()
getAssigneeId
in interface Issue
public void setAssignee(com.atlassian.crowd.embedded.api.User assignee)
setAssignee
in interface MutableIssue
public void setAssigneeId(String assigneeName)
setAssigneeId
in interface MutableIssue
public Collection<ProjectComponent> getComponentObjects()
getComponentObjects
in interface Issue
public Collection<org.ofbiz.core.entity.GenericValue> getComponents()
getComponents
in interface Issue
public void setComponents(Collection<org.ofbiz.core.entity.GenericValue> components)
MutableIssue
setComponents
in interface MutableIssue
components
- the new components valuepublic void setComponentObjects(Collection<ProjectComponent> components)
MutableIssue
setComponentObjects
in interface MutableIssue
components
- the new components valuepublic Collection<Version> getFixVersions()
getFixVersions
in interface Issue
Version
objects.public void setFixVersions(Collection<Version> fixVersions)
setFixVersions
in interface MutableIssue
fixVersions
- A collection of fix-for Version
objects.public Timestamp getDueDate()
getDueDate
in interface Issue
public void setDueDate(Timestamp dueDate)
setDueDate
in interface MutableIssue
public org.ofbiz.core.entity.GenericValue getSecurityLevel()
getSecurityLevel
in interface Issue
public Long getSecurityLevelId()
getSecurityLevelId
in interface Issue
public void setSecurityLevelId(Long securityLevelId)
MutableIssue
setSecurityLevelId
in interface MutableIssue
securityLevelId
- the new SecurityLevel valuepublic void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
MutableIssue
setSecurityLevel
in interface MutableIssue
securityLevel
- the new SecurityLevel valuepublic org.ofbiz.core.entity.GenericValue getPriority()
getPriority
in interface Issue
public void setPriority(org.ofbiz.core.entity.GenericValue priority)
MutableIssue
setPriority
in interface MutableIssue
priority
- the new priority valuepublic void setPriorityObject(Priority priority)
MutableIssue
setPriorityObject
in interface MutableIssue
priority
- the new priority valuepublic void setPriorityId(String priorityId)
setPriorityId
in interface MutableIssue
public String getResolutionId()
getResolutionId
in interface Issue
public org.ofbiz.core.entity.GenericValue getResolution()
getResolution
in interface Issue
public void setResolutionId(String resolutionId)
setResolutionId
in interface MutableIssue
public void setResolution(org.ofbiz.core.entity.GenericValue resolution)
MutableIssue
setResolution
in interface MutableIssue
resolution
- the new resolution valuepublic void setResolutionObject(Resolution resolution)
MutableIssue
setResolutionObject
in interface MutableIssue
resolution
- the new resolution valuepublic String getKey()
getKey
in interface Issue
public void setKey(String key)
setKey
in interface MutableIssue
public Long getVotes()
getVotes
in interface Issue
public void setVotes(Long votes)
setVotes
in interface MutableIssue
public Long getWatches()
getWatches
in interface Issue
public void setWatches(Long watches)
setWatches
in interface MutableIssue
public Collection<Version> getAffectedVersions()
getAffectedVersions
in interface Issue
Version
objects.public void setAffectedVersions(Collection<Version> affectedVersions)
setAffectedVersions
in interface MutableIssue
affectedVersions
- A collection of 'affects' Version
objects.public String getString(String name)
OfBizValueWrapper
getString
in interface OfBizValueWrapper
name
- the field name
public Timestamp getTimestamp(String name)
OfBizValueWrapper
getTimestamp
in interface OfBizValueWrapper
name
- the field name
public Long getLong(String name)
OfBizValueWrapper
getLong
in interface OfBizValueWrapper
name
- the field name
public org.ofbiz.core.entity.GenericValue getGenericValue()
OfBizValueWrapper
getGenericValue
in interface OfBizValueWrapper
public Timestamp getCreated()
getCreated
in interface Issue
public void setCreated(Timestamp created)
setCreated
in interface MutableIssue
public Timestamp getUpdated()
getUpdated
in interface Issue
public void setUpdated(Timestamp updated)
setUpdated
in interface MutableIssue
public Timestamp getResolutionDate()
Issue
getResolutionDate
in interface Issue
public void setResolutionDate(Timestamp resolutionDate)
setResolutionDate
in interface MutableIssue
public Long getWorkflowId()
getWorkflowId
in interface Issue
public void setWorkflowId(Long workflowId)
setWorkflowId
in interface MutableIssue
public Object getCustomFieldValue(CustomField customField)
getCustomFieldValue
in interface Issue
customField
- the CustomField
public void setCustomFieldValue(CustomField customField, Object value)
MutableIssue
OrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem,
MutableIssue, java.util.Map)
setCustomFieldValue
in interface MutableIssue
customField
- the CustomFieldvalue
- the value.public Object getExternalFieldValue(String fieldId)
getExternalFieldValue
in interface Issue
public void setExternalFieldValue(String fieldId, Object newValue)
MutableIssue
MutableIssue.getModifiedFields()
and Issue.getExternalFieldValue(String)
.
The passed in newValue will be wrapped in the ModifiedValue.getNewValue()
The ModifiedValue.getOldValue()
will be null.
setExternalFieldValue
in interface MutableIssue
fieldId
- the field id to use as a keynewValue
- the new value to place in a ModifiedValue
public void setExternalFieldValue(String fieldId, Object oldValue, Object newValue)
MutableIssue
MutableIssue.getModifiedFields()
and Issue.getExternalFieldValue(String)
.
The passed in newValue will be wrapped in the ModifiedValue.getNewValue()
and the oldValue will be placed
in ModifiedValue.getOldValue()
setExternalFieldValue
in interface MutableIssue
fieldId
- the field id to use as a keyoldValue
- the old value to place in a ModifiedValue
newValue
- the new value to place in a ModifiedValue
public boolean isSubTask()
isSubTask
in interface Issue
public Long getParentId()
getParentId
in interface Issue
public void setParentId(Long parentId)
MutableIssue
setParentId
in interface MutableIssue
parentId
- The new parentId.MutableIssue.setParentObject(Issue)
public void setParentObject(Issue parentIssue) throws IllegalArgumentException
MutableIssue
Normally a subtask just has the ID of the parent set
using setParentId()
. In this case, the getParentObject() method will look up the parent object from
the DB (or cache). However, when you are editing a parent and its subtask within a transaction (eg a Bulk Move),
it is useful to be able to link the subtask to the pending parent object in order that it can see the
new values for the parent.
setParentObject
in interface MutableIssue
parentIssue
- the required parent Issue for this subtask.
IllegalArgumentException
MutableIssue.setParentId(Long)
,
Issue.getParentObject()
public Issue getParentObject()
Issue
getParentObject
in interface Issue
getParentObject
in class AbstractIssue
public org.ofbiz.core.entity.GenericValue getParent()
getParentObject()
instead.
getParent
in interface Issue
getParent
in class AbstractIssue
public Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
getSubTasks
in interface Issue
public Collection<Issue> getSubTaskObjects()
Issue
getSubTaskObjects
in interface Issue
MutableIssue
spublic boolean isCreated()
isCreated
in interface Issue
public org.ofbiz.core.entity.GenericValue getStatus()
getStatus
in interface Issue
public void setStatusId(String statusId)
MutableIssue
setStatusId
in interface MutableIssue
statusId
- the new StatusId.public void setLabels(Set<Label> labels)
MutableIssue
setLabels
in interface MutableIssue
labels
- the labels for this issuepublic Set<Label> getLabels()
Issue
getLabels
in interface Issue
public void setStatus(org.ofbiz.core.entity.GenericValue status)
MutableIssue
setStatus
in interface MutableIssue
status
- the new status valuepublic void setStatusObject(Status status)
MutableIssue
setStatusObject
in interface MutableIssue
status
- the new status valuepublic Long getOriginalEstimate()
Issue
getOriginalEstimate
in interface Issue
public void setOriginalEstimate(Long originalEstimate)
setOriginalEstimate
in interface MutableIssue
public Long getEstimate()
Issue
getEstimate
in interface Issue
public void setEstimate(Long estimate)
setEstimate
in interface MutableIssue
public Long getTimeSpent()
Issue
getTimeSpent
in interface Issue
public void setTimeSpent(Long timespent)
setTimeSpent
in interface MutableIssue
public IssueRenderContext getIssueRenderContext()
getIssueRenderContext
in interface Issue
public void store()
OfBizValueWrapper
store
in interface OfBizValueWrapper
public Map<String,ModifiedValue> getModifiedFields()
MutableIssue
MutableIssue.resetModifiedFields()
call.
getModifiedFields
in interface MutableIssue
IssueFieldConstants
and the value
objects in the ModifiedValue are field-specific.public void resetModifiedFields()
MutableIssue
resetModifiedFields
in interface MutableIssue
MutableIssue.getModifiedFields()
public String toString()
toString
in class Object
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |