com.atlassian.greenhopper.service.issue.callback
Class IssueCountExcludingSubTasksStatisticsCallback

java.lang.Object
  extended by com.atlassian.greenhopper.service.issue.callback.AbstractCompoundDataCallback
      extended by com.atlassian.greenhopper.service.issue.callback.AbstractColumnStatisticsCallback
          extended by com.atlassian.greenhopper.service.issue.callback.IssueCountExcludingSubTasksStatisticsCallback
All Implemented Interfaces:
IssueDataCallback, RapidIssueEntryCallbackComponent

public class IssueCountExcludingSubTasksStatisticsCallback
extends AbstractColumnStatisticsCallback

Checks the issue type of each document against the list of parent issue types to ensure that only parent issues are counted towards column statistics.

See Also:
ColumnStatisticsCallbackFactory

Constructor Summary
IssueCountExcludingSubTasksStatisticsCallback(java.util.Map<java.lang.String,Column> columnsByStatusId, java.util.Set<java.lang.String> parentIssueTypeIds)
           
 
Method Summary
 java.util.Set<java.lang.String> getFields()
          Get the lucene fields required by this component
protected  java.lang.Double getStatisticsValue(java.lang.Long issueId, java.lang.String issueKey, IssueFieldValueProvider data)
          Compute the statistics value for this column constraint based on the document data.
 
Methods inherited from class com.atlassian.greenhopper.service.issue.callback.AbstractColumnStatisticsCallback
fieldData, getStatisticsValuesByColumn, processFieldData
 
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

IssueCountExcludingSubTasksStatisticsCallback

public IssueCountExcludingSubTasksStatisticsCallback(java.util.Map<java.lang.String,Column> columnsByStatusId,
                                                     java.util.Set<java.lang.String> parentIssueTypeIds)
Method Detail

getStatisticsValue

@Nonnull
protected java.lang.Double getStatisticsValue(java.lang.Long issueId,
                                                      java.lang.String issueKey,
                                                      IssueFieldValueProvider data)
Description copied from class: AbstractColumnStatisticsCallback
Compute the statistics value for this column constraint based on the document data.

Specified by:
getStatisticsValue in class AbstractColumnStatisticsCallback
Parameters:
issueId - issue ID
issueKey - issue Key
data - all document data
Returns:
the value

getFields

public java.util.Set<java.lang.String> getFields()
Description copied from interface: RapidIssueEntryCallbackComponent
Get the lucene fields required by this component

Specified by:
getFields in interface IssueDataCallback
Specified by:
getFields in interface RapidIssueEntryCallbackComponent
Overrides:
getFields in class AbstractColumnStatisticsCallback


Copyright © 2007-2013 Atlassian. All Rights Reserved.