com.atlassian.jira.action.issue
Class AbstractIssueUpdateAction

java.lang.Object
  extended bywebwork.action.ActionSupport
      extended bycom.atlassian.jira.action.JiraActionSupport
          extended bycom.atlassian.jira.action.JiraNonWebActionSupport
              extended bycom.atlassian.jira.action.issue.AbstractIssueAction
                  extended bycom.atlassian.jira.action.issue.AbstractIssueUpdateAction
All Implemented Interfaces:
webwork.action.Action, webwork.action.CommandDriven, I18nHelper, webwork.action.IllegalArgumentAware, Serializable
Direct Known Subclasses:
ActionCreate, ActionDelete, IssueUpdate

public abstract class AbstractIssueUpdateAction
extends AbstractIssueAction

This action should be subclassed by any action which changes issues and might want to generate a changelog.

It automatically stores a copy of the original issue, so that changelogs can be created easily using createChangeLog()

See Also:
Serialized Form

Field Summary
protected  TextAnalyzer textAnalyzer
           
 
Fields inherited from class com.atlassian.jira.action.JiraNonWebActionSupport
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
protected AbstractIssueUpdateAction()
           
  AbstractIssueUpdateAction(IssueUpdater issueUpdater)
           
  AbstractIssueUpdateAction(IssueUpdater issueUpdater, TextAnalyzer textAnalyzer)
           
 
Method Summary
protected  void doUpdate(org.ofbiz.core.entity.GenericValue issue, org.ofbiz.core.entity.GenericValue originalIssue, Long eventTypeId, org.ofbiz.core.entity.GenericValue commentGV, List changeItems, boolean dispatchEvent, boolean generateChangeItems, boolean sendMail)
           
protected  void doUpdate(Long eventTypeId, org.ofbiz.core.entity.GenericValue commentGV)
          This method 'completes' the update of an issue entity.
protected  void doUpdate(Long eventTypeId, org.ofbiz.core.entity.GenericValue commentGV, List changeItems, boolean generateChangeItems, boolean sendMail)
          This method 'completes' the update of an issue entity, given part of the changelog being prewritten as a StringBuffer.
protected  void doUpdate(Long eventTypeId, org.ofbiz.core.entity.GenericValue commentGV, Map params)
          This method 'completes' the update of an issue entity.
protected  void doUpdateWithChangelog(Long eventTypeId, List changeItems)
          This method 'completes' the update of an issue entity.
protected  org.ofbiz.core.entity.GenericValue getOriginalIssue()
           
 void setIssue(org.ofbiz.core.entity.GenericValue issue)
          Here we override the AbstractGVIssueAction.setIssue() method and store a clone of the original issue.
 
Methods inherited from class com.atlassian.jira.action.issue.AbstractIssueAction
doValidation, getIssue
 
Methods inherited from class com.atlassian.jira.action.JiraNonWebActionSupport
doDefault, execute, getRemoteUser, isDispatchEvent, setDispatchEvent, setRemoteUser
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, doExecute, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

textAnalyzer

protected final TextAnalyzer textAnalyzer
Constructor Detail

AbstractIssueUpdateAction

public AbstractIssueUpdateAction(IssueUpdater issueUpdater,
                                 TextAnalyzer textAnalyzer)

AbstractIssueUpdateAction

protected AbstractIssueUpdateAction()

AbstractIssueUpdateAction

public AbstractIssueUpdateAction(IssueUpdater issueUpdater)
Method Detail

doUpdate

protected void doUpdate(Long eventTypeId,
                        org.ofbiz.core.entity.GenericValue commentGV)
                 throws Exception
This method 'completes' the update of an issue entity.

It sets the update timestamp, stores the issue, updated the cache if needed, creates the changelog and dispatches the event (if desired).

This method will ALWAYS generate an update - see also doUpdateIfNeeded.

Throws:
Exception

doUpdate

protected void doUpdate(Long eventTypeId,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        Map params)
                 throws Exception
This method 'completes' the update of an issue entity.

It sets the update timestamp, stores the issue, updated the cache if needed, creates the changelog and dispatches the event (if desired).

This method will ALWAYS generate an update - see also doUpdateIfNeeded.

Throws:
Exception

doUpdateWithChangelog

protected void doUpdateWithChangelog(Long eventTypeId,
                                     List changeItems)
                              throws Exception
This method 'completes' the update of an issue entity.

It sets the update timestamp, stores the issue, updated the cache if needed, creates the changelog and dispatches the event (if desired).

This method will ALWAYS generate an update - see also doUpdateIfNeeded.

Throws:
Exception

doUpdate

protected void doUpdate(Long eventTypeId,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        List changeItems,
                        boolean generateChangeItems,
                        boolean sendMail)
                 throws Exception
This method 'completes' the update of an issue entity, given part of the changelog being prewritten as a StringBuffer.

It sets the update timestamp, stores the issue, updated the cache if needed, creates the changelog and dispatches the event (if desired).

This method will ALWAYS generate an update - see also doUpdateIfNeeded.

Throws:
Exception

doUpdate

protected void doUpdate(org.ofbiz.core.entity.GenericValue issue,
                        org.ofbiz.core.entity.GenericValue originalIssue,
                        Long eventTypeId,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        List changeItems,
                        boolean dispatchEvent,
                        boolean generateChangeItems,
                        boolean sendMail)
                 throws Exception
Throws:
Exception

setIssue

public void setIssue(org.ofbiz.core.entity.GenericValue issue)
Here we override the AbstractGVIssueAction.setIssue() method and store a clone of the original issue.

This means we can automatically generate changelogs - nice!

Overrides:
setIssue in class AbstractIssueAction

getOriginalIssue

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


Copyright © 2002-2006 Atlassian. All Rights Reserved.