com.atlassian.jira.issue
Interface MutableIssue

All Superinterfaces:
Issue, IssueContext, OfBizValueWrapper
All Known Implementing Classes:
IssueImpl

public interface MutableIssue
extends Issue

Facade for an issue's GenericValue. After calling any 'setter' method, you will need to call OfBizValueWrapper.store() to persist the change to the database. Note that this is a 'shallow' store - only fields directly part of the issue (in the database schema) are persisted.

See Also:
IssueManager

Method Summary
 Map getModifiedFields()
          Retrieve a map of issue fields whose values have been set (since object creation or last resetModifiedFields() call.
 void resetModifiedFields()
          Reset the internal list of modified fields.
 void setAffectedVersions(Collection<Version> affectedVersions)
           
 void setAssignee(User assignee)
           
 void setAssigneeId(String assigneeId)
           
 void setComponents(Collection components)
           
 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)
           
 void setFixVersions(Collection<Version> fixVersions)
           
 void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
           
 void setIssueTypeId(String issueTypeId)
           
 void setKey(String key)
           
 void setOriginalEstimate(Long estimate)
           
 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)
           
 void setPriorityId(String priorityId)
           
 void setProject(org.ofbiz.core.entity.GenericValue project)
           
 void setProjectId(Long projectId)
          Sets the project by id.
 void setReporter(User reporter)
           
 void setReporterId(String reporterId)
          Sets the reporter in this issue.
 void setResolution(org.ofbiz.core.entity.GenericValue resolution)
           
 void setResolutionDate(Timestamp resolutionDate)
           
 void setResolutionId(String resolutionId)
           
 void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
           
 void setSecurityLevelId(Long securityLevelId)
           
 void setStatus(org.ofbiz.core.entity.GenericValue status)
           
 void setStatusId(String statusId)
          Set issue's status by status id ("1", "2" etc).
 void setSummary(String summary)
           
 void setTimeSpent(Long timespent)
           
 void setUpdated(Timestamp updated)
           
 void setVotes(Long votes)
           
 void setWorkflowId(Long workflowId)
           
 
Methods inherited from interface com.atlassian.jira.issue.Issue
getAffectedVersions, getAssignee, getAssigneeId, getAttachments, getComponents, getCreated, getCustomFieldValue, getDescription, getDueDate, getEnvironment, getEstimate, getExternalFieldValue, getFixVersions, getId, getIssueRenderContext, getIssueType, getIssueTypeObject, getKey, getOriginalEstimate, getParent, getParentId, getParentObject, getPriority, getPriorityObject, getProject, getProjectObject, getReporter, getReporterId, getResolution, getResolutionDate, getResolutionObject, getSecurityLevel, getSecurityLevelId, getStatus, getStatusObject, getSubTaskObjects, getSubTasks, getSummary, getTimeSpent, getUpdated, getVotes, getWorkflowId, isCreated, isEditable, isSubTask
 
Methods inherited from interface com.atlassian.jira.ofbiz.OfBizValueWrapper
getGenericValue, getLong, getString, getTimestamp, store
 

Method Detail

setProject

void setProject(org.ofbiz.core.entity.GenericValue project)

setProjectId

void setProjectId(Long projectId)
                  throws IllegalArgumentException
Sets the project by id. This has the same outcome as calling setProject(org.ofbiz.core.entity.GenericValue)

Parameters:
projectId - The id of the project
Throws:
IllegalArgumentException - If no project exists for the given projectId.

setIssueType

void setIssueType(org.ofbiz.core.entity.GenericValue issueType)

setIssueTypeId

void setIssueTypeId(String issueTypeId)

setSummary

void setSummary(String summary)

setAssignee

void setAssignee(User assignee)

setComponents

void setComponents(Collection components)

setAssigneeId

void setAssigneeId(String assigneeId)

setReporter

void setReporter(User reporter)

setReporterId

void setReporterId(String reporterId)
Sets the reporter in this issue.

Parameters:
reporterId - username of the desired reporter.
Throws:
DataAccessException - if the user with the given username does not exist.
See Also:
setReporter(com.opensymphony.user.User)

setDescription

void setDescription(String description)

setEnvironment

void setEnvironment(String environment)

setAffectedVersions

void setAffectedVersions(Collection<Version> affectedVersions)
Parameters:
affectedVersions - A collection of 'affects' Version objects.

setFixVersions

void setFixVersions(Collection<Version> fixVersions)
Parameters:
fixVersions - A collection of fix-for Version objects.

setDueDate

void setDueDate(Timestamp dueDate)

setSecurityLevelId

void setSecurityLevelId(Long securityLevelId)

setSecurityLevel

void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)

setPriority

void setPriority(org.ofbiz.core.entity.GenericValue priority)

setPriorityId

void setPriorityId(String priorityId)

setResolution

void setResolution(org.ofbiz.core.entity.GenericValue resolution)

setKey

void setKey(String key)

setVotes

void setVotes(Long votes)

setCreated

void setCreated(Timestamp created)

setUpdated

void setUpdated(Timestamp updated)

setResolutionDate

void setResolutionDate(Timestamp resolutionDate)

setWorkflowId

void setWorkflowId(Long workflowId)

setCustomFieldValue

void setCustomFieldValue(CustomField customField,
                         Object value)
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)

Parameters:
customField - the CustomField
value - the value.

setStatus

void setStatus(org.ofbiz.core.entity.GenericValue status)

setStatusId

void setStatusId(String statusId)
Set issue's status by status id ("1", "2" etc).

Parameters:
statusId - the new StatusId.

resetModifiedFields

void resetModifiedFields()
Reset the internal list of modified fields.

See Also:
getModifiedFields()

setOriginalEstimate

void setOriginalEstimate(Long estimate)

setTimeSpent

void setTimeSpent(Long timespent)

setEstimate

void setEstimate(Long estimate)

setExternalFieldValue

void setExternalFieldValue(String fieldId,
                           Object value)

setParentId

void setParentId(Long parentId)
Sets the ParentId of this Issue.

Parameters:
parentId - The new parentId.
See Also:
setParentObject(Issue)

setParentObject

void setParentObject(Issue parentIssue)
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.

Parameters:
parentIssue - the required parent Issue for this subtask.
See Also:
setParentId(Long), Issue.getParentObject()

setResolutionId

void setResolutionId(String resolutionId)

getModifiedFields

Map getModifiedFields()
Retrieve a map of issue fields whose values have been set (since object creation or last resetModifiedFields() call.

Returns:
A Map of key -> Object pairs, where keys are defined in IssueFieldConstants and objects are field-specific.


Copyright © 2002-2009 Atlassian. All Rights Reserved.