com.atlassian.greenhopper.web.rapid.work
Class PoolServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.web.rapid.work.PoolServiceImpl
All Implemented Interfaces:
PoolService

@Service
public class PoolServiceImpl
extends AbstractLoggable
implements PoolService

Provides calculation of swimlane contents functionality


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.greenhopper.web.rapid.work.PoolService
PoolService.BoardStatisticsData, PoolService.ColumnConstraintsData, PoolService.SwimlaneIssuesData
 
Field Summary
protected  org.slf4j.Logger performanceLogger
           
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
PoolServiceImpl()
           
 
Method Summary
 ServiceOutcome<IssueSubtasksResolved> areIssueSubtasksInFinalColumn(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.lang.Long issueId)
          Returns whether all subtasks for a given issue have been resolved AND the parent hasn't been resolved yet.
 ServiceOutcome<PoolService.ColumnConstraintsData> getColumnConstraintsData(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Calculate the constraints data per column of the specified RapidView, for transport to the pool.
 ServiceOutcome<java.util.List<PoolService.SwimlaneIssuesData>> getCustomSwimlanes(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, WorkFilters workFilters, java.util.Set<java.lang.Long> validIssues)
          In order to allocate the issues to the swimlanes, we're running HitCollectors queries first for the swimlanes to find out which issues they'd handle, and then we fetch the full issue list once and sieve it through the ordered swimlanes, top to bottom.
 ServiceOutcome<ParentSwimlanesData> getParentSwimlanesData(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.List<RapidIssueEntry> issues, java.util.Set<RapidIssueEntry> missingParents)
          Gathers the ParentSwimlanesData for a given rapid view.
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

performanceLogger

protected org.slf4j.Logger performanceLogger
Constructor Detail

PoolServiceImpl

public PoolServiceImpl()
Method Detail

getCustomSwimlanes

@NotNull
public ServiceOutcome<java.util.List<PoolService.SwimlaneIssuesData>> getCustomSwimlanes(com.atlassian.crowd.embedded.api.User user,
                                                                                                 RapidView rapidView,
                                                                                                 WorkFilters workFilters,
                                                                                                 java.util.Set<java.lang.Long> validIssues)
In order to allocate the issues to the swimlanes, we're running HitCollectors queries first for the swimlanes to find out which issues they'd handle, and then we fetch the full issue list once and sieve it through the ordered swimlanes, top to bottom. We can't use separate JQL queries fetching issues for swimlanes directly, since queries can't be cleanly negated. We also can't use HitCollectors directly to fetch the issues we're interested in, since they aren't called in the query order. Rather than storing full Issue objects in the SwimlaneContents instances, we simply store issue ids.

Specified by:
getCustomSwimlanes in interface PoolService

getColumnConstraintsData

@NotNull
public ServiceOutcome<PoolService.ColumnConstraintsData> getColumnConstraintsData(com.atlassian.crowd.embedded.api.User user,
                                                                                          RapidView rapidView)
Description copied from interface: PoolService
Calculate the constraints data per column of the specified RapidView, for transport to the pool. Uses the Rapid View's StatisticsFieldConfig to calculate this.

Note that the totals for each column are specified as Double, since this is how NumberCFType fields store their values in the index.

Specified by:
getColumnConstraintsData in interface PoolService
Parameters:
user - the user doing the request
rapidView - the rapid view
Returns:
a mapping of column to statistic total

areIssueSubtasksInFinalColumn

public ServiceOutcome<IssueSubtasksResolved> areIssueSubtasksInFinalColumn(com.atlassian.crowd.embedded.api.User user,
                                                                           RapidView rapidView,
                                                                           java.lang.Long issueId)
Description copied from interface: PoolService
Returns whether all subtasks for a given issue have been resolved AND the parent hasn't been resolved yet.

Specified by:
areIssueSubtasksInFinalColumn in interface PoolService

getParentSwimlanesData

@NotNull
public ServiceOutcome<ParentSwimlanesData> getParentSwimlanesData(com.atlassian.crowd.embedded.api.User user,
                                                                          RapidView rapidView,
                                                                          java.util.List<RapidIssueEntry> issues,
                                                                          java.util.Set<RapidIssueEntry> missingParents)
Description copied from interface: PoolService
Gathers the ParentSwimlanesData for a given rapid view. The result contains all parent issue ids as well as issues that are mis-aligned to their subtasks (in terms of their status)

Specified by:
getParentSwimlanesData in interface PoolService


Copyright © 2007-2012 Atlassian. All Rights Reserved.