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, webwork.action.IllegalArgumentAware, java.io.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 webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
protected AbstractIssueUpdateAction()
           
  AbstractIssueUpdateAction(IssueUpdater issueUpdater)
           
  AbstractIssueUpdateAction(IssueUpdater issueUpdater, TextAnalyzer textAnalyzer)
           
 
Method Summary
protected  org.ofbiz.core.entity.GenericValue createComment()
          This method will create a comment if possible (ie iff issue != null && comment != null).
protected  org.ofbiz.core.entity.GenericValue createComment(org.ofbiz.core.entity.GenericValue commentedIssue)
           
protected  void doUpdate(org.ofbiz.core.entity.GenericValue issue, org.ofbiz.core.entity.GenericValue originalIssue, int eventType, org.ofbiz.core.entity.GenericValue commentGV, java.util.List changeItems, boolean dispatchEvent)
           
protected  void doUpdate(int eventType, org.ofbiz.core.entity.GenericValue commentGV)
          This method 'completes' the update of an issue entity.
protected  void doUpdate(int eventType, org.ofbiz.core.entity.GenericValue commentGV, java.util.List changeItems)
          This method 'completes' the update of an issue entity, given part of the changelog being prewritten as a StringBuffer.
protected  void doUpdate(int eventType, org.ofbiz.core.entity.GenericValue commentGV, java.util.Map params)
          This method 'completes' the update of an issue entity.
protected  void doUpdateIfNeeded(int eventType)
          This method 'completes' the update of an entity if the entity has been modified during the action.
protected  void doUpdateWithChangelog(int eventType, java.util.List changeItems)
          This method 'completes' the update of an issue entity.
 java.lang.String getComment()
           
 java.lang.String getCommentLevel()
           
protected  org.ofbiz.core.entity.GenericValue getOriginalIssue()
           
 void setComment(java.lang.String comment)
           
 void setCommentLevel(java.lang.String commentLevel)
           
 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, getActionName, getApplicationProperties, getDelegator, getLocaleUtils, getResult, getText, getUnescapedText, getWatcherManager, hasAnyErrors, isIndexing
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, addIllegalArgumentException, doExecute, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getLocale, getPropertyEditorMessage, getTexts, getTexts, 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(int eventType,
                        org.ofbiz.core.entity.GenericValue commentGV)
                 throws java.lang.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:
java.lang.Exception

doUpdate

protected void doUpdate(int eventType,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        java.util.Map params)
                 throws java.lang.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:
java.lang.Exception

doUpdateWithChangelog

protected void doUpdateWithChangelog(int eventType,
                                     java.util.List changeItems)
                              throws java.lang.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:
java.lang.Exception

doUpdate

protected void doUpdate(int eventType,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        java.util.List changeItems)
                 throws java.lang.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:
java.lang.Exception

doUpdate

protected void doUpdate(org.ofbiz.core.entity.GenericValue issue,
                        org.ofbiz.core.entity.GenericValue originalIssue,
                        int eventType,
                        org.ofbiz.core.entity.GenericValue commentGV,
                        java.util.List changeItems,
                        boolean dispatchEvent)
                 throws java.lang.Exception
Throws:
java.lang.Exception

doUpdateIfNeeded

protected void doUpdateIfNeeded(int eventType)
                         throws java.lang.Exception
This method 'completes' the update of an entity if the entity has been modified during the action.

Throws:
java.lang.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

createComment

protected org.ofbiz.core.entity.GenericValue createComment()
                                                    throws java.lang.Exception
This method will create a comment if possible (ie iff issue != null && comment != null). It does not generate any events.

Returns:
The comment created or null if no comment was created
Throws:
java.lang.Exception

createComment

protected org.ofbiz.core.entity.GenericValue createComment(org.ofbiz.core.entity.GenericValue commentedIssue)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getComment

public java.lang.String getComment()

setComment

public void setComment(java.lang.String comment)

getCommentLevel

public java.lang.String getCommentLevel()

setCommentLevel

public void setCommentLevel(java.lang.String commentLevel)

getOriginalIssue

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


Copyright © 2002-2005 Atlassian. All Rights Reserved.