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
 java.util.Map<java.lang.String,ModifiedValue> 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(java.util.Collection<Version> affectedVersions)
           
 void setAssignee(com.opensymphony.user.User assignee)
           
 void setAssigneeId(java.lang.String assigneeId)
           
 void setComponents(java.util.Collection<org.ofbiz.core.entity.GenericValue> components)
           
 void setCreated(java.sql.Timestamp created)
           
 void setCustomFieldValue(CustomField customField, java.lang.Object value)
          Sets a custom field value on this Issue Object, but does not write it to the database.
 void setDescription(java.lang.String description)
           
 void setDueDate(java.sql.Timestamp dueDate)
           
 void setEnvironment(java.lang.String environment)
           
 void setEstimate(java.lang.Long estimate)
           
 void setExternalFieldValue(java.lang.String fieldId, java.lang.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 getModifiedFields() and Issue.getExternalFieldValue(String).
 void setExternalFieldValue(java.lang.String fieldId, java.lang.Object oldValue, java.lang.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 getModifiedFields() and Issue.getExternalFieldValue(String).
 void setFixVersions(java.util.Collection<Version> fixVersions)
           
 void setIssueType(org.ofbiz.core.entity.GenericValue issueType)
           
 void setIssueTypeId(java.lang.String issueTypeId)
           
 void setKey(java.lang.String key)
           
 void setLabels(java.util.Set<Label> labels)
          Set the labels for this issue.
 void setOriginalEstimate(java.lang.Long estimate)
           
 void setParentId(java.lang.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(java.lang.String priorityId)
           
 void setProject(org.ofbiz.core.entity.GenericValue project)
           
 void setProjectId(java.lang.Long projectId)
          Sets the project by id.
 void setReporter(com.opensymphony.user.User reporter)
           
 void setReporterId(java.lang.String reporterId)
          Sets the reporter in this issue.
 void setResolution(org.ofbiz.core.entity.GenericValue resolution)
           
 void setResolutionDate(java.sql.Timestamp resolutionDate)
           
 void setResolutionId(java.lang.String resolutionId)
           
 void setSecurityLevel(org.ofbiz.core.entity.GenericValue securityLevel)
           
 void setSecurityLevelId(java.lang.Long securityLevelId)
           
 void setStatus(org.ofbiz.core.entity.GenericValue status)
           
 void setStatusId(java.lang.String statusId)
          Set issue's status by status id ("1", "2" etc).
 void setSummary(java.lang.String summary)
           
 void setTimeSpent(java.lang.Long timespent)
           
 void setUpdated(java.sql.Timestamp updated)
           
 void setVotes(java.lang.Long votes)
           
 void setWorkflowId(java.lang.Long workflowId)
           
 
Methods inherited from interface com.atlassian.jira.issue.Issue
getAffectedVersions, getAssignee, getAssigneeId, getAttachments, getComponentObjects, getComponents, getCreated, getCustomFieldValue, getDescription, getDueDate, getEnvironment, getEstimate, getExternalFieldValue, getFixVersions, getId, getIssueRenderContext, getIssueType, getIssueTypeObject, getKey, getLabels, 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(java.lang.Long projectId)
                  throws java.lang.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:
java.lang.IllegalArgumentException - If no project exists for the given projectId.

setIssueType

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

setIssueTypeId

void setIssueTypeId(java.lang.String issueTypeId)

setSummary

void setSummary(java.lang.String summary)

setAssignee

void setAssignee(com.opensymphony.user.User assignee)

setComponents

void setComponents(java.util.Collection<org.ofbiz.core.entity.GenericValue> components)

setAssigneeId

void setAssigneeId(java.lang.String assigneeId)

setReporter

void setReporter(com.opensymphony.user.User reporter)

setReporterId

void setReporterId(java.lang.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(java.lang.String description)

setEnvironment

void setEnvironment(java.lang.String environment)

setAffectedVersions

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

setFixVersions

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

setDueDate

void setDueDate(java.sql.Timestamp dueDate)

setSecurityLevelId

void setSecurityLevelId(java.lang.Long securityLevelId)

setSecurityLevel

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

setPriority

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

setPriorityId

void setPriorityId(java.lang.String priorityId)

setResolution

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

setKey

void setKey(java.lang.String key)

setVotes

void setVotes(java.lang.Long votes)

setCreated

void setCreated(java.sql.Timestamp created)

setUpdated

void setUpdated(java.sql.Timestamp updated)

setResolutionDate

void setResolutionDate(java.sql.Timestamp resolutionDate)

setWorkflowId

void setWorkflowId(java.lang.Long workflowId)

setCustomFieldValue

void setCustomFieldValue(CustomField customField,
                         java.lang.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(java.lang.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(java.lang.Long estimate)

setTimeSpent

void setTimeSpent(java.lang.Long timespent)

setEstimate

void setEstimate(java.lang.Long estimate)

setExternalFieldValue

void setExternalFieldValue(java.lang.String fieldId,
                           java.lang.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 getModifiedFields() and Issue.getExternalFieldValue(String).

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

Parameters:
fieldId - the field id to use as a key
newValue - the new value to place in a ModifiedValue

setExternalFieldValue

void setExternalFieldValue(java.lang.String fieldId,
                           java.lang.Object oldValue,
                           java.lang.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 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()

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

setParentId

void setParentId(java.lang.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(java.lang.String resolutionId)

setLabels

void setLabels(java.util.Set<Label> labels)
Set the labels for this issue.

Parameters:
labels - the labels for this issue

getModifiedFields

java.util.Map<java.lang.String,ModifiedValue> getModifiedFields()
Retrieve a map of issue fields whose values have been set (since object creation or last resetModifiedFields() call.

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


Copyright © 2002-2010 Atlassian. All Rights Reserved.