com.atlassian.jira.web.bean
Class DefaultBulkMoveHelper

java.lang.Object
  extended by com.atlassian.jira.web.bean.DefaultBulkMoveHelper
All Implemented Interfaces:
BulkMoveHelper

public class DefaultBulkMoveHelper
extends Object
implements BulkMoveHelper

Default implementation of the BulkMoveHelper interface.

Since:
v4.1

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.web.bean.BulkMoveHelper
BulkMoveHelper.DistinctValueResult
 
Constructor Summary
DefaultBulkMoveHelper()
           
 
Method Summary
protected  BulkEditBean getBulkEditBeanFromSession()
           
 Map<Long,BulkMoveHelper.DistinctValueResult> getDistinctValuesForMove(BulkEditBean bulkEditBean, OrderableField orderableField, Function<Issue,Collection<Object>> issueValueResolution, Function<Object,String> nameResolution)
          For the given field, calculates all the distinct values present in the currently selected issues of the BulkEditBean.
 boolean needsSelection(BulkMoveHelper.DistinctValueResult distinctValue, Long id, String valueName)
          Method called by Velocity templates to check if the current DistinctValueResult matches the value specified and thus should be selected.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBulkMoveHelper

public DefaultBulkMoveHelper()
Method Detail

getBulkEditBeanFromSession

protected BulkEditBean getBulkEditBeanFromSession()

getDistinctValuesForMove

public Map<Long,BulkMoveHelper.DistinctValueResult> getDistinctValuesForMove(BulkEditBean bulkEditBean,
                                                                             OrderableField orderableField,
                                                                             Function<Issue,Collection<Object>> issueValueResolution,
                                                                             Function<Object,String> nameResolution)
Description copied from interface: BulkMoveHelper
For the given field, calculates all the distinct values present in the currently selected issues of the BulkEditBean. These values are represented by a mapping from key (Long representing the id) to BulkMoveHelper.DistinctValueResult which provides the name of the value as well as the name of the project the value belongs to. This information is used in the rendering of the mapping controls to the user.

Specified by:
getDistinctValuesForMove in interface BulkMoveHelper
Parameters:
bulkEditBean - the bulk edit bean
orderableField - the field to retrieve distinct values from
issueValueResolution - must return a non-null Collection of values based on a given issue. It is implied that the values are for the field specified by orderableField.
nameResolution - a function to resolve values to names to be displayed. May return null to indicate that it should not be displayed.
Returns:
a mapping from values (ids in the form of Longs) to [name, project name] pairs.

needsSelection

public boolean needsSelection(BulkMoveHelper.DistinctValueResult distinctValue,
                              Long id,
                              String valueName)
Description copied from interface: BulkMoveHelper
Method called by Velocity templates to check if the current DistinctValueResult matches the value specified and thus should be selected.

Specified by:
needsSelection in interface BulkMoveHelper
Parameters:
distinctValue - the distinct value
id - Option Id
valueName - Option Name
Returns:
true if the specified option should be selected


Copyright © 2002-2012 Atlassian. All Rights Reserved.