com.atlassian.jira.mock.issue
Class MockIssue

java.lang.Object
  extended by com.atlassian.jira.mock.issue.MockIssue
All Implemented Interfaces:
IssueContext, Issue, MutableIssue, OfBizValueWrapper

public class MockIssue
extends Object
implements MutableIssue

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

MockIssue

public MockIssue()

MockIssue

public 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

public 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

public MockIssue(Long id,
                 Long now)
Use this constructor if you want time precision in your tests

Method Detail

getId

public Long getId()
Specified by:
getId in interface Issue

getProject

public org.ofbiz.core.entity.GenericValue getProject()
Description copied from interface: IssueContext
Gets the Project for this IssueContext.

A null return value is used to represent that this context applies to all Projects.

Specified by:
getProject in interface IssueContext
Specified by:
getProject in interface Issue
Returns:
The Project for this IssueContext (can be null).

getProjectObject

public Project getProjectObject()
Description copied from interface: Issue
Gets the Project for this Issue.

Specified by:
getProjectObject in interface IssueContext
Specified by:
getProjectObject in interface Issue
Returns:
The Project for this Issue.

setProjectObject

public void setProjectObject(Project projectObject)
Description copied from interface: MutableIssue
Sets the Project for this Issue.

Specified by:
setProjectObject in interface MutableIssue
Parameters:
projectObject - the new Project

setProject

public void setProject(org.ofbiz.core.entity.GenericValue project)
Description copied from interface: MutableIssue
Sets the Project for this Issue.

Specified by:
setProject in interface MutableIssue
Parameters:
project - the new Project

getIssueType

public org.ofbiz.core.entity.GenericValue getIssueType()
Description copied from interface: Issue
Gets the IssueType for this Issue.

Specified by:
getIssueType in interface IssueContext
Specified by:
getIssueType in interface Issue
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 IssueContext
Specified by:
getIssueTypeObject in interface Issue
Returns:
The IssueType for this Issue.

setIssueType

public void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
Description copied from interface: MutableIssue
Sets the IssueType for this Issue.

Specified by:
setIssueType in interface MutableIssue
Parameters:
issueType - the new IssueType

setIssueTypeId

public void setIssueTypeId(String issueTypeId)
Specified by:
setIssueTypeId in interface MutableIssue

getSummary

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

setSummary

public void setSummary(String summary)
Specified by:
setSummary in interface MutableIssue

getAssigneeUser

public com.atlassian.crowd.embedded.api.User 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:
Issue.getAssignee()

getAssignee

public com.atlassian.crowd.embedded.api.User 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

setAssignee

public void setAssignee(com.atlassian.crowd.embedded.api.User assignee)
Specified by:
setAssignee in interface MutableIssue

setComponentObjects

public void setComponentObjects(Collection<ProjectComponent> components)
Description copied from interface: MutableIssue
Sets the components for this Issue.

Specified by:
setComponentObjects in interface MutableIssue
Parameters:
components - the new components value

getComponents

public Collection<org.ofbiz.core.entity.GenericValue> getComponents()
Specified by:
getComponents in interface Issue
Returns:
A collection of component GenericValues.

getComponentObjects

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

setComponents

public void setComponents(Collection components)
Description copied from interface: MutableIssue
Sets the components for this Issue.

Specified by:
setComponents in interface MutableIssue
Parameters:
components - the new components value

setAssigneeId

public void setAssigneeId(String assigneeId)
Specified by:
setAssigneeId in interface MutableIssue

getReporterUser

public com.atlassian.crowd.embedded.api.User 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:
Issue.getReporter()

getReporter

public com.atlassian.crowd.embedded.api.User 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

setReporter

public void setReporter(com.atlassian.crowd.embedded.api.User reporter)
Specified by:
setReporter in interface MutableIssue

setReporterId

public void setReporterId(String reporterId)
Description copied from interface: MutableIssue
Sets the reporter in this issue.

Specified by:
setReporterId in interface MutableIssue
Parameters:
reporterId - username of the desired reporter.
See Also:
MutableIssue.setReporter(User)

getDescription

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

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface MutableIssue

getEnvironment

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

setEnvironment

public void setEnvironment(String environment)
Specified by:
setEnvironment in interface MutableIssue

getAffectedVersions

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

getFixVersions

public Collection 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()
Specified by:
getSecurityLevel in interface Issue

getIssueTypeId

public String getIssueTypeId()

getPriorityId

public String getPriorityId()

getProjectId

public Long getProjectId()

getResolutionId

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

getSecurityLevelId

public Long getSecurityLevelId()
Specified by:
getSecurityLevelId in interface Issue

getPriority

public org.ofbiz.core.entity.GenericValue getPriority()
Specified by:
getPriority in interface Issue

getPriorityObject

public Priority getPriorityObject()
Specified by:
getPriorityObject in interface Issue

getStatusId

public String getStatusId()

setAffectedVersions

public void setAffectedVersions(Collection affectedVersions)
Specified by:
setAffectedVersions in interface MutableIssue
Parameters:
affectedVersions - A collection of 'affects' Version objects.

setFixVersions

public void setFixVersions(Collection fixVersions)
Specified by:
setFixVersions in interface MutableIssue
Parameters:
fixVersions - A collection of fix-for Version objects.

setDueDate

public void setDueDate(Timestamp dueDate)
Specified by:
setDueDate in interface MutableIssue

setSecurityLevel

public void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
Description copied from interface: MutableIssue
Sets the SecurityLevel for this Issue.

Specified by:
setSecurityLevel in interface MutableIssue
Parameters:
securityLevel - the new SecurityLevel value

setPriority

public void setPriority(org.ofbiz.core.entity.GenericValue priority)
Description copied from interface: MutableIssue
Sets the priority for this Issue.

Specified by:
setPriority in interface MutableIssue
Parameters:
priority - the new priority value

setPriorityObject

public void setPriorityObject(Priority priority)
Description copied from interface: MutableIssue
Sets the priority for this Issue.

Specified by:
setPriorityObject in interface MutableIssue
Parameters:
priority - the new priority value

setId

public void setId(Long id)

setIssueTypeObject

public void setIssueTypeObject(IssueType issueTypeObject)
Description copied from interface: MutableIssue
Sets the IssueType for this Issue.

Specified by:
setIssueTypeObject in interface MutableIssue
Parameters:
issueTypeObject - the new IssueType

setProjectId

public void setProjectId(Long projectId)
Description copied from interface: MutableIssue
Sets the project by id. This has the same outcome as calling MutableIssue.setProject(org.ofbiz.core.entity.GenericValue)

Specified by:
setProjectId in interface MutableIssue
Parameters:
projectId - The id of the project

setSecurityLevelId

public void setSecurityLevelId(Long securityLevelId)
Description copied from interface: MutableIssue
Sets the SecurityLevel for this Issue.

Specified by:
setSecurityLevelId in interface MutableIssue
Parameters:
securityLevelId - the new SecurityLevel value

setPriorityId

public void setPriorityId(String priorityId)
Specified by:
setPriorityId in interface MutableIssue

getResolution

public org.ofbiz.core.entity.GenericValue getResolution()
Specified by:
getResolution in interface Issue

setResolutionObject

public void setResolutionObject(Resolution resolutionObject)
Description copied from interface: MutableIssue
Sets the resolution for this Issue.

Specified by:
setResolutionObject in interface MutableIssue
Parameters:
resolutionObject - the new resolution value

getResolutionObject

public Resolution getResolutionObject()
Specified by:
getResolutionObject in interface Issue

setResolution

public void setResolution(org.ofbiz.core.entity.GenericValue resolution)
Description copied from interface: MutableIssue
Sets the resolution for this Issue.

Specified by:
setResolution in interface MutableIssue
Parameters:
resolution - the new resolution value

getKey

public String getKey()
Specified by:
getKey in interface Issue

setKey

public void setKey(String key)
Specified by:
setKey in interface MutableIssue

getVotes

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

setVotes

public void setVotes(Long votes)
Specified by:
setVotes in interface MutableIssue

getWatches

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

setWatches

public void setWatches(Long watches)
Specified by:
setWatches in interface MutableIssue

getCreated

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

setCreated

public void setCreated(Timestamp created)
Specified by:
setCreated in interface MutableIssue

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

setResolutionDate

public void setResolutionDate(Timestamp resolutionDate)
Specified by:
setResolutionDate in interface MutableIssue

setUpdated

public void setUpdated(Timestamp updated)
Specified by:
setUpdated in interface MutableIssue

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 org.ofbiz.core.entity.GenericValue getStatus()
Specified by:
getStatus in interface Issue

getStatusObject

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

setWorkflowId

public void setWorkflowId(Long workflowId)
Specified by:
setWorkflowId in interface MutableIssue

setStatusId

public void setStatusId(String statusId)
Description copied from interface: MutableIssue
Set issue's status by status id ("1", "2" etc).

Specified by:
setStatusId in interface MutableIssue
Parameters:
statusId - the new StatusId.

getModifiedFields

public Map<String,ModifiedValue> getModifiedFields()
Description copied from interface: MutableIssue
Retrieve a map of issue fields whose values have been set (since object creation or last MutableIssue.resetModifiedFields() call.

Specified by:
getModifiedFields in interface MutableIssue
Returns:
A Map of key -> ModifiedValue pairs, where keys are defined in IssueFieldConstants and the value objects in the ModifiedValue are field-specific.

setParentObject

public void setParentObject(Issue parentIssue)
Description copied from interface: MutableIssue
Sets the parent Issue Object for this Issue (subtask).

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.

Specified by:
setParentObject in interface MutableIssue
Parameters:
parentIssue - the required parent Issue for this subtask.
See Also:
MutableIssue.setParentId(Long), Issue.getParentObject()

setModifiedFields

public void setModifiedFields(Map modifiedFields)

resetModifiedFields

public void resetModifiedFields()
Description copied from interface: MutableIssue
Reset the internal list of modified fields.

Specified by:
resetModifiedFields in interface MutableIssue
See Also:
MutableIssue.getModifiedFields()

isSubTask

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

getParentId

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

setParentId

public void setParentId(Long parentId)
Description copied from interface: MutableIssue
Sets the ParentId of this Issue.

Specified by:
setParentId in interface MutableIssue
Parameters:
parentId - The new parentId.
See Also:
MutableIssue.setParentObject(Issue)

isCreated

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

getParent

public org.ofbiz.core.entity.GenericValue getParent()
Specified by:
getParent 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.

getSubTasks

public Collection getSubTasks()
Specified by:
getSubTasks in interface Issue

getSubTaskObjects

public Collection getSubTaskObjects()
Description copied from interface: Issue
Gets all the issue's subtasks.

Specified by:
getSubTaskObjects in interface Issue
Returns:
A collection of MutableIssues

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: OfBizValueWrapper
Get the backing GenericValue object.

Specified by:
getGenericValue in interface OfBizValueWrapper
Returns:
the backing GenericValue object.

getHackedGVThatReturnsId

protected org.ofbiz.core.entity.GenericValue getHackedGVThatReturnsId()

setGenericValue

public void setGenericValue(org.ofbiz.core.entity.GenericValue genericValue)

store

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

Specified by:
store in interface OfBizValueWrapper

isStored

public boolean isStored()

setResolutionId

public void setResolutionId(String resolutionId)
Specified by:
setResolutionId in interface MutableIssue

isEditable

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

getIssueRenderContext

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

getAttachments

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

setCustomFieldValue

public void setCustomFieldValue(CustomField customField,
                                Object value)
Description copied from interface: MutableIssue
Sets a custom field value on this Issue Object, but does not write it to the database. This is highly misleading.
To actually set a custom field value, use OrderableField.updateIssue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, MutableIssue, java.util.Map)

Specified by:
setCustomFieldValue in interface MutableIssue
Parameters:
customField - the CustomField
value - the value.

setExternalFieldValue

public void setExternalFieldValue(String fieldId,
                                  Object value)
Description copied from interface: MutableIssue
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).

The passed in newValue will be wrapped in the ModifiedValue.getNewValue() The ModifiedValue.getOldValue() will be null.

Specified by:
setExternalFieldValue in interface MutableIssue
Parameters:
fieldId - the field id to use as a key
value - the new value to place in a ModifiedValue

setExternalFieldValue

public void setExternalFieldValue(String fieldId,
                                  Object oldValue,
                                  Object newValue)
Description copied from interface: MutableIssue
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).

The passed in newValue will be wrapped in the ModifiedValue.getNewValue() and the oldValue will be placed in ModifiedValue.getOldValue()

Specified by:
setExternalFieldValue in interface MutableIssue
Parameters:
fieldId - the field id to use as a key
oldValue - the old value to place in a ModifiedValue
newValue - the new value to place in a ModifiedValue

setStatus

public void setStatus(org.ofbiz.core.entity.GenericValue status)
Description copied from interface: MutableIssue
Sets the status for this Issue.

Specified by:
setStatus in interface MutableIssue
Parameters:
status - the new status value

setStatusObject

public void setStatusObject(Status status)
Description copied from interface: MutableIssue
Sets the status for this Issue.

Specified by:
setStatusObject in interface MutableIssue
Parameters:
status - the new status value

setTimeSpent

public void setTimeSpent(Long timespent)
Specified by:
setTimeSpent in interface MutableIssue

getEstimate

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

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 milliseconds.

getTimeSpent

public Long getTimeSpent()
Description copied from interface: Issue
This is the "total time spent" working on this issue, in milliseconds.

Specified by:
getTimeSpent in interface Issue
Returns:
the "total time spent" working on this issue, in milliseconds.

setLabels

public void setLabels(Set<Label> labels)
Description copied from interface: MutableIssue
Set the labels for this issue.

Specified by:
setLabels in interface MutableIssue
Parameters:
labels - the labels for this issue

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

getExternalFieldValue

public Object getExternalFieldValue(String fieldId)
Specified by:
getExternalFieldValue 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 milliseconds.

Specified by:
getOriginalEstimate in interface Issue
Returns:
the "original estimate" of work to be performed on this issue, in milliseconds.

setEstimate

public void setEstimate(Long estimate)
Specified by:
setEstimate in interface MutableIssue

setOriginalEstimate

public void setOriginalEstimate(Long originalEstimate)
Specified by:
setOriginalEstimate in interface MutableIssue

setSubTaskObjects

public void setSubTaskObjects(Collection subTaskObjects)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.