@PublicApi public interface

BulkEditBean

implements OperationContext
com.atlassian.jira.web.bean.BulkEditBean
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

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

Summary

Constants
String BULKEDIT_PREFIX
String BULK_DELETE
String BULK_DELETE_OP
String BULK_EDIT_OP
String BULK_MOVE_OP
String SUBTASK_STATUS_INFO
Public Methods
void addAvailablePreviousStep(int stepId)
void addIssues(Collection<Issue> issues)
void addRetainValue(String fieldId)
void clearAvailablePreviousSteps()
Map<StringBulkEditAction> 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<StringMap<LongLong>> getFieldSubstitutionMap()
Map<StringObject> getFieldValues()
Map<StringObject> 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<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()
GenericValue getIssueType()
Collection<IssueType> getIssueTypeObjects()
Collection<String> getIssueTypes()
List<Issue> getIssuesFromSearchRequest()
Collection<?> getIssuesInUse()
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()
GenericValue getProject()
This method is 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<GenericValue> getProjects()
This method is deprecated. Use getProjectObjects() instead. Since v5.2.
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<StringString> getStatusMapHolder()
BulkEditBean getSubTaskBulkEditBean()
List<Issue> getSubTaskOfSelectedIssues()
Collection<String> getSubTaskStatusHolder()
FieldLayout getTargetFieldLayout()
FieldLayout getTargetFieldLayoutForType(String targetTypeId)
List<GenericValue> getTargetIssueGVs()
This is a convinience method for converting the list of objects to a list of GenericValues
Map<IssueIssue> getTargetIssueObjects()
GenericValue getTargetIssueTypeGV()
String getTargetIssueTypeId()
IssueType getTargetIssueTypeObject()
Long getTargetPid()
Project getTargetProject()
GenericValue getTargetProjectGV()
@Deprecated GenericValue getTargetStatus(Issue issue)
This method is deprecated. Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v5.0.
Status getTargetStatusObject(Issue issue)
JiraWorkflow getTargetWorkflow()
JiraWorkflow getTargetWorkflowByType(String issueTypeId)
List<WorkflowTransitionKey> getTransitionIdsForWorkflow(String workflowName)
List<String> getTransitionIssueKeys(WorkflowTransitionKey workflowTransitionKey)
String getTransitionName(String workflowName, String actionDescriptorId)
MultiMap getWorkflowTransitionMap()
Set<String> getWorkflowsInUse()
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 isTransitionChecked(WorkflowTransitionKey workflowTransitionKey)
void populateStatusHolder()
void populateSubTaskStatusHolder()
void resetMoveData()
void resetWorkflowTransitionSelection()
void setActions(Map<StringBulkEditAction> actions)
void setCurrentStep(int currentStep)
void setFieldScreenRenderer(FieldScreenRenderer fieldScreenRenderer)
void setInvalidSubTaskStatusesByType(Map<StringSet<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 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<IssueIssue> targetIssueObjects)
void setTargetIssueTypeId(String id)
void setTargetProject(Project project)
void setTargetProject(GenericValue project)
This method is deprecated. Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.
void setWorkflowTransitionMap(MultiMap workflowTransitionMap)
[Expand]
Inherited Methods
From interface com.atlassian.jira.issue.customfields.OperationContext

Constants

public static final String BULKEDIT_PREFIX

Constant Value: "bulkedit_"

public static final String BULK_DELETE

Constant Value: "delete"

public static final String BULK_DELETE_OP

Constant Value: "bulk_delete_op"

public static final String BULK_EDIT_OP

Constant Value: "bulk_edit_op"

public static final String BULK_MOVE_OP

Constant Value: "bulk_move_op"

public static final String SUBTASK_STATUS_INFO

Constant Value: "subtaskstatusinfo_"

Public Methods

public void addAvailablePreviousStep (int stepId)

public void addIssues (Collection<Issue> issues)

public void addRetainValue (String fieldId)

public void clearAvailablePreviousSteps ()

public Map<StringBulkEditAction> getActions ()

public String getCheckboxName (Issue issue)

public int getCurrentStep ()

public CustomField getCustomField (String customFieldKey)

Throws
GenericEntityException

public String getCustomFieldView (CustomField customField)

public Collection<FieldLayout> getFieldLayouts ()

Returns all the unique field layouts of the selected issues

Returns
  • Collection of the FieldLayouts.

public FieldScreenRenderer getFieldScreenRenderer ()

public Map<StringMap<LongLong>> getFieldSubstitutionMap ()

public Map<StringObject> getFieldValues ()

public Map<StringObject> getFieldValuesHolder ()

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

public Set<Issue> getInvalidIssues ()

Gets issues whose status is null

Returns
  • Set of Issue objects. Emoty Set if no invalid issues

public Collection<GenericValue> getInvalidStatuses ()

Gets a set of invalid statuses that are not valid in the destination workflow

Returns
  • Set of GenericValue objects

public int getInvalidSubTaskCount ()

public Set<String> getInvalidSubTaskStatusesByType (String subTaskTypeId)

public Set<String> getInvalidSubTaskTypes ()

public IssueOperation getIssueOperation ()

public GenericValue getIssueType ()

public Collection<IssueType> getIssueTypeObjects ()

public Collection<String> getIssueTypes ()

public List<Issue> getIssuesFromSearchRequest ()

public Collection<?> getIssuesInUse ()

public 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

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

public Map<?, ?> getMessagedFieldLayoutItems ()

public Collection<?> getMoveFieldLayoutItems ()

public String getOperationName ()

public Map<String, ?> getParams ()

public BulkEditBean getParentBulkEditBean ()

public GenericValue getProject ()

This method is deprecated.
Use getSingleProject() instead. Since v5.2.

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

public Collection<Project> getProjectObjects ()

public Collection<GenericValue> getProjects ()

This method is deprecated.
Use getProjectObjects() instead. Since v5.2.

public MultiBulkMoveBean getRelatedMultiBulkMoveBean ()

public Collection<?> getRemovedFields ()

public Set<String> getRetainValues ()

public 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

public List<Issue> getSelectedIssuesIncludingSubTasks ()

public String getSelectedTransitionName ()

public WorkflowTransitionKey getSelectedWFTransitionKey ()

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

public Map<StringString> getStatusMapHolder ()

public BulkEditBean getSubTaskBulkEditBean ()

public List<Issue> getSubTaskOfSelectedIssues ()

public Collection<String> getSubTaskStatusHolder ()

public FieldLayout getTargetFieldLayout ()

public FieldLayout getTargetFieldLayoutForType (String targetTypeId)

public List<GenericValue> getTargetIssueGVs ()

This is a convinience method for converting the list of objects to a list of GenericValues

Returns
  • list of GenericValue issue objects

public Map<IssueIssue> getTargetIssueObjects ()

public GenericValue getTargetIssueTypeGV ()

public String getTargetIssueTypeId ()

public IssueType getTargetIssueTypeObject ()

public Long getTargetPid ()

public Project getTargetProject ()

public GenericValue getTargetProjectGV ()

@Deprecated public GenericValue getTargetStatus (Issue issue)

This method is deprecated.
Use getTargetStatusObject(com.atlassian.jira.issue.Issue) instead. Since v5.0.

public Status getTargetStatusObject (Issue issue)

public JiraWorkflow getTargetWorkflow ()

public JiraWorkflow getTargetWorkflowByType (String issueTypeId)

public List<WorkflowTransitionKey> getTransitionIdsForWorkflow (String workflowName)

public List<String> getTransitionIssueKeys (WorkflowTransitionKey workflowTransitionKey)

public String getTransitionName (String workflowName, String actionDescriptorId)

public MultiMap getWorkflowTransitionMap ()

public Set<String> getWorkflowsInUse ()

public void initMultiBulkBean ()

public void initMultiBulkBeanWithSubTasks ()

public void initSelectedIssues (Collection<Issue> selectedIssues)

Initialises the BulkEditBean with the selected issues

Parameters
selectedIssues Required selected Issues.

public boolean isAvailablePreviousStep (int stepId)

public boolean isChecked (Issue issue)

public boolean isHasMailServer ()

Check if a mail server has been specified.

Returns
  • boolean true if a mail server has been specified

public boolean isMultipleProjects ()

public boolean isMutipleIssueTypes ()

public boolean isOnlyContainsSubTasks ()

public boolean isRetainChecked (String fieldId)

public boolean isSendBulkNotification ()

public boolean isSubTaskCollection ()

public boolean isSubTaskOnly ()

public boolean isTransitionChecked (WorkflowTransitionKey workflowTransitionKey)

public void populateStatusHolder ()

public void populateSubTaskStatusHolder ()

public void resetMoveData ()

public void resetWorkflowTransitionSelection ()

public void setActions (Map<StringBulkEditAction> actions)

public void setCurrentStep (int currentStep)

public void setFieldScreenRenderer (FieldScreenRenderer fieldScreenRenderer)

public void setInvalidSubTaskStatusesByType (Map<StringSet<String>> invalidSubTaskStatusesByType)

public void setInvalidSubTaskTypes (Set<String> invalidSubTaskTypes)

public void setIssuesFromSearchRequest (List<Issue> issuesFromSearchRequest)

public void setIssuesInUse (Collection<?> issuesInUse)

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

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

public void setMoveFieldLayoutItems (Collection<?> moveFieldLayoutItems)

public void setOperationName (String operationName)

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

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

public void setRelatedMultiBulkMoveBean (MultiBulkMoveBean relatedMultiBulkMoveBean)

public void setRemovedFields (Set<?> removedFields)

public void setRetainValues (Set<String> retainValues)

public void setSelectedWFTransitionKey (WorkflowTransitionKey workflowTransitionKey)

public void setSendBulkNotification (boolean sendBulkNotification)

public void setSubTaskBulkEditBean (BulkEditBean subTaskBulkEditBean)

public void setSubTaskOfSelectedIssues (List<Issue> subTaskOfSelectedIssues)

public void setTargetFieldLayout ()

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

public void setTargetIssueObjects (Map<IssueIssue> targetIssueObjects)

public void setTargetIssueTypeId (String id)

public void setTargetProject (Project project)

public void setTargetProject (GenericValue project)

This method is deprecated.
Use setTargetProject(com.atlassian.jira.project.Project) instead. Since v5.2.

public void setWorkflowTransitionMap (MultiMap workflowTransitionMap)