com.atlassian.greenhopper.web.rapid.issue.statistics
Class StatisticFieldAggregationCallback

java.lang.Object
  extended by com.atlassian.greenhopper.service.issue.callback.AbstractCompoundDataCallback
      extended by com.atlassian.greenhopper.web.rapid.issue.statistics.StatisticFieldAggregationCallback
All Implemented Interfaces:
IssueDataCallback

public class StatisticFieldAggregationCallback
extends AbstractCompoundDataCallback

Callback which will retrieve the value of the StatisticsFieldConfig on each Issue that is collected and accumulate the values for each parent issue including its subtasks


Constructor Summary
StatisticFieldAggregationCallback(DocumentStatisticValueResolver statisticValueResolver)
           
 
Method Summary
 void fieldData(java.lang.Long issueId, java.lang.String issueKey, IssueFieldValueProvider data)
          This callback is being called for every issue that matches the query.
 java.util.Set<java.lang.String> getFields()
          see DocumentConstants for possible values.
 java.util.Map<java.lang.Long,java.lang.Double> getValuePerIssue()
          Get the value per parent issue.
 
Methods inherited from class com.atlassian.greenhopper.service.issue.callback.AbstractCompoundDataCallback
fieldData, issueComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticFieldAggregationCallback

public StatisticFieldAggregationCallback(DocumentStatisticValueResolver statisticValueResolver)
Method Detail

getFields

public java.util.Set<java.lang.String> getFields()
Description copied from interface: IssueDataCallback
see DocumentConstants for possible values. These are the issue fields that we want to read from the Lucene index.


fieldData

public void fieldData(java.lang.Long issueId,
                      java.lang.String issueKey,
                      IssueFieldValueProvider data)
Description copied from class: AbstractCompoundDataCallback
This callback is being called for every issue that matches the query. For memory efficiency, try to avoid buffering all results in memory but rather stream them to the target object, like a REST template.

This is only called once per issue.

Specified by:
fieldData in class AbstractCompoundDataCallback
data - : The data from the document that matches our selected fields.

getValuePerIssue

public java.util.Map<java.lang.Long,java.lang.Double> getValuePerIssue()
Get the value per parent issue. Will not contain issues for which there is no statistic value



Copyright © 2007-2014 Atlassian. All Rights Reserved.