com.atlassian.jira.web.bean
Class BulkEditBean

java.lang.Object
  extended by com.atlassian.jira.web.bean.BulkEditBean
All Implemented Interfaces:
OperationContext

public abstract class BulkEditBean
extends Object
implements OperationContext

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
           
 
Constructor Summary
BulkEditBean()
           
 
Method Summary
abstract  void addAvailablePreviousStep(int stepId)
           
abstract  void addIssues(Collection<Issue> issues)
           
abstract  void addRetainValue(String fieldId)
           
abstract  void clearAvailablePreviousSteps()
           
abstract  Map<String,BulkEditAction> getActions()
           
abstract  String getCheckboxName(Issue issue)
           
abstract  int getCurrentStep()
           
abstract  CustomField getCustomField(String customFieldKey)
           
abstract  String getCustomFieldView(CustomField customField)
           
abstract  Collection<FieldLayout> getFieldLayouts()
          Returns all the unique field layouts of the selected issues
abstract  FieldScreenRenderer getFieldScreenRenderer()
           
abstract  Map<String,Map<Long,Long>> getFieldSubstitutionMap()
           
abstract  Map<String,Object> getFieldValues()
           
abstract  Map<String,Object> getFieldValuesHolder()
           
abstract  Issue getFirstTargetIssueObject()
          This method is used to get a target issue that will provide the correct context (i.e.
static BulkEditBean getFromSession()
           
abstract  Set<Issue> getInvalidIssues()
          Gets issues whose status is null
abstract  Collection<org.ofbiz.core.entity.GenericValue> getInvalidStatuses()
          Gets a set of invalid statuses that are not valid in the destination workflow
abstract  int getInvalidSubTaskCount()
           
abstract  Set<String> getInvalidSubTaskStatusesByType(String subTaskTypeId)
           
abstract  Set<String> getInvalidSubTaskTypes()
           
abstract  IssueOperation getIssueOperation()
           
abstract  List<Issue> getIssuesFromSearchRequest()
           
abstract  Collection<?> getIssuesInUse()
           
abstract  org.ofbiz.core.entity.GenericValue getIssueType()
           
abstract  Collection<IssueType> getIssueTypeObjects()
           
abstract  Collection<String> getIssueTypes()
           
abstract  String getKey()
          Returns a string that represents a "unique" identifier for this bulke edit bean
abstract  int getMaxIssues()
          If there is a limit on the number of issues that can be bulk edited, this will return that number, otherwise -1.
abstract  Map<?,?> getMessagedFieldLayoutItems()
           
abstract  Collection<?> getMoveFieldLayoutItems()
           
abstract  String getOperationName()
           
abstract  Map<String,?> getParams()
           
abstract  BulkEditBean getParentBulkEditBean()
           
abstract  org.ofbiz.core.entity.GenericValue getProject()
           
abstract  Collection<Long> getProjectIds()
          returns a list of project ids for projects which the currently selected issues belong to.
abstract  Collection<org.ofbiz.core.entity.GenericValue> getProjects()
           
abstract  MultiBulkMoveBean getRelatedMultiBulkMoveBean()
           
abstract  Collection<?> getRemovedFields()
           
abstract  Set<String> getRetainValues()
           
abstract  List<Issue> getSelectedIssues()
          Returns a list of "selected" issues.
abstract  List<Issue> getSelectedIssuesIncludingSubTasks()
           
abstract  String getSelectedTransitionName()
           
abstract  WorkflowTransitionKey getSelectedWFTransitionKey()
           
abstract  Map<String,String> getStatusMapHolder()
           
abstract  BulkEditBean getSubTaskBulkEditBean()
           
abstract  List<Issue> getSubTaskOfSelectedIssues()
           
abstract  Collection<String> getSubTaskStatusHolder()
           
abstract  FieldLayout getTargetFieldLayout()
           
abstract  FieldLayout getTargetFieldLayoutForType(String targetTypeId)
           
abstract  List<org.ofbiz.core.entity.GenericValue> getTargetIssueGVs()
          This is a convinience method for converting the list of objects to a list of GenericValues
abstract  Map<Issue,Issue> getTargetIssueObjects()
           
abstract  org.ofbiz.core.entity.GenericValue getTargetIssueTypeGV()
           
abstract  String getTargetIssueTypeId()
           
abstract  IssueType getTargetIssueTypeObject()
           
abstract  Long getTargetPid()
           
abstract  Project getTargetProject()
           
abstract  org.ofbiz.core.entity.GenericValue getTargetProjectGV()
           
abstract  org.ofbiz.core.entity.GenericValue getTargetStatus(Issue issue)
           
abstract  JiraWorkflow getTargetWorkflow()
           
abstract  JiraWorkflow getTargetWorkflowByType(String issueTypeId)
           
abstract  List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)
           
abstract  List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)
           
abstract  String getTransitionName(String workflowName, String actionDescriptorId)
           
abstract  Set<String> getWorkflowsInUse()
           
abstract  org.apache.commons.collections.MultiMap getWorkflowTransitionMap()
           
abstract  void initMultiBulkBean()
           
abstract  void initMultiBulkBeanWithSubTasks()
           
abstract  void initSelectedIssues(Collection<Issue> selectedIssues)
          Initialises the BulkEditBean with the selected issues
abstract  boolean isAvailablePreviousStep(int stepId)
           
abstract  boolean isChecked(Issue issue)
           
abstract  boolean isHasMailServer()
          Check if a mail server has been specified.
abstract  boolean isMultipleProjects()
           
abstract  boolean isMutipleIssueTypes()
           
abstract  boolean isOnlyContainsSubTasks()
           
abstract  boolean isRetainChecked(String fieldId)
           
abstract  boolean isSendBulkNotification()
           
abstract  boolean isSubTaskCollection()
           
abstract  boolean isSubTaskOnly()
           
abstract  boolean isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)
           
abstract  void populateStatusHolder()
           
abstract  void populateSubTaskStatusHolder()
           
static void removeFromSession()
           
abstract  void resetMoveData()
           
abstract  void resetWorkflowTransitionSelection()
           
abstract  void setActions(Map<String,BulkEditAction> actions)
           
abstract  void setCurrentStep(int currentStep)
           
abstract  void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)
           
abstract  void setInvalidSubTaskStatusesByType(Map<String,Set<String>> invalidSubTaskStatusesByType)
           
abstract  void setInvalidSubTaskTypes(Set<String> invalidSubTaskTypes)
           
abstract  void setIssuesFromSearchRequest(List<Issue> issuesFromSearchRequest)
           
abstract  void setIssuesInUse(Collection<?> issuesInUse)
           
abstract  void setMaxIssues(int maxIssues)
          Sets the maximum number of issues allowed to be bulk edited at once.
abstract  void setMessagedFieldLayoutItems(Map<?,?> messagedFieldLayoutItems)
           
abstract  void setMoveFieldLayoutItems(Collection<?> moveFieldLayoutItems)
           
abstract  void setOperationName(String operationName)
           
abstract  void setParams(Map<String,?> params)
           
abstract  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.
abstract  void setRelatedMultiBulkMoveBean(MultiBulkMoveBean relatedMultiBulkMoveBean)
           
abstract  void setRemovedFields(Set<?> removedFields)
           
abstract  void setRetainValues(Set<String> retainValues)
           
abstract  void setSelectedWFTransitionKey(WorkflowTransitionKey workflowTransitionKey)
           
abstract  void setSendBulkNotification(boolean sendBulkNotification)
           
abstract  void setSubTaskBulkEditBean(BulkEditBean subTaskBulkEditBean)
           
abstract  void setSubTaskOfSelectedIssues(List<Issue> subTaskOfSelectedIssues)
           
abstract  void setTargetFieldLayout()
          Sets the targetFieldLayout to the appropriate FieldLayout (aka "Field Configuration"); for the target Project and Issue Type.
abstract  void setTargetIssueObjects(Map<Issue,Issue> targetIssueObjects)
           
abstract  void setTargetIssueTypeId(String id)
           
abstract  void setTargetProject(org.ofbiz.core.entity.GenericValue project)
           
abstract  void setWorkflowTransitionMap(org.apache.commons.collections.MultiMap workflowTransitionMap)
           
static void storeToSession(BulkEditBean bulkEditBean)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SUBTASK_STATUS_INFO

public static final String SUBTASK_STATUS_INFO
See Also:
Constant Field Values

BULK_MOVE_OP

public static final String BULK_MOVE_OP
See Also:
Constant Field Values

BULK_DELETE_OP

public static final String BULK_DELETE_OP
See Also:
Constant Field Values

BULK_EDIT_OP

public static final String BULK_EDIT_OP
See Also:
Constant Field Values

BULK_DELETE

public static final String BULK_DELETE
See Also:
Constant Field Values

BULKEDIT_PREFIX

public static final String BULKEDIT_PREFIX
See Also:
Constant Field Values
Constructor Detail

BulkEditBean

public BulkEditBean()
Method Detail

getParentBulkEditBean

public abstract BulkEditBean getParentBulkEditBean()

initSelectedIssues

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

Parameters:
selectedIssues - Required selected Issues.

addIssues

public abstract void addIssues(Collection<Issue> issues)

getSelectedIssues

public abstract 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

public abstract List<Issue> getSelectedIssuesIncludingSubTasks()

isChecked

public abstract boolean isChecked(Issue issue)

isMultipleProjects

public abstract boolean isMultipleProjects()

isMutipleIssueTypes

public abstract boolean isMutipleIssueTypes()

getProject

public abstract org.ofbiz.core.entity.GenericValue getProject()

getIssueType

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

getFieldLayouts

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

Returns:
Collection of the FieldLayouts.

getKey

public abstract 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

public abstract 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

public abstract Collection<org.ofbiz.core.entity.GenericValue> getProjects()

getIssueTypes

public abstract Collection<String> getIssueTypes()

getIssueTypeObjects

public abstract Collection<IssueType> getIssueTypeObjects()

getCheckboxName

public abstract String getCheckboxName(Issue issue)

getCustomField

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

getCustomFieldView

public abstract String getCustomFieldView(CustomField customField)
                                   throws FieldValidationException
Throws:
FieldValidationException

setParams

public abstract void setParams(Map<String,?> params)

getParams

public abstract Map<String,?> getParams()

setIssuesInUse

public abstract void setIssuesInUse(Collection<?> issuesInUse)

addAvailablePreviousStep

public abstract void addAvailablePreviousStep(int stepId)

clearAvailablePreviousSteps

public abstract void clearAvailablePreviousSteps()

isAvailablePreviousStep

public abstract boolean isAvailablePreviousStep(int stepId)

isHasMailServer

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

Returns:
boolean true if a mail server has been specified

getMoveFieldLayoutItems

public abstract Collection<?> getMoveFieldLayoutItems()

setMoveFieldLayoutItems

public abstract void setMoveFieldLayoutItems(Collection<?> moveFieldLayoutItems)

getTargetPid

public abstract Long getTargetPid()

setTargetProject

public abstract void setTargetProject(org.ofbiz.core.entity.GenericValue project)

getTargetProject

public abstract Project getTargetProject()

getTargetProjectGV

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

setTargetIssueTypeId

public abstract void setTargetIssueTypeId(String id)

getTargetIssueTypeId

public abstract String getTargetIssueTypeId()

getTargetIssueTypeGV

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

getTargetIssueTypeObject

public abstract IssueType getTargetIssueTypeObject()

populateStatusHolder

public abstract void populateStatusHolder()
                                   throws WorkflowException
Throws:
WorkflowException

getInvalidStatuses

public abstract 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

public abstract 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

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

getInvalidSubTaskStatusesByType

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

setTargetFieldLayout

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


getTargetFieldLayout

public abstract FieldLayout getTargetFieldLayout()

getTargetFieldLayoutForType

public abstract FieldLayout getTargetFieldLayoutForType(String targetTypeId)

getTargetWorkflow

public abstract JiraWorkflow getTargetWorkflow()
                                        throws WorkflowException
Throws:
WorkflowException

getFirstTargetIssueObject

public abstract 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

public abstract Map<Issue,Issue> getTargetIssueObjects()

setTargetIssueObjects

public abstract void setTargetIssueObjects(Map<Issue,Issue> targetIssueObjects)

getTargetIssueGVs

public abstract 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

getTargetStatus

public abstract org.ofbiz.core.entity.GenericValue getTargetStatus(Issue issue)

getStatusMapHolder

public abstract Map<String,String> getStatusMapHolder()

getRemovedFields

public abstract Collection<?> getRemovedFields()

setRemovedFields

public abstract void setRemovedFields(Set<?> removedFields)

resetMoveData

public abstract void resetMoveData()

populateSubTaskStatusHolder

public abstract void populateSubTaskStatusHolder()
                                          throws WorkflowException
Throws:
WorkflowException

getTargetWorkflowByType

public abstract JiraWorkflow getTargetWorkflowByType(String issueTypeId)
                                              throws WorkflowException
Throws:
WorkflowException

getSubTaskStatusHolder

public abstract Collection<String> getSubTaskStatusHolder()

isRetainChecked

public abstract boolean isRetainChecked(String fieldId)

isSubTaskCollection

public abstract boolean isSubTaskCollection()

isSubTaskOnly

public abstract boolean isSubTaskOnly()

getOperationName

public abstract String getOperationName()

setOperationName

public abstract void setOperationName(String operationName)

setInvalidSubTaskStatusesByType

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

setInvalidSubTaskTypes

public abstract void setInvalidSubTaskTypes(Set<String> invalidSubTaskTypes)

getInvalidSubTaskCount

public abstract int getInvalidSubTaskCount()

getRetainValues

public abstract Set<String> getRetainValues()

setRetainValues

public abstract void setRetainValues(Set<String> retainValues)

addRetainValue

public abstract void addRetainValue(String fieldId)

getSubTaskOfSelectedIssues

public abstract List<Issue> getSubTaskOfSelectedIssues()

setSubTaskOfSelectedIssues

public abstract void setSubTaskOfSelectedIssues(List<Issue> subTaskOfSelectedIssues)

getIssuesFromSearchRequest

public abstract List<Issue> getIssuesFromSearchRequest()

setIssuesFromSearchRequest

public abstract void setIssuesFromSearchRequest(List<Issue> issuesFromSearchRequest)

getCurrentStep

public abstract int getCurrentStep()

setCurrentStep

public abstract void setCurrentStep(int currentStep)

getActions

public abstract Map<String,BulkEditAction> getActions()

setActions

public abstract void setActions(Map<String,BulkEditAction> actions)

getFieldValues

public abstract Map<String,Object> getFieldValues()

getFieldValuesHolder

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

getIssueOperation

public abstract IssueOperation getIssueOperation()
Specified by:
getIssueOperation in interface OperationContext

getIssuesInUse

public abstract Collection<?> getIssuesInUse()

getSubTaskBulkEditBean

public abstract BulkEditBean getSubTaskBulkEditBean()

setSubTaskBulkEditBean

public abstract void setSubTaskBulkEditBean(BulkEditBean subTaskBulkEditBean)

getRelatedMultiBulkMoveBean

public abstract MultiBulkMoveBean getRelatedMultiBulkMoveBean()

setRelatedMultiBulkMoveBean

public abstract void setRelatedMultiBulkMoveBean(MultiBulkMoveBean relatedMultiBulkMoveBean)

isSendBulkNotification

public abstract boolean isSendBulkNotification()

setSendBulkNotification

public abstract void setSendBulkNotification(boolean sendBulkNotification)

getWorkflowTransitionMap

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

setWorkflowTransitionMap

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

getWorkflowsInUse

public abstract Set<String> getWorkflowsInUse()

getTransitionIdsForWorkflow

public abstract List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)

getTransitionName

public abstract String getTransitionName(String workflowName,
                                         String actionDescriptorId)

getTransitionIssueKeys

public abstract List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)

setSelectedWFTransitionKey

public abstract void setSelectedWFTransitionKey(WorkflowTransitionKey workflowTransitionKey)

getSelectedWFTransitionKey

public abstract WorkflowTransitionKey getSelectedWFTransitionKey()

resetWorkflowTransitionSelection

public abstract void resetWorkflowTransitionSelection()

isTransitionChecked

public abstract boolean isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)

getSelectedTransitionName

public abstract String getSelectedTransitionName()

setFieldScreenRenderer

public abstract void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)

getFieldScreenRenderer

public abstract FieldScreenRenderer getFieldScreenRenderer()

getMessagedFieldLayoutItems

public abstract Map<?,?> getMessagedFieldLayoutItems()

setMessagedFieldLayoutItems

public abstract void setMessagedFieldLayoutItems(Map<?,?> messagedFieldLayoutItems)

initMultiBulkBean

public abstract void initMultiBulkBean()

initMultiBulkBeanWithSubTasks

public abstract void initMultiBulkBeanWithSubTasks()

isOnlyContainsSubTasks

public abstract boolean isOnlyContainsSubTasks()

storeToSession

public static void storeToSession(BulkEditBean bulkEditBean)

getFromSession

public static BulkEditBean getFromSession()

removeFromSession

public static void removeFromSession()

setParentBulkEditBean

public abstract 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

public abstract 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

public abstract 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

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


Copyright © 2002-2011 Atlassian. All Rights Reserved.