com.atlassian.jira.web.bean
Interface BulkEditBean

All Superinterfaces:
OperationContext, SingleIssueModeEditBean
All Known Implementing Classes:
BulkEditBeanImpl

@PublicApi
public interface BulkEditBean
extends OperationContext, SingleIssueModeEditBean

Used in the BulkEdit Wizard Stores in session: currentStep action selected and values associated with that action issues selected


Field Summary
static String BULK_DELETE
           
static String BULK_DELETE_OP
           
static String BULK_EDIT_OP
           
static String BULK_MOVE_OP
           
static String BULKEDIT_PREFIX
           
static String SUBTASK_STATUS_INFO
           
 
Method Summary
 void addAvailablePreviousStep(int stepId)
           
 void addIssues(Collection<Issue> issues)
           
 void addRetainValue(String fieldId)
           
 void addTransitionErrors(String issueKey, Collection<String> errors)
           
 void clearAvailablePreviousSteps()
           
 Map<String,BulkEditAction> getActions()
           
 String getCheckboxName(Issue issue)
           
 int getCurrentStep()
           
 CustomField getCustomField(String customFieldKey)
           
 String getCustomFieldView(CustomField customField)
           
 Collection<FieldLayout> getFieldLayouts()
          Returns all the unique field layouts of the selected issues
 FieldScreenRenderer getFieldScreenRenderer()
           
 Map<String,Map<Long,Long>> getFieldSubstitutionMap()
           
 Map<String,Object> getFieldValues()
           
 Map<String,Object> getFieldValuesHolder()
           
 Issue getFirstTargetIssueObject()
          This method is used to get a target issue that will provide the correct context (i.e.
 Set<Issue> getInvalidIssues()
          Gets issues whose status is null
 Collection<org.ofbiz.core.entity.GenericValue> getInvalidStatuses()
          Gets a set of invalid statuses that are not valid in the destination workflow
 int getInvalidSubTaskCount()
           
 Set<String> getInvalidSubTaskStatusesByType(String subTaskTypeId)
           
 Set<String> getInvalidSubTaskTypes()
           
 IssueOperation getIssueOperation()
           
 List<Issue> getIssuesFromSearchRequest()
           
 Collection<?> getIssuesInUse()
           
 org.ofbiz.core.entity.GenericValue getIssueType()
           
 Collection<IssueType> getIssueTypeObjects()
           
 Collection<String> getIssueTypes()
           
 String getKey()
          Returns a string that represents a "unique" identifier for this bulke edit bean
 int getMaxIssues()
          If there is a limit on the number of issues that can be bulk edited, this will return that number, otherwise -1.
 Map<?,?> getMessagedFieldLayoutItems()
           
 Collection<?> getMoveFieldLayoutItems()
           
 String getOperationName()
           
 Map<String,?> getParams()
           
 BulkEditBean getParentBulkEditBean()
           
 org.ofbiz.core.entity.GenericValue getProject()
          Deprecated. Use getSingleProject() instead. Since v5.2.
 Collection<Long> getProjectIds()
          returns a list of project ids for projects which the currently selected issues belong to.
 Collection<Project> getProjectObjects()
           
 Collection<org.ofbiz.core.entity.GenericValue> getProjects()
          Deprecated. Use getProjectObjects() instead. Since v5.2.
 String getRedirectUrl()
          Returns the redirect URL.
 MultiBulkMoveBean getRelatedMultiBulkMoveBean()
           
 Collection<?> getRemovedFields()
           
 Set<String> getRetainValues()
           
 List<Issue> getSelectedIssues()
          Returns a list of "selected" issues.
 List<Issue> getSelectedIssuesIncludingSubTasks()
           
 String getSelectedTransitionName()
           
 WorkflowTransitionKey getSelectedWFTransitionKey()
           
 Project getSingleProject()
          Returns the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.
 Map<String,String> getStatusMapHolder()
           
 BulkEditBean getSubTaskBulkEditBean()
           
 List<Issue> getSubTaskOfSelectedIssues()
           
 Collection<String> getSubTaskStatusHolder()
           
 FieldLayout getTargetFieldLayout()
           
 FieldLayout getTargetFieldLayoutForType(String targetTypeId)
           
 List<org.ofbiz.core.entity.GenericValue> getTargetIssueGVs()
          This is a convinience method for converting the list of objects to a list of GenericValues
 Map<Issue,Issue> getTargetIssueObjects()
           
 org.ofbiz.core.entity.GenericValue getTargetIssueTypeGV()
           
 String getTargetIssueTypeId()
           
 IssueType getTargetIssueTypeObject()
           
 Long getTargetPid()
           
 Project getTargetProject()
           
 org.ofbiz.core.entity.GenericValue getTargetProjectGV()
           
 org.ofbiz.core.entity.GenericValue getTargetStatus(Issue issue)
          Deprecated. Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v5.0.
 Status getTargetStatusObject(Issue issue)
           
 JiraWorkflow getTargetWorkflow()
           
 JiraWorkflow getTargetWorkflowByType(String issueTypeId)
           
 Map<String,Collection<String>> getTransitionErrors(Integer maxCount)
          Get the transition errors after bulk issue transition
 List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)
           
 List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)
           
 String getTransitionName(String workflowName, String actionDescriptorId)
           
 Set<String> getWorkflowsInUse()
           
 org.apache.commons.collections.MultiMap getWorkflowTransitionMap()
           
 void initMultiBulkBean()
           
 void initMultiBulkBeanWithSubTasks()
           
 void initSelectedIssues(Collection<Issue> selectedIssues)
          Initialises the BulkEditBean with the selected issues
 boolean isAvailablePreviousStep(int stepId)
           
 boolean isChecked(Issue issue)
           
 boolean isHasMailServer()
          Check if a mail server has been specified.
 boolean isMultipleProjects()
           
 boolean isMutipleIssueTypes()
           
 boolean isOnlyContainsSubTasks()
           
 boolean isRetainChecked(String fieldId)
           
 boolean isSendBulkNotification()
           
 boolean isSubTaskCollection()
           
 boolean isSubTaskOnly()
           
 boolean isTranisitionErrorsLimited(Integer maxCount)
           
 boolean isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)
           
 void populateStatusHolder()
           
 void populateSubTaskStatusHolder()
           
 void resetMoveData()
           
 void resetWorkflowTransitionSelection()
           
 void setActions(Map<String,BulkEditAction> actions)
           
 void setCurrentStep(int currentStep)
           
 void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)
           
 void setInvalidSubTaskStatusesByType(Map<String,Set<String>> invalidSubTaskStatusesByType)
           
 void setInvalidSubTaskTypes(Set<String> invalidSubTaskTypes)
           
 void setIssuesFromSearchRequest(List<Issue> issuesFromSearchRequest)
           
 void setIssuesInUse(Collection<?> issuesInUse)
           
 void setMaxIssues(int maxIssues)
          Sets the maximum number of issues allowed to be bulk edited at once.
 void setMessagedFieldLayoutItems(Map<?,?> messagedFieldLayoutItems)
           
 void setMoveFieldLayoutItems(Collection<?> moveFieldLayoutItems)
           
 void setOperationName(String operationName)
           
 void setParams(Map<String,?> params)
           
 void setParentBulkEditBean(BulkEditBean parentBulkEditBean)
          If this BulkEditBean contains subtasks of another BulkEditBean, then we can set a pointer back to the BulkEditBean containing the parent issues.
 void setRedirectUrl(String redirectUrl)
          Sets the URL to which user should be redirected once the bulk operation is finished.
 void setRelatedMultiBulkMoveBean(MultiBulkMoveBean relatedMultiBulkMoveBean)
           
 void setRemovedFields(Set<?> removedFields)
           
 void setRetainValues(Set<String> retainValues)
           
 void setSelectedWFTransitionKey(WorkflowTransitionKey workflowTransitionKey)
           
 void setSendBulkNotification(boolean sendBulkNotification)
           
 void setSubTaskBulkEditBean(BulkEditBean subTaskBulkEditBean)
           
 void setSubTaskOfSelectedIssues(List<Issue> subTaskOfSelectedIssues)
           
 void setTargetFieldLayout()
          Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration"); for the target Project and Issue Type.
 void setTargetIssueObjects(Map<Issue,Issue> targetIssueObjects)
           
 void setTargetIssueTypeId(String id)
           
 void setTargetProject(org.ofbiz.core.entity.GenericValue project)
          Deprecated. Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.
 void setTargetProject(Project project)
           
 void setWorkflowTransitionMap(org.apache.commons.collections.MultiMap workflowTransitionMap)
           
 
Methods inherited from interface com.atlassian.jira.web.bean.SingleIssueModeEditBean
getSingleIssueKey, isSingleMode, setSingleIssueKey
 

Field Detail

SUBTASK_STATUS_INFO

static final String SUBTASK_STATUS_INFO
See Also:
Constant Field Values

BULK_MOVE_OP

static final String BULK_MOVE_OP
See Also:
Constant Field Values

BULK_DELETE_OP

static final String BULK_DELETE_OP
See Also:
Constant Field Values

BULK_EDIT_OP

static final String BULK_EDIT_OP
See Also:
Constant Field Values

BULK_DELETE

static final String BULK_DELETE
See Also:
Constant Field Values

BULKEDIT_PREFIX

static final String BULKEDIT_PREFIX
See Also:
Constant Field Values
Method Detail

getParentBulkEditBean

BulkEditBean getParentBulkEditBean()

initSelectedIssues

void initSelectedIssues(Collection<Issue> selectedIssues)
Initialises the BulkEditBean with the selected issues

Parameters:
selectedIssues - Required selected Issues.

addIssues

void addIssues(Collection<Issue> issues)

getSelectedIssues

List<Issue> getSelectedIssues()
Returns a list of "selected" issues. For the "top level" BulkEditBean this should be the actual issues chosen by the user for the bulk operation.

The Bulk Move operation will then break this list up in groups of project and issue type and store each of these types in its own BulkEditBean, so for these nested BulkEditBeans this list may be a subset of the original selected issues. Furthermore when moving parent issues to a new Project, we will have to move any subtasks as well. In this case a third level of BulkEditBean is created and these ones will have subtasks that may not have been explicitly selected by the user at all.

Returns:
List of the Selected Issues

getSelectedIssuesIncludingSubTasks

List<Issue> getSelectedIssuesIncludingSubTasks()

isChecked

boolean isChecked(Issue issue)

isMultipleProjects

boolean isMultipleProjects()

isMutipleIssueTypes

boolean isMutipleIssueTypes()

getProject

org.ofbiz.core.entity.GenericValue getProject()
Deprecated. Use getSingleProject() instead. Since v5.2.


getSingleProject

Project getSingleProject()
Returns the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.

Returns:
the single Project if there is only one Project in this BulkEditBean, otherwise throws an IllegalStateException.
See Also:
isMultipleProjects()

getIssueType

org.ofbiz.core.entity.GenericValue getIssueType()

getFieldLayouts

Collection<FieldLayout> getFieldLayouts()
Returns all the unique field layouts of the selected issues

Returns:
Collection of the FieldLayouts.

getKey

String getKey()
Returns a string that represents a "unique" identifier for this bulke edit bean

Returns:
unique key formed from projects, issue types, target project if a subtask only bulkeditbean and size of the bean

getProjectIds

Collection<Long> getProjectIds()
returns a list of project ids for projects which the currently selected issues belong to.

Returns:
A list of project ids for projects which the currently selected issues belong to.

getProjects

Collection<org.ofbiz.core.entity.GenericValue> getProjects()
Deprecated. Use getProjectObjects() instead. Since v5.2.

Returns:

getProjectObjects

Collection<Project> getProjectObjects()

getIssueTypes

Collection<String> getIssueTypes()

getIssueTypeObjects

Collection<IssueType> getIssueTypeObjects()

getCheckboxName

String getCheckboxName(Issue issue)

getCustomField

CustomField getCustomField(String customFieldKey)
                           throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

getCustomFieldView

String getCustomFieldView(CustomField customField)
                          throws FieldValidationException
Throws:
FieldValidationException

setParams

void setParams(Map<String,?> params)

getParams

Map<String,?> getParams()

setIssuesInUse

void setIssuesInUse(Collection<?> issuesInUse)

addAvailablePreviousStep

void addAvailablePreviousStep(int stepId)

clearAvailablePreviousSteps

void clearAvailablePreviousSteps()

isAvailablePreviousStep

boolean isAvailablePreviousStep(int stepId)

isHasMailServer

boolean isHasMailServer()
Check if a mail server has been specified.

Returns:
boolean true if a mail server has been specified

getMoveFieldLayoutItems

Collection<?> getMoveFieldLayoutItems()

setMoveFieldLayoutItems

void setMoveFieldLayoutItems(Collection<?> moveFieldLayoutItems)

getTargetPid

Long getTargetPid()

setTargetProject

void setTargetProject(org.ofbiz.core.entity.GenericValue project)
Deprecated. Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.


setTargetProject

void setTargetProject(Project project)

getTargetProject

Project getTargetProject()

getTargetProjectGV

org.ofbiz.core.entity.GenericValue getTargetProjectGV()

setTargetIssueTypeId

void setTargetIssueTypeId(String id)

getTargetIssueTypeId

String getTargetIssueTypeId()

getTargetIssueTypeGV

org.ofbiz.core.entity.GenericValue getTargetIssueTypeGV()

getTargetIssueTypeObject

IssueType getTargetIssueTypeObject()

populateStatusHolder

void populateStatusHolder()
                          throws WorkflowException
Throws:
WorkflowException

getInvalidStatuses

Collection<org.ofbiz.core.entity.GenericValue> getInvalidStatuses()
                                                                  throws WorkflowException
Gets a set of invalid statuses that are not valid in the destination workflow

Returns:
Set of GenericValue objects
Throws:
WorkflowException

getInvalidIssues

Set<Issue> getInvalidIssues()
                            throws WorkflowException
Gets issues whose status is null

Returns:
Set of Issue objects. Emoty Set if no invalid issues
Throws:
WorkflowException

getInvalidSubTaskTypes

Set<String> getInvalidSubTaskTypes()
                                   throws WorkflowException
Throws:
WorkflowException

getInvalidSubTaskStatusesByType

Set<String> getInvalidSubTaskStatusesByType(String subTaskTypeId)
                                            throws WorkflowException
Throws:
WorkflowException

setTargetFieldLayout

void setTargetFieldLayout()
Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration"); for the target Project and Issue Type.


getTargetFieldLayout

FieldLayout getTargetFieldLayout()

getTargetFieldLayoutForType

FieldLayout getTargetFieldLayoutForType(String targetTypeId)

getTargetWorkflow

JiraWorkflow getTargetWorkflow()
                               throws WorkflowException
Throws:
WorkflowException

getFirstTargetIssueObject

Issue getFirstTargetIssueObject()
This method is used to get a target issue that will provide the correct context (i.e. project and issue type);, for where you are moving to. The object returned is not mapped to a specific selected issue.

Returns:
an issue whose project and issue type are of where the you are moving to.

getTargetIssueObjects

Map<Issue,Issue> getTargetIssueObjects()

setTargetIssueObjects

void setTargetIssueObjects(Map<Issue,Issue> targetIssueObjects)

getTargetIssueGVs

List<org.ofbiz.core.entity.GenericValue> getTargetIssueGVs()
This is a convinience method for converting the list of objects to a list of GenericValues

Returns:
list of GenericValue issue objects

getTargetStatusObject

Status getTargetStatusObject(Issue issue)

getTargetStatus

@Deprecated
org.ofbiz.core.entity.GenericValue getTargetStatus(Issue issue)
Deprecated. Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v5.0.


getStatusMapHolder

Map<String,String> getStatusMapHolder()

getRemovedFields

Collection<?> getRemovedFields()

setRemovedFields

void setRemovedFields(Set<?> removedFields)

resetMoveData

void resetMoveData()

populateSubTaskStatusHolder

void populateSubTaskStatusHolder()
                                 throws WorkflowException
Throws:
WorkflowException

getTargetWorkflowByType

JiraWorkflow getTargetWorkflowByType(String issueTypeId)
                                     throws WorkflowException
Throws:
WorkflowException

getSubTaskStatusHolder

Collection<String> getSubTaskStatusHolder()

isRetainChecked

boolean isRetainChecked(String fieldId)

isSubTaskCollection

boolean isSubTaskCollection()

isSubTaskOnly

boolean isSubTaskOnly()

getOperationName

String getOperationName()

setOperationName

void setOperationName(String operationName)

setInvalidSubTaskStatusesByType

void setInvalidSubTaskStatusesByType(Map<String,Set<String>> invalidSubTaskStatusesByType)

setInvalidSubTaskTypes

void setInvalidSubTaskTypes(Set<String> invalidSubTaskTypes)

getInvalidSubTaskCount

int getInvalidSubTaskCount()

getRetainValues

Set<String> getRetainValues()

setRetainValues

void setRetainValues(Set<String> retainValues)

addRetainValue

void addRetainValue(String fieldId)

getSubTaskOfSelectedIssues

List<Issue> getSubTaskOfSelectedIssues()

setSubTaskOfSelectedIssues

void setSubTaskOfSelectedIssues(List<Issue> subTaskOfSelectedIssues)

getIssuesFromSearchRequest

List<Issue> getIssuesFromSearchRequest()

setIssuesFromSearchRequest

void setIssuesFromSearchRequest(List<Issue> issuesFromSearchRequest)

getCurrentStep

int getCurrentStep()

setCurrentStep

void setCurrentStep(int currentStep)

getActions

Map<String,BulkEditAction> getActions()

setActions

void setActions(Map<String,BulkEditAction> actions)

getFieldValues

Map<String,Object> getFieldValues()

getFieldValuesHolder

Map<String,Object> getFieldValuesHolder()
Specified by:
getFieldValuesHolder in interface OperationContext

getIssueOperation

IssueOperation getIssueOperation()
Specified by:
getIssueOperation in interface OperationContext

getIssuesInUse

Collection<?> getIssuesInUse()

getSubTaskBulkEditBean

BulkEditBean getSubTaskBulkEditBean()

setSubTaskBulkEditBean

void setSubTaskBulkEditBean(BulkEditBean subTaskBulkEditBean)

getRelatedMultiBulkMoveBean

MultiBulkMoveBean getRelatedMultiBulkMoveBean()

setRelatedMultiBulkMoveBean

void setRelatedMultiBulkMoveBean(MultiBulkMoveBean relatedMultiBulkMoveBean)

isSendBulkNotification

boolean isSendBulkNotification()

setSendBulkNotification

void setSendBulkNotification(boolean sendBulkNotification)

getWorkflowTransitionMap

org.apache.commons.collections.MultiMap getWorkflowTransitionMap()

setWorkflowTransitionMap

void setWorkflowTransitionMap(org.apache.commons.collections.MultiMap workflowTransitionMap)

getWorkflowsInUse

Set<String> getWorkflowsInUse()

getTransitionIdsForWorkflow

List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)

getTransitionName

String getTransitionName(String workflowName,
                         String actionDescriptorId)

getTransitionIssueKeys

List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)

setSelectedWFTransitionKey

void setSelectedWFTransitionKey(WorkflowTransitionKey workflowTransitionKey)

getSelectedWFTransitionKey

WorkflowTransitionKey getSelectedWFTransitionKey()

resetWorkflowTransitionSelection

void resetWorkflowTransitionSelection()

isTransitionChecked

boolean isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)

getSelectedTransitionName

String getSelectedTransitionName()

setFieldScreenRenderer

void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)

getFieldScreenRenderer

FieldScreenRenderer getFieldScreenRenderer()

getMessagedFieldLayoutItems

Map<?,?> getMessagedFieldLayoutItems()

setMessagedFieldLayoutItems

void setMessagedFieldLayoutItems(Map<?,?> messagedFieldLayoutItems)

initMultiBulkBean

void initMultiBulkBean()

initMultiBulkBeanWithSubTasks

void initMultiBulkBeanWithSubTasks()

isOnlyContainsSubTasks

boolean isOnlyContainsSubTasks()

getTransitionErrors

Map<String,Collection<String>> getTransitionErrors(@Nullable
                                                   Integer maxCount)
Get the transition errors after bulk issue transition

Parameters:
maxCount - max count of errors to return or null for no limits.
Returns:
transition errors after bulk issue transition

addTransitionErrors

void addTransitionErrors(@Nonnull
                         String issueKey,
                         @Nonnull
                         Collection<String> errors)

isTranisitionErrorsLimited

boolean isTranisitionErrorsLimited(@Nullable
                                   Integer maxCount)
Returns:
true if there is more errors on transitioned issues than maxCount.

setParentBulkEditBean

void setParentBulkEditBean(BulkEditBean parentBulkEditBean)
If this BulkEditBean contains subtasks of another BulkEditBean, then we can set a pointer back to the BulkEditBean containing the parent issues. This is used so that the subtask issues have access to the new values in their parent issues. See JRA-13937 where we had to ensure that the subtasks in a Bulk Move could get to the new Security Level of their parents.

Parameters:
parentBulkEditBean - The BulkEditBean that contains parent issues of the issues (subtasks); in this BulkEditBean.

getMaxIssues

int getMaxIssues()
If there is a limit on the number of issues that can be bulk edited, this will return that number, otherwise -1.

Returns:
-1 to indicate no limit on bulk editing issues, otherwise the number of the limit.

setMaxIssues

void setMaxIssues(int maxIssues)
Sets the maximum number of issues allowed to be bulk edited at once. Use -1 to indicate no limit.

Parameters:
maxIssues - either -1 or a positive integer representing the maximum number of issues allowed for bulk edit.

getFieldSubstitutionMap

Map<String,Map<Long,Long>> getFieldSubstitutionMap()

getRedirectUrl

String getRedirectUrl()
Returns the redirect URL. See setRedirectUrl(String).


setRedirectUrl

void setRedirectUrl(String redirectUrl)
Sets the URL to which user should be redirected once the bulk operation is finished. This is used only if a progress indicator is displayed to the user while the operation is being executed.



Copyright © 2002-2015 Atlassian. All Rights Reserved.