|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.mock.issue.MockIssue
public class MockIssue
Copyright (c) 2002-2006 All rights reserved.
| Constructor Summary | |
|---|---|
MockIssue()
|
|
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 |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Collection |
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 |
getAttachments()
|
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 |
getFixVersions()
|
org.ofbiz.core.entity.GenericValue |
getGenericValue()
Get the backing GenericValue object. |
protected org.ofbiz.core.entity.GenericValue |
getHackedGVThatReturnsId()
|
Long |
getId()
|
IssueRenderContext |
getIssueRenderContext()
|
org.ofbiz.core.entity.GenericValue |
getIssueType()
Gets the IssueType for this Issue. |
String |
getIssueTypeId()
|
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 |
getOriginalEstimate()
This is the "original estimate" of work to be performed on this issue, in milliseconds. |
org.ofbiz.core.entity.GenericValue |
getParent()
|
Long |
getParentId()
|
Issue |
getParentObject()
If this issue is a subtask, return its parent. |
org.ofbiz.core.entity.GenericValue |
getPriority()
|
String |
getPriorityId()
|
Priority |
getPriorityObject()
|
org.ofbiz.core.entity.GenericValue |
getProject()
Gets the Project for this IssueContext. |
Long |
getProjectId()
|
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()
|
Resolution |
getResolutionObject()
|
org.ofbiz.core.entity.GenericValue |
getSecurityLevel()
|
Long |
getSecurityLevelId()
|
org.ofbiz.core.entity.GenericValue |
getStatus()
|
String |
getStatusId()
|
Status |
getStatusObject()
|
String |
getString(String name)
Retrieve a String field. |
Collection |
getSubTaskObjects()
Gets all the issue's subtasks. |
Collection |
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()
|
boolean |
isCreated()
|
boolean |
isEditable()
|
boolean |
isStored()
|
boolean |
isSubTask()
|
void |
resetModifiedFields()
Reset the internal list of modified fields. |
void |
setAffectedVersions(Collection affectedVersions)
|
void |
setAssignee(com.atlassian.crowd.embedded.api.User assignee)
|
void |
setAssigneeId(String assigneeId)
|
void |
setComponentObjects(Collection<ProjectComponent> components)
Sets the components for this Issue. |
void |
setComponents(Collection 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 value)
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 fixVersions)
|
void |
setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)
|
void |
setId(Long id)
|
void |
setIssueType(org.ofbiz.core.entity.GenericValue issueType)
Sets the IssueType for this Issue. |
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 |
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 projectObject)
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 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)
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 object's immediate fields. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MockIssue()
public MockIssue(Long id)
public MockIssue(long id)
public MockIssue(Long id,
Long now)
| Method Detail |
|---|
public Long getId()
getId in interface Issuepublic org.ofbiz.core.entity.GenericValue getProject()
IssueContextA null return value is used to represent that this context applies to all Projects.
getProject in interface IssueContextgetProject in interface Issuepublic Project getProjectObject()
Issue
getProjectObject in interface IssueContextgetProjectObject in interface Issuepublic void setProjectObject(Project projectObject)
MutableIssue
setProjectObject in interface MutableIssueprojectObject - the new Projectpublic void setProject(org.ofbiz.core.entity.GenericValue project)
MutableIssue
setProject in interface MutableIssueproject - the new Projectpublic org.ofbiz.core.entity.GenericValue getIssueType()
Issue
getIssueType in interface IssueContextgetIssueType in interface Issuepublic IssueType getIssueTypeObject()
Issue
getIssueTypeObject in interface IssueContextgetIssueTypeObject in interface Issuepublic void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
MutableIssue
setIssueType in interface MutableIssueissueType - the new IssueTypepublic void setIssueTypeId(String issueTypeId)
setIssueTypeId in interface MutableIssuepublic String getSummary()
getSummary in interface Issuepublic void setSummary(String summary)
setSummary in interface MutableIssuepublic com.atlassian.crowd.embedded.api.User getAssigneeUser()
IssueIssue.getAssignee()
getAssigneeUser in interface IssueIssue.getAssignee()public com.atlassian.crowd.embedded.api.User getAssignee()
Issuecom.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(com.atlassian.crowd.embedded.api.User assignee)
setAssignee in interface MutableIssuepublic void setComponentObjects(Collection<ProjectComponent> components)
MutableIssue
setComponentObjects in interface MutableIssuecomponents - the new components valuepublic Collection<org.ofbiz.core.entity.GenericValue> getComponents()
getComponents in interface Issuepublic Collection<ProjectComponent> getComponentObjects()
getComponentObjects in interface Issuepublic void setComponents(Collection components)
MutableIssue
setComponents in interface MutableIssuecomponents - the new components valuepublic void setAssigneeId(String assigneeId)
setAssigneeId in interface MutableIssuepublic com.atlassian.crowd.embedded.api.User getReporterUser()
IssueIssue.getReporter().
getReporterUser in interface IssueIssue.getReporter()public com.atlassian.crowd.embedded.api.User getReporter()
Issuecom.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 void setReporter(com.atlassian.crowd.embedded.api.User reporter)
setReporter in interface MutableIssuepublic void setReporterId(String reporterId)
MutableIssue
setReporterId in interface MutableIssuereporterId - username of the desired reporter.MutableIssue.setReporter(User)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()
getSecurityLevel in interface Issuepublic String getIssueTypeId()
public String getPriorityId()
public Long getProjectId()
public String getResolutionId()
getResolutionId in interface Issuepublic Long getSecurityLevelId()
getSecurityLevelId in interface Issuepublic org.ofbiz.core.entity.GenericValue getPriority()
getPriority in interface Issuepublic Priority getPriorityObject()
getPriorityObject in interface Issuepublic String getStatusId()
public 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)
MutableIssue
setSecurityLevel in interface MutableIssuesecurityLevel - the new SecurityLevel valuepublic void setPriority(org.ofbiz.core.entity.GenericValue priority)
MutableIssue
setPriority in interface MutableIssuepriority - the new priority valuepublic void setPriorityObject(Priority priority)
MutableIssue
setPriorityObject in interface MutableIssuepriority - the new priority valuepublic void setId(Long id)
public void setIssueTypeObject(IssueType issueTypeObject)
MutableIssue
setIssueTypeObject in interface MutableIssueissueTypeObject - the new IssueTypepublic void setProjectId(Long projectId)
MutableIssueMutableIssue.setProject(org.ofbiz.core.entity.GenericValue)
setProjectId in interface MutableIssueprojectId - The id of the projectpublic void setSecurityLevelId(Long securityLevelId)
MutableIssue
setSecurityLevelId in interface MutableIssuesecurityLevelId - the new SecurityLevel valuepublic void setPriorityId(String priorityId)
setPriorityId in interface MutableIssuepublic org.ofbiz.core.entity.GenericValue getResolution()
getResolution in interface Issuepublic void setResolutionObject(Resolution resolutionObject)
MutableIssue
setResolutionObject in interface MutableIssueresolutionObject - the new resolution valuepublic Resolution getResolutionObject()
getResolutionObject in interface Issuepublic void setResolution(org.ofbiz.core.entity.GenericValue resolution)
MutableIssue
setResolution in interface MutableIssueresolution - the new resolution valuepublic String getKey()
getKey in interface Issuepublic void setKey(String key)
setKey in interface MutableIssuepublic Long getVotes()
getVotes in interface Issuepublic 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()
Issue
getResolutionDate 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 CustomField
public org.ofbiz.core.entity.GenericValue getStatus()
getStatus in interface Issuepublic Status getStatusObject()
getStatusObject in interface Issuepublic void setWorkflowId(Long workflowId)
setWorkflowId in interface MutableIssuepublic void setStatusId(String statusId)
MutableIssue
setStatusId 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()
MutableIssue
resetModifiedFields in interface MutableIssueMutableIssue.getModifiedFields()public boolean isSubTask()
isSubTask in interface Issuepublic Long getParentId()
getParentId in interface Issuepublic void setParentId(Long parentId)
MutableIssue
setParentId in interface MutableIssueparentId - The new parentId.MutableIssue.setParentObject(Issue)public boolean isCreated()
isCreated in interface Issuepublic org.ofbiz.core.entity.GenericValue getParent()
getParent in interface Issuepublic Issue getParentObject()
Issue
getParentObject in interface Issuepublic Collection getSubTasks()
getSubTasks in interface Issuepublic Collection getSubTaskObjects()
Issue
getSubTaskObjects in interface IssueMutableIssuespublic String getString(String name)
OfBizValueWrapper
getString in interface OfBizValueWrappername - the field name
public Timestamp getTimestamp(String name)
OfBizValueWrapper
getTimestamp in interface OfBizValueWrappername - the field name
public Long getLong(String name)
OfBizValueWrapper
getLong in interface OfBizValueWrappername - the field name
public org.ofbiz.core.entity.GenericValue getGenericValue()
OfBizValueWrapper
getGenericValue in interface OfBizValueWrapperprotected org.ofbiz.core.entity.GenericValue getHackedGVThatReturnsId()
public void setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)
public void store()
OfBizValueWrapper
store in interface OfBizValueWrapperpublic boolean isStored()
public void setResolutionId(String resolutionId)
setResolutionId in interface MutableIssuepublic boolean isEditable()
isEditable in interface Issuepublic IssueRenderContext getIssueRenderContext()
getIssueRenderContext in interface Issuepublic Collection getAttachments()
getAttachments in interface IssueAttachment objects
public 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 ModifiedValue
public 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)
MutableIssue
setStatus in interface MutableIssuestatus - the new status valuepublic void setStatusObject(Status status)
MutableIssue
setStatusObject in interface MutableIssuestatus - the new status valuepublic void setTimeSpent(Long timespent)
setTimeSpent in interface MutableIssuepublic Long getEstimate()
Issue
getEstimate in interface Issuepublic Long getTimeSpent()
Issue
getTimeSpent in interface Issuepublic void setLabels(Set<Label> labels)
MutableIssue
setLabels in interface MutableIssuelabels - the labels for this issuepublic Set<Label> getLabels()
Issue
getLabels in interface Issuepublic Object getExternalFieldValue(String fieldId)
getExternalFieldValue in interface Issuepublic Long getOriginalEstimate()
Issue
getOriginalEstimate 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)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||