Class BulkMoveOperationImpl
java.lang.Object
com.atlassian.jira.bulkedit.operation.BulkMoveOperationImpl
- All Implemented Interfaces:
BulkMoveOperation
,ProgressAwareBulkOperation
,IssueOperation
Operation for moving parent and their sub-takks issues from one or many contexts to a single target
context.
-
Field Summary
Fields inherited from interface com.atlassian.jira.bulkedit.operation.BulkMoveOperation
CANNOT_PERFORM_MESSAGE_KEY, NAME, NAME_KEY
-
Constructor Summary
ConstructorDescriptionBulkMoveOperationImpl
(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, IssueEventManager issueEventManager, BulkEditBeanSessionHelper bulkEditBeanSessionHelper, AttachmentManager attachmentManager, IssueEventBundleFactory issueEventBundleFactory, IssueLinkManager issueLinkManager, SubTaskManager subTaskManager, IssueToSubTaskConversionService issueToSubTaskConversionService, TxnAwareEventFactory txnAwareEventFactory, JiraProperties properties) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canPerform
(BulkEditBean bulkEditBean, ApplicationUser applicationUser) Determines whether the operation can be performed with the given set of issuesvoid
chooseContext
(BulkEditBean bulkEditBean, ApplicationUser applicationUser, I18nHelper i18nHelper, ErrorCollection errors) void
chooseContextNoValidate
(BulkEditBean bulkEditBean, ApplicationUser applicationUser) 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
(MultiBulkMoveBean multiBulkMoveBean, ApplicationUser applicationUser) Deprecated.An i18n key to be used to render the error message to be displayed when the user can not perform this bulk operation.getFieldName
(Field field, I18nHelper i18nHelper) An i18n key used to display a short description of this operation in the UI.int
getNumberOfTasks
(BulkEditBean bulkEditBean) Returns number of tasks/stages to be executed as part of this bulk operation.Returns the "operation name".protected Object
protected Collection<Field>
getTargetHiddenFields
(BulkEditBean bulkEditBean) getWorkflowForType
(Long projectId, String issueTypeId) boolean
isStatusValid
(BulkEditBean bulkEditBean) void
moveIssuesAndIndex
(BulkEditBean bulkEditBean, ApplicationUser remoteUser) void
moveIssuesAndIndex
(BulkEditBean bulkEditBean, ApplicationUser applicationUser, Context taskContext) void
perform
(BulkEditBean bulkEditBean, ApplicationUser applicationUser, Context taskContext) Performs the operation on the given set of issuesvoid
setStatusFields
(BulkEditBean bulkEditBean) void
validatePopulateFields
(BulkEditBean bulkEditBean, ErrorCollection errors, I18nHelper i18nHelper)
-
Field Details
-
log
protected static final org.apache.log4j.Logger log
-
-
Constructor Details
-
BulkMoveOperationImpl
public BulkMoveOperationImpl(WorkflowManager workflowManager, ProjectManager projectManager, FieldManager fieldManager, IssueFactory issueFactory, IssueManager issueManager, IssueEventManager issueEventManager, BulkEditBeanSessionHelper bulkEditBeanSessionHelper, AttachmentManager attachmentManager, IssueEventBundleFactory issueEventBundleFactory, IssueLinkManager issueLinkManager, SubTaskManager subTaskManager, IssueToSubTaskConversionService issueToSubTaskConversionService, TxnAwareEventFactory txnAwareEventFactory, JiraProperties properties)
-
-
Method Details
-
canPerform
Determines whether the operation can be performed with the given set of issues- Specified by:
canPerform
in interfaceProgressAwareBulkOperation
- See Also:
-
perform
public void perform(BulkEditBean bulkEditBean, ApplicationUser applicationUser, Context taskContext) throws BulkOperationException Performs the operation on the given set of issues- Specified by:
perform
in interfaceProgressAwareBulkOperation
- Throws:
BulkOperationException
-
getNumberOfTasks
Description copied from interface:ProgressAwareBulkOperation
Returns number of tasks/stages to be executed as part of this bulk operation. The number returned here must be consistent with the number of updates performed as part ofProgressAwareBulkOperation.perform(com.atlassian.jira.web.bean.BulkEditBean, com.atlassian.jira.user.ApplicationUser, com.atlassian.jira.task.context.Context)
.- Specified by:
getNumberOfTasks
in interfaceProgressAwareBulkOperation
- Returns:
- Number of tasks/stages to be executed
-
moveIssuesAndIndex
public void moveIssuesAndIndex(BulkEditBean bulkEditBean, ApplicationUser applicationUser, Context taskContext) - Specified by:
moveIssuesAndIndex
in interfaceBulkMoveOperation
-
chooseContextNoValidate
- Specified by:
chooseContextNoValidate
in interfaceBulkMoveOperation
-
chooseContext
public void chooseContext(BulkEditBean bulkEditBean, ApplicationUser applicationUser, I18nHelper i18nHelper, ErrorCollection errors) - Specified by:
chooseContext
in interfaceBulkMoveOperation
-
getParam
-
finishChooseContext
@Deprecated public void finishChooseContext(MultiBulkMoveBean multiBulkMoveBean, ApplicationUser applicationUser) Deprecated.Description copied from interface:BulkMoveOperation
Does the finishChooseContext() operation for all the BulkEditBeans in the given MultiBulkMoveBean.- Specified by:
finishChooseContext
in interfaceBulkMoveOperation
- Parameters:
multiBulkMoveBean
- MultiBulkMoveBean (Contains Collection of BulkEditBean objects).applicationUser
- User- See Also:
-
finishChooseContext
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.
- Sets the target field layout (aka "Field Configuration") according to target Project and Issue Type.
- Decides which Issue Fields need to be edited by the user.
- Will delete values for fields that should be removed (ie not used in new context).
- Sets the SubTaskBulkEditBean if any of these issues have subtasks which will also need to be moved.
- Specified by:
finishChooseContext
in interfaceBulkMoveOperation
- Parameters:
bulkEditBean
- BulkEditBean containing Bulk Move information for a single target "Issue Context".applicationUser
- User doing the operation.- See Also:
-
isStatusValid
- Specified by:
isStatusValid
in interfaceBulkMoveOperation
-
moveIssuesAndIndex
- Specified by:
moveIssuesAndIndex
in interfaceBulkMoveOperation
-
setStatusFields
- Specified by:
setStatusFields
in interfaceBulkMoveOperation
- Throws:
WorkflowException
-
validatePopulateFields
public void validatePopulateFields(BulkEditBean bulkEditBean, ErrorCollection errors, I18nHelper i18nHelper) - Specified by:
validatePopulateFields
in interfaceBulkMoveOperation
-
getFieldName
-
getTargetHiddenFields
-
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 interfaceIssueOperation
- Returns:
- An i18n key used to display a short description of this operation in the UI
-
getDescriptionKey
- Specified by:
getDescriptionKey
in interfaceIssueOperation
-
getOperationName
Description copied from interface:ProgressAwareBulkOperation
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 interfaceProgressAwareBulkOperation
- Returns:
- The "operation name"
-
getCannotPerformMessageKey
Description copied from interface:ProgressAwareBulkOperation
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 interfaceProgressAwareBulkOperation
- 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
- Throws:
WorkflowException
-