com.atlassian.jira.bulkedit.operation
Class BulkMoveOperation

java.lang.Object
  extended by com.atlassian.jira.bulkedit.operation.AbstractBulkOperation
      extended by com.atlassian.jira.bulkedit.operation.BulkMoveOperation
All Implemented Interfaces:
BulkOperation, IssueOperation

public class BulkMoveOperation
extends AbstractBulkOperation

Operatin for moving parent and their sub-takks issues from one or many contexts to a single target context.


Field Summary
protected static org.apache.log4j.Logger log
           
static java.lang.String NAME
           
static java.lang.String NAME_KEY
           
 
Constructor Summary
BulkMoveOperation(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, AttachmentPathManager attachmentPathManager)
           
 
Method Summary
 boolean canPerform(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
          Determines whether the operation can be performed with the given set of issues
 void chooseContext(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser, I18nHelper i18nHelper, ErrorCollection errors)
           
 void chooseContextNoValidate(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
           
 boolean equals(java.lang.Object o)
           
 void finishChooseContext(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
          Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.
 void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, com.opensymphony.user.User remoteUser)
          Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.
 java.lang.String getCannotPerformMessageKey()
           
 java.lang.String getDescriptionKey()
           
 java.lang.String getFieldName(Field field, I18nHelper i18nHelper)
           
 java.lang.String getNameKey()
           
 java.lang.String getOperationName()
           
protected  java.util.Collection getTargetHiddenFields(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
           
 JiraWorkflow getWorkflowForType(java.lang.Long projectId, java.lang.String issueTypeId)
           
 boolean isStatusValid(BulkEditBean bulkEditBean)
           
 void moveIssuesAndIndex(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
           
 void perform(BulkEditBean bulkEditBean, com.opensymphony.user.User remoteUser)
          Performs the operation on the given set of issues
 void setStatusFields(BulkEditBean bulkEditBean)
           
 void validatePopulateFields(BulkEditBean bulkEditBean, ErrorCollection errors, I18nHelper i18nHelper)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

NAME_KEY

public static final java.lang.String NAME_KEY
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

BulkMoveOperation

public BulkMoveOperation(WorkflowManager workflowManager,
                         ProjectManager projectManager,
                         FieldManager fieldManager,
                         IssueFactory issueFactory,
                         IssueManager issueManager,
                         AttachmentPathManager attachmentPathManager)
Method Detail

canPerform

public boolean canPerform(BulkEditBean bulkEditBean,
                          com.opensymphony.user.User remoteUser)
Description copied from interface: BulkOperation
Determines whether the operation can be performed with the given set of issues


perform

public void perform(BulkEditBean bulkEditBean,
                    com.opensymphony.user.User remoteUser)
             throws java.lang.Exception
Description copied from interface: BulkOperation
Performs the operation on the given set of issues

Throws:
java.lang.Exception

moveIssuesAndIndex

public void moveIssuesAndIndex(BulkEditBean bulkEditBean,
                               com.opensymphony.user.User remoteUser)
                        throws java.lang.Exception
Throws:
java.lang.Exception

chooseContextNoValidate

public void chooseContextNoValidate(BulkEditBean bulkEditBean,
                                    com.opensymphony.user.User remoteUser)
                             throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

chooseContext

public void chooseContext(BulkEditBean bulkEditBean,
                          com.opensymphony.user.User remoteUser,
                          I18nHelper i18nHelper,
                          ErrorCollection errors)
                   throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

finishChooseContext

public void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean,
                                com.opensymphony.user.User remoteUser)
                         throws FieldLayoutStorageException
Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.

Parameters:
multiBulkMoveBean - MultiBulkMoveBean (Contains Collection of BulkEditBean objects).
remoteUser - User
Throws:
FieldLayoutStorageException - If there is a persistence error trying to find the Target FieldLayout.
See Also:
finishChooseContext(com.atlassian.jira.web.bean.BulkEditBean, com.opensymphony.user.User)

finishChooseContext

public void finishChooseContext(BulkEditBean bulkEditBean,
                                com.opensymphony.user.User remoteUser)
                         throws FieldLayoutStorageException
Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.

This method should be called AFTER validation of the new context, and re-mapping the BulkEditBeans to be indexed by Target context.

Parameters:
bulkEditBean - BulkEditBean containing Bulk Move information for a single target "Issue Context".
remoteUser - User doing the operation.
Throws:
FieldLayoutStorageException - If there is a persistence error trying to find the Target FieldLayout.
See Also:
finishChooseContext(com.atlassian.jira.web.bean.MultiBulkMoveBean, com.opensymphony.user.User)

isStatusValid

public boolean isStatusValid(BulkEditBean bulkEditBean)

setStatusFields

public void setStatusFields(BulkEditBean bulkEditBean)
                     throws WorkflowException
Throws:
WorkflowException

validatePopulateFields

public void validatePopulateFields(BulkEditBean bulkEditBean,
                                   ErrorCollection errors,
                                   I18nHelper i18nHelper)
                            throws FieldLayoutStorageException
Throws:
FieldLayoutStorageException

getFieldName

public java.lang.String getFieldName(Field field,
                                     I18nHelper i18nHelper)

getTargetHiddenFields

protected java.util.Collection getTargetHiddenFields(BulkEditBean bulkEditBean,
                                                     com.opensymphony.user.User remoteUser)

getNameKey

public java.lang.String getNameKey()

getDescriptionKey

public java.lang.String getDescriptionKey()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getOperationName

public java.lang.String getOperationName()

getCannotPerformMessageKey

public java.lang.String getCannotPerformMessageKey()

getWorkflowForType

public JiraWorkflow getWorkflowForType(java.lang.Long projectId,
                                       java.lang.String issueTypeId)
                                throws WorkflowException
Throws:
WorkflowException


Copyright © 2002-2010 Atlassian. All Rights Reserved.