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
CANNOT_PERFORM_MESSAGE_KEY, NAME, NAME_KEY
 
Constructor Summary
BulkMoveOperationImpl(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, IssueEventManager issueEventManager, BulkEditBeanSessionHelper bulkEditBeanSessionHelper, AttachmentManager attachmentManager)
           
 
Method Summary
 boolean canPerform(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
          Determines whether the operation can be performed with the given set of issues
 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, ApplicationUser applicationUser, I18nHelper i18nHelper, ErrorCollection errors)
           
 void chooseContext(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser, I18nHelper i18nHelper, ErrorCollection errors)
          Deprecated. 
 void chooseContextNoValidate(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
           
 void chooseContextNoValidate(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
          Deprecated. 
 void finishChooseContext(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
          Does operations on the given BulkEditBean to finalise the "Choose Project and Issue Type" step of the Bulk Move.
 void finishChooseContext(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
          Deprecated. 
 void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, ApplicationUser applicationUser)
          Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.
 void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, com.atlassian.crowd.embedded.api.User remoteUser)
          Deprecated. 
 String getCannotPerformMessageKey()
          An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.
 String getDescriptionKey()
           
 String getFieldName(Field field, I18nHelper i18nHelper)
           
 String getNameKey()
          An i18n key used to display a short description of this operation in the UI.
 String getOperationName()
          Returns the "operation name".
protected  Collection<Field> getTargetHiddenFields(BulkEditBean bulkEditBean)
           
 JiraWorkflow getWorkflowForType(Long projectId, String issueTypeId)
           
 boolean isStatusValid(BulkEditBean bulkEditBean)
           
 void moveIssuesAndIndex(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
           
 void moveIssuesAndIndex(BulkEditBean bulkEditBean, com.atlassian.crowd.embedded.api.User remoteUser)
          Deprecated. 
 void perform(BulkEditBean bulkEditBean, ApplicationUser applicationUser)
          Performs the operation on the given set of issues
 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,
                             IssueEventManager issueEventManager,
                             BulkEditBeanSessionHelper bulkEditBeanSessionHelper,
                             AttachmentManager attachmentManager)
Method Detail

canPerform

public boolean canPerform(BulkEditBean bulkEditBean,
                          ApplicationUser applicationUser)
Determines whether the operation can be performed with the given set of issues

See Also:
BulkEditBean.getSelectedIssues()

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
See Also:
BulkEditBean.getSelectedIssues()

perform

public void perform(BulkEditBean bulkEditBean,
                    ApplicationUser applicationUser)
             throws Exception
Performs the operation on the given set of issues

Throws:
Exception

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,
                               ApplicationUser applicationUser)
                        throws Exception
Specified by:
moveIssuesAndIndex in interface BulkMoveOperation
Throws:
Exception

moveIssuesAndIndex

@Deprecated
public void moveIssuesAndIndex(BulkEditBean bulkEditBean,
                                          com.atlassian.crowd.embedded.api.User remoteUser)
                        throws Exception
Deprecated. 

Specified by:
moveIssuesAndIndex in interface BulkMoveOperation
Throws:
Exception

chooseContextNoValidate

@Deprecated
public void chooseContextNoValidate(BulkEditBean bulkEditBean,
                                               com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated. 

Specified by:
chooseContextNoValidate in interface BulkMoveOperation

chooseContextNoValidate

public void chooseContextNoValidate(BulkEditBean bulkEditBean,
                                    ApplicationUser applicationUser)
Specified by:
chooseContextNoValidate in interface BulkMoveOperation

chooseContext

@Deprecated
public void chooseContext(BulkEditBean bulkEditBean,
                                     com.atlassian.crowd.embedded.api.User remoteUser,
                                     I18nHelper i18nHelper,
                                     ErrorCollection errors)
Deprecated. 

Specified by:
chooseContext in interface BulkMoveOperation

chooseContext

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

finishChooseContext

@Deprecated
public void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean,
                                           com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated. 

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, ApplicationUser)

finishChooseContext

public void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean,
                                ApplicationUser applicationUser)
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).
applicationUser - User
See Also:
BulkMoveOperation.finishChooseContext(com.atlassian.jira.web.bean.BulkEditBean, ApplicationUser)

finishChooseContext

@Deprecated
public void finishChooseContext(BulkEditBean bulkEditBean,
                                           com.atlassian.crowd.embedded.api.User remoteUser)
Deprecated. 

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, ApplicationUser)

finishChooseContext

public void finishChooseContext(BulkEditBean bulkEditBean,
                                ApplicationUser applicationUser)
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".
applicationUser - User doing the operation.
See Also:
BulkMoveOperation.finishChooseContext(com.atlassian.jira.web.bean.MultiBulkMoveBean, ApplicationUser)

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<Field> getTargetHiddenFields(BulkEditBean bulkEditBean)

getNameKey

public String getNameKey()
Description copied from interface: IssueOperation
An i18n key used to display a short description of this operation in the UI. e.g " Watch Issues "

Specified by:
getNameKey in interface IssueOperation
Returns:
An i18n key used to display a short description of this operation in the UI

getDescriptionKey

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

getOperationName

public String getOperationName()
Description copied from interface: BulkOperation
Returns the "operation name".

This is used to build up the name of the action used to render the details screen in the bulk change UI.

The action name that is generated as operationName + "Details.jspa". See BulkChooseOperation for details

Specified by:
getOperationName in interface BulkOperation
Returns:
The "operation name"

getCannotPerformMessageKey

public String getCannotPerformMessageKey()
Description copied from interface: BulkOperation
An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.

Specified by:
getCannotPerformMessageKey in interface BulkOperation
Returns:
An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.

getWorkflowForType

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


Copyright © 2002-2014 Atlassian. All Rights Reserved.