com.atlassian.jira.bulkedit.operation
Class BulkMoveOperationImpl

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

public class BulkMoveOperationImpl
extends AbstractBulkOperation
implements BulkMoveOperation

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
           
 
Fields inherited from interface com.atlassian.jira.bulkedit.operation.BulkMoveOperation
NAME, NAME_KEY
 
Constructor Summary
BulkMoveOperationImpl(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, AttachmentPathManager attachmentPathManager)
           
 
Method Summary
 boolean canPerform(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
          Determines whether the operation can be performed with the given set of issues
 void chooseContext(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser, I18nHelper i18nHelper, ErrorCollection errors)
           
 void chooseContextNoValidate(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
           
 void finishChooseContext(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.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.atlassian.crowd.embedded.api.User remoteUser)
          Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.
 String getCannotPerformMessageKey()
           
 String getDescriptionKey()
           
 String getFieldName(Field field, I18nHelper i18nHelper)
           
 String getNameKey()
           
 String getOperationName()
           
protected  Collection getTargetHiddenFields(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
           
 JiraWorkflow getWorkflowForType(Long projectId, String issueTypeId)
           
 boolean isStatusValid(BulkEditBean bulkEditBean)
           
 void moveIssuesAndIndex(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
           
 void perform(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Constructor Detail

BulkMoveOperationImpl

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

canPerform

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

Specified by:
canPerform in interface BulkOperation

perform

public void perform(BulkEditBean bulkEditBean,
                    com.atlassian.crowd.embedded.api.User remoteUser)
             throws Exception
Description copied from interface: BulkOperation
Performs the operation on the given set of issues

Specified by:
perform in interface BulkOperation
Throws:
Exception

moveIssuesAndIndex

public void moveIssuesAndIndex(BulkEditBean bulkEditBean,
                               com.atlassian.crowd.embedded.api.User remoteUser)
                        throws Exception
Specified by:
moveIssuesAndIndex in interface BulkMoveOperation
Throws:
Exception

chooseContextNoValidate

public void chooseContextNoValidate(BulkEditBean bulkEditBean,
                                    com.atlassian.crowd.embedded.api.User remoteUser)
Specified by:
chooseContextNoValidate in interface BulkMoveOperation

chooseContext

public void chooseContext(BulkEditBean bulkEditBean,
                          com.atlassian.crowd.embedded.api.User remoteUser,
                          I18nHelper i18nHelper,
                          ErrorCollection errors)
Specified by:
chooseContext in interface BulkMoveOperation

finishChooseContext

public void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean,
                                com.atlassian.crowd.embedded.api.User remoteUser)
Description copied from interface: BulkMoveOperation
Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.

Specified by:
finishChooseContext in interface BulkMoveOperation
Parameters:
multiBulkMoveBean - MultiBulkMoveBean (Contains Collection of BulkEditBean objects).
remoteUser - User
See Also:
BulkMoveOperation.finishChooseContext(com.atlassian.jira.web.bean.BulkEditBean, User)

finishChooseContext

public void finishChooseContext(BulkEditBean bulkEditBean,
                                com.atlassian.crowd.embedded.api.User remoteUser)
Description copied from interface: BulkMoveOperation
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.

Specified by:
finishChooseContext in interface BulkMoveOperation
Parameters:
bulkEditBean - BulkEditBean containing Bulk Move information for a single target "Issue Context".
remoteUser - User doing the operation.
See Also:
BulkMoveOperation.finishChooseContext(com.atlassian.jira.web.bean.MultiBulkMoveBean, User)

isStatusValid

public boolean isStatusValid(BulkEditBean bulkEditBean)
Specified by:
isStatusValid in interface BulkMoveOperation

setStatusFields

public void setStatusFields(BulkEditBean bulkEditBean)
                     throws WorkflowException
Specified by:
setStatusFields in interface BulkMoveOperation
Throws:
WorkflowException

validatePopulateFields

public void validatePopulateFields(BulkEditBean bulkEditBean,
                                   ErrorCollection errors,
                                   I18nHelper i18nHelper)
Specified by:
validatePopulateFields in interface BulkMoveOperation

getFieldName

public String getFieldName(Field field,
                           I18nHelper i18nHelper)

getTargetHiddenFields

protected Collection getTargetHiddenFields(BulkEditBean bulkEditBean,
                                           com.atlassian.crowd.embedded.api.User remoteUser)

getNameKey

public String getNameKey()
Specified by:
getNameKey in interface IssueOperation

getDescriptionKey

public String getDescriptionKey()
Specified by:
getDescriptionKey in interface IssueOperation

getOperationName

public String getOperationName()
Specified by:
getOperationName in interface BulkOperation

getCannotPerformMessageKey

public String getCannotPerformMessageKey()
Specified by:
getCannotPerformMessageKey in interface BulkOperation

getWorkflowForType

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


Copyright © 2002-2012 Atlassian. All Rights Reserved.