public class MockIssue extends Object implements MutableIssue
GLOBALID_COMPARATOR| Constructor and Description |
|---|
MockIssue() |
MockIssue(org.ofbiz.core.entity.GenericValue gv)
Use this constructor if you have a gv
|
MockIssue(int id,
String key)
This constructor does not have any time precision set by default use MockIssue(Long id, Long now) if you want to
preset the Issue's time values.
|
MockIssue(int id,
String key,
boolean subtask) |
MockIssue(long id)
This constructor does not have any time precision set by default use MockIssue(Long id, Long now) if you want to
preset the Issue's time values.
|
MockIssue(Long id)
This constructor does not have any time precision set by default use MockIssue(Long id, Long now) if you want to
preset the Issue's time values.
|
MockIssue(Long id,
Long now)
Use this constructor if you want time precision in your tests
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
For interactivity, implementations must be based on the issue key.
|
Collection |
getAffectedVersions() |
String |
getArchivedById()
Returns the userid of user who archived this issue, or null if it wasn't archived.
|
ApplicationUser |
getArchivedByUser()
Returns the user who archived this issue, or null if it wasn't archived.
|
Timestamp |
getArchivedDate()
Returns the timestamp when this issue was archived, or null if it wasn't archived.
|
ApplicationUser |
getAssignee()
Returns the Assignee User.
|
String |
getAssigneeId() |
ApplicationUser |
getAssigneeUser()
Returns the Assignee User.
|
Collection |
getAttachments() |
Collection<ProjectComponent> |
getComponentObjects()
Deprecated.
Use
getComponents(). Since v7.0 |
Collection<ProjectComponent> |
getComponents() |
Timestamp |
getCreated() |
ApplicationUser |
getCreator() |
String |
getCreatorId() |
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 seconds.
|
Object |
getExternalFieldValue(String fieldId) |
Collection |
getFixVersions() |
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Get the backing GenericValue object.
|
protected org.ofbiz.core.entity.GenericValue |
getHackedGVThatReturnsId() |
Long |
getId() |
IssueRenderContext |
getIssueRenderContext() |
IssueType |
getIssueType()
Gets the IssueType for this Issue.
|
String |
getIssueTypeId()
Gets the ID of the IssueType for this Issue.
|
IssueType |
getIssueTypeObject()
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 |
getNumber() |
Long |
getOriginalEstimate()
This is the "original estimate" of work to be performed on this issue, in seconds.
|
org.ofbiz.core.entity.GenericValue |
getParent() |
Long |
getParentId() |
Issue |
getParentObject()
If this issue is a subtask, return its parent.
|
Priority |
getPriority()
Returns the Priority for this Issue.
|
String |
getPriorityId() |
Priority |
getPriorityObject()
Returns the Priority for this Issue.
|
org.ofbiz.core.entity.GenericValue |
getProject() |
Long |
getProjectId()
Gets the ID of the Project for this Issue.
|
Project |
getProjectObject()
Gets the Project for this Issue.
|
ApplicationUser |
getReporter()
Returns the Reporter User.
|
String |
getReporterId() |
ApplicationUser |
getReporterUser()
Returns the Reporter User.
|
Resolution |
getResolution()
Returns the Resolution for this Issue.
|
Timestamp |
getResolutionDate()
Returns the datetime that an issue was resolved on.
|
String |
getResolutionId() |
Resolution |
getResolutionObject()
Returns the Resolution for this Issue.
|
org.ofbiz.core.entity.GenericValue |
getSecurityLevel()
Returns the Security Level for this Issue.
|
Long |
getSecurityLevelId()
Returns the Security Level for this Issue.
|
Status |
getStatus() |
String |
getStatusId() |
Status |
getStatusObject() |
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 seconds.
|
Timestamp |
getTimestamp(String name)
Retrieve a timestamp field.
|
Timestamp |
getUpdated() |
Long |
getVotes() |
Long |
getWatches() |
Long |
getWorkflowId() |
boolean |
isArchived()
Returns true if issue is archived
|
boolean |
isCreated() |
boolean |
isEditable() |
boolean |
isStored() |
boolean |
isSubTask() |
void |
resetModifiedFields()
Reset the internal list of modified fields.
|
void |
setAffectedVersions(Collection affectedVersions) |
void |
setArchived(boolean archived) |
void |
setArchivedDate(Timestamp archivedDate) |
void |
setAssignee(ApplicationUser assignee) |
void |
setAssigneeId(String assigneeId)
Sets the user that this issue is assigned to.
|
void |
setComponent(Collection<ProjectComponent> components)
Sets the components for this Issue.
|
void |
setCreated(Timestamp created) |
void |
setCreatorId(String creatorId) |
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 value)
This can be used by a field to "place" a custom object into the MutableIssue so that it can be retrieved 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 be retrieved by key at
a later point via the
MutableIssue.getModifiedFields() and Issue.getExternalFieldValue(String). |
void |
setFixVersions(Collection fixVersions) |
void |
setGenericValue(org.ofbiz.core.entity.GenericValue genericValue) |
void |
setId(Long id) |
void |
setIssueType(org.ofbiz.core.entity.GenericValue issueType) |
void |
setIssueType(IssueType issueType) |
void |
setIssueTypeId(String issueTypeId) |
void |
setIssueTypeObject(IssueType issueTypeObject)
Sets the IssueType for this Issue.
|
void |
setKey(String key) |
void |
setLabels(Set<Label> labels)
Set the labels for this issue.
|
void |
setModifiedFields(Map modifiedFields) |
void |
setNumber(Long number) |
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(Priority priority)
Sets the priority for this Issue.
|
void |
setPriorityId(String priorityId)
Sets the priority for this Issue.
|
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 projectObject)
Sets the Project for this Issue.
|
void |
setReporter(ApplicationUser reporter) |
void |
setReporterId(String reporterId)
Sets the reporter in this issue.
|
void |
setResolution(org.ofbiz.core.entity.GenericValue resolution) |
void |
setResolution(Resolution resolution)
Sets the resolution for this Issue.
|
void |
setResolutionDate(Timestamp resolutionDate) |
void |
setResolutionId(String resolutionId) |
void |
setResolutionObject(Resolution resolutionObject)
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) |
void |
setStatus(Status 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 |
setSubTaskObjects(Collection subTaskObjects) |
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 issue's immediate fields.
|
String |
toString() |
public MockIssue()
public MockIssue(Long id)
public MockIssue(long id)
public MockIssue(int id,
String key)
public MockIssue(int id,
String key,
boolean subtask)
public MockIssue(Long id, Long now)
public MockIssue(org.ofbiz.core.entity.GenericValue gv)
public Long getId()
public org.ofbiz.core.entity.GenericValue getProject()
getProject in interface Issuepublic Project getProjectObject()
IssuegetProjectObject in interface IssueContextgetProjectObject in interface Issuepublic void setProjectObject(Project projectObject)
MutableIssuesetProjectObject in interface MutableIssueprojectObject - the new Projectpublic void setProject(org.ofbiz.core.entity.GenericValue project)
MutableIssuesetProject in interface MutableIssueproject - the new Projectpublic IssueType getIssueType()
IssuegetIssueType in interface IssueContextgetIssueType in interface Issuepublic IssueType getIssueTypeObject()
IssuegetIssueTypeObject in interface IssueContextgetIssueTypeObject in interface Issuepublic void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
public void setIssueType(IssueType issueType)
setIssueType in interface MutableIssuepublic void setIssueTypeId(String issueTypeId)
setIssueTypeId in interface MutableIssuepublic String getSummary()
getSummary in interface Issuepublic void setSummary(String summary)
setSummary in interface MutableIssuepublic ApplicationUser getAssigneeUser()
IssueIf 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()
getAssigneeUser in interface IssueIssue.getAssignee()public ApplicationUser getAssignee()
Issue
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.
getAssignee in interface Issuepublic String getAssigneeId()
getAssigneeId in interface Issuepublic void setAssignee(ApplicationUser assignee)
setAssignee in interface MutableIssuepublic void setComponent(Collection<ProjectComponent> components)
MutableIssuesetComponent in interface MutableIssuecomponents - the new components valuepublic Collection<ProjectComponent> getComponents()
getComponents in interface Issuepublic Collection<ProjectComponent> getComponentObjects()
getComponents(). Since v7.0getComponentObjects in interface Issuepublic void setAssigneeId(String assigneeId)
MutableIssuesetAssigneeId in interface MutableIssueassigneeId - The user key.public ApplicationUser getReporterUser()
IssueThis will return a non-null User object even if the User has been deleted.
Legacy synonym for Issue.getReporter().
getReporterUser in interface IssueIssue.getReporter()public ApplicationUser getReporter()
Issue
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.
getReporter in interface Issuepublic String getReporterId()
getReporterId in interface Issuepublic ApplicationUser getCreator()
getCreator in interface Issuepublic String getCreatorId()
getCreatorId in interface Issuepublic void setCreatorId(String creatorId)
public void setReporter(ApplicationUser reporter)
setReporter in interface MutableIssuepublic void setReporterId(String reporterId)
MutableIssuesetReporterId in interface MutableIssuereporterId - userkey of the desired reporter.MutableIssue.setReporter(ApplicationUser)public String getDescription()
getDescription in interface Issuepublic void setDescription(String description)
setDescription in interface MutableIssuepublic String getEnvironment()
getEnvironment in interface Issuepublic void setEnvironment(String environment)
setEnvironment in interface MutableIssuepublic Collection getAffectedVersions()
getAffectedVersions in interface IssueVersion objects.public Collection getFixVersions()
getFixVersions in interface IssueVersion objects.public Timestamp getDueDate()
getDueDate in interface Issuepublic org.ofbiz.core.entity.GenericValue getSecurityLevel()
IssuegetSecurityLevel in interface Issuepublic String getIssueTypeId()
IssuegetIssueTypeId in interface IssueContextgetIssueTypeId in interface Issuepublic String getPriorityId()
public Long getProjectId()
IssuegetProjectId in interface IssueContextgetProjectId in interface Issuepublic String getResolutionId()
getResolutionId in interface Issuepublic Long getSecurityLevelId()
IssuegetSecurityLevelId in interface Issuepublic Priority getPriority()
IssuegetPriority in interface Issuepublic Priority getPriorityObject()
IssuegetPriorityObject in interface Issuepublic String getStatusId()
getStatusId in interface Issuepublic void setAffectedVersions(Collection affectedVersions)
setAffectedVersions in interface MutableIssueaffectedVersions - A collection of 'affects' Version objects.public void setFixVersions(Collection fixVersions)
setFixVersions in interface MutableIssuefixVersions - A collection of fix-for Version objects.public void setDueDate(Timestamp dueDate)
setDueDate in interface MutableIssuepublic void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
MutableIssuesetSecurityLevel in interface MutableIssuesecurityLevel - the new SecurityLevel valuepublic void setPriority(Priority priority)
MutableIssuesetPriority in interface MutableIssuepriority - the new priority valuepublic void setPriorityObject(Priority priority)
MutableIssuesetPriorityObject in interface MutableIssuepriority - the new priority valuepublic void setId(Long id)
public void setIssueTypeObject(IssueType issueTypeObject)
MutableIssuesetIssueTypeObject in interface MutableIssueissueTypeObject - the new IssueTypepublic void setProjectId(Long projectId)
MutableIssuesetProjectId in interface MutableIssueprojectId - The id of the projectpublic void setSecurityLevelId(Long securityLevelId)
MutableIssuesetSecurityLevelId in interface MutableIssuesecurityLevelId - the new SecurityLevel valuepublic void setPriorityId(String priorityId)
MutableIssuesetPriorityId in interface MutableIssuepriorityId - the new priority valuepublic Resolution getResolution()
IssuegetResolution in interface Issuepublic void setResolutionObject(Resolution resolutionObject)
MutableIssuesetResolutionObject in interface MutableIssueresolutionObject - the new resolution valuepublic Resolution getResolutionObject()
IssuegetResolutionObject in interface Issuepublic void setResolution(org.ofbiz.core.entity.GenericValue resolution)
public void setResolution(Resolution resolution)
MutableIssuesetResolution in interface MutableIssuepublic String getKey()
public void setKey(String key)
setKey in interface MutableIssuepublic void setNumber(Long number)
setNumber in interface MutableIssuepublic void setVotes(Long votes)
setVotes in interface MutableIssuepublic Long getWatches()
getWatches in interface Issuepublic void setWatches(Long watches)
setWatches in interface MutableIssuepublic Timestamp getCreated()
getCreated in interface Issuepublic void setCreated(Timestamp created)
setCreated in interface MutableIssuepublic Timestamp getUpdated()
getUpdated in interface Issuepublic Timestamp getResolutionDate()
IssuegetResolutionDate in interface Issuepublic void setResolutionDate(Timestamp resolutionDate)
setResolutionDate in interface MutableIssuepublic void setUpdated(Timestamp updated)
setUpdated in interface MutableIssuepublic Long getWorkflowId()
getWorkflowId in interface Issuepublic Object getCustomFieldValue(CustomField customField)
getCustomFieldValue in interface IssuecustomField - the CustomFieldpublic Status getStatusObject()
getStatusObject in interface Issuepublic void setWorkflowId(Long workflowId)
setWorkflowId in interface MutableIssuepublic void setStatusId(String statusId)
MutableIssuesetStatusId in interface MutableIssuestatusId - the new StatusId.public Map<String,ModifiedValue> getModifiedFields()
MutableIssueMutableIssue.resetModifiedFields() call.getModifiedFields in interface MutableIssueIssueFieldConstants and the value
objects in the ModifiedValue are field-specific.public void setParentObject(Issue parentIssue)
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 MutableIssueparentIssue - the required parent Issue for this subtask.MutableIssue.setParentId(Long),
Issue.getParentObject()public void setModifiedFields(Map modifiedFields)
public void resetModifiedFields()
MutableIssueresetModifiedFields in interface MutableIssueMutableIssue.getModifiedFields()public Long getParentId()
getParentId in interface Issuepublic void setParentId(Long parentId)
MutableIssuesetParentId in interface MutableIssueparentId - The new parentId.MutableIssue.setParentObject(Issue)public org.ofbiz.core.entity.GenericValue getParent()
public Issue getParentObject()
IssuegetParentObject in interface Issuepublic Collection<org.ofbiz.core.entity.GenericValue> getSubTasks()
getSubTasks in interface Issuepublic Collection<Issue> getSubTaskObjects()
IssuegetSubTaskObjects in interface IssueMutableIssuespublic String getString(String name)
OfBizValueWrappergetString in interface OfBizValueWrappername - the field namepublic Timestamp getTimestamp(String name)
OfBizValueWrappergetTimestamp in interface OfBizValueWrappername - the field namepublic Long getLong(String name)
OfBizValueWrappergetLong in interface OfBizValueWrappername - the field namepublic org.ofbiz.core.entity.GenericValue getGenericValue()
IssuegetGenericValue in interface IssuegetGenericValue in interface OfBizValueWrapperprotected org.ofbiz.core.entity.GenericValue getHackedGVThatReturnsId()
public void setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)
public void store()
MutableIssuestore in interface MutableIssuestore in interface OfBizValueWrapperpublic boolean isStored()
public void setResolutionId(String resolutionId)
setResolutionId in interface MutableIssuepublic void setArchived(boolean archived)
setArchived in interface MutableIssuepublic boolean isEditable()
isEditable in interface Issuepublic IssueRenderContext getIssueRenderContext()
getIssueRenderContext in interface Issuepublic Collection getAttachments()
getAttachments in interface IssueAttachment objectspublic void setCustomFieldValue(CustomField customField, Object value)
MutableIssueOrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem,
MutableIssue, java.util.Map)setCustomFieldValue in interface MutableIssuecustomField - the CustomFieldvalue - the value.public void setExternalFieldValue(String fieldId, Object value)
MutableIssueMutableIssue.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 MutableIssuefieldId - the field id to use as a keyvalue - the new value to place in a ModifiedValuepublic void setExternalFieldValue(String fieldId, Object oldValue, Object newValue)
MutableIssueMutableIssue.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 MutableIssuefieldId - the field id to use as a keyoldValue - the old value to place in a ModifiedValuenewValue - the new value to place in a ModifiedValuepublic void setStatus(org.ofbiz.core.entity.GenericValue status)
public void setStatus(Status status)
MutableIssuesetStatus in interface MutableIssuestatus - the new status valuepublic void setStatusObject(Status status)
MutableIssuesetStatusObject in interface MutableIssuestatus - the new status valuepublic void setTimeSpent(Long timespent)
setTimeSpent in interface MutableIssuepublic Long getEstimate()
IssueA better name would be getRemainingEstimate but for historical reasons it is called what it is called.
getEstimate in interface Issuepublic Long getTimeSpent()
IssuegetTimeSpent in interface Issuepublic void setLabels(Set<Label> labels)
MutableIssuesetLabels in interface MutableIssuelabels - the labels for this issuepublic Set<Label> getLabels()
Issuepublic boolean isArchived()
IssueisArchived in interface Issuepublic ApplicationUser getArchivedByUser()
IssuegetArchivedByUser in interface Issuepublic String getArchivedById()
IssuegetArchivedById in interface Issuepublic Timestamp getArchivedDate()
IssuegetArchivedDate in interface Issuepublic void setArchivedDate(Timestamp archivedDate)
public Object getExternalFieldValue(String fieldId)
getExternalFieldValue in interface Issuepublic Long getOriginalEstimate()
IssuegetOriginalEstimate in interface Issuepublic void setEstimate(Long estimate)
setEstimate in interface MutableIssuepublic void setOriginalEstimate(Long originalEstimate)
setOriginalEstimate in interface MutableIssuepublic void setSubTaskObjects(Collection subTaskObjects)
public boolean equals(Object o)
IssueCopyright © 2002-2022 Atlassian. All Rights Reserved.