com.atlassian.greenhopper.web.rapid.list
Class RapidIssueEntryCallback

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

public class RapidIssueEntryCallback
extends AbstractCompoundDataCallback

Specialised data collector for pool issue data. This replaces DocumentIssue, since that's just too slow on a large number of issues. Plus, we save creating a large number of what's basically a facade for various managers to fetch data.

This is a field-limited collector that streams data directly into REST templates. In addition, we can be a little smarter about caching data here, like assignees, since the probability is quite high that there's only a limited number of users being assignees on a work tab.

TODO the parent-issue things are still pretty bad. The Lucene record for a subtask only contains the parent issue ID, but we want to have the parent issue KEY as well, so we actually have to go off to the DB and fetch that. Ugly. Since subtasks are going to be re-thought anyway, I'll leave this as is for now, with just a slight optimisation of not fetching the same parent twice.

Author:
ahennecke

Field Summary
protected  LoggerWrapper log
           
 
Constructor Summary
RapidIssueEntryCallback(com.atlassian.crowd.embedded.api.User user, com.google.common.base.Predicate<java.lang.Long> visiblePredicate, com.atlassian.jira.bc.issue.IssueService issueService, com.atlassian.jira.config.ConstantsManager constantsManager, WebUtilities webUtilities, StatisticFieldHelper statisticFieldHelper, EstimateStatisticService estimateStatisticService, DocumentStatisticValueResolver estimateDocumentStatisticValueResolver, TrackingStatisticService trackingStatisticService, DocumentStatisticValueResolver trackingDocumentStatisticValueResolver, StatusEntryFactory statusEntryFactory)
           
 
Method Summary
 void addCallbackComponent(RapidIssueEntryCallbackComponent component)
           
 void fieldData(java.lang.Long issueId, java.lang.String issueKey, IssueFieldValueProvider data)
          This gets called once for each issue we found, with the data we asked for.
 java.util.Set<java.lang.String> getFields()
          see DocumentConstants for possible values.
 java.util.List<RapidIssueEntry> getIssues()
           
 java.util.List<ProjectEntry> getProjects()
           
 long getTotalDuration()
           
 
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
 

Field Detail

log

protected final LoggerWrapper log
Constructor Detail

RapidIssueEntryCallback

public RapidIssueEntryCallback(com.atlassian.crowd.embedded.api.User user,
                               com.google.common.base.Predicate<java.lang.Long> visiblePredicate,
                               com.atlassian.jira.bc.issue.IssueService issueService,
                               com.atlassian.jira.config.ConstantsManager constantsManager,
                               WebUtilities webUtilities,
                               StatisticFieldHelper statisticFieldHelper,
                               EstimateStatisticService estimateStatisticService,
                               DocumentStatisticValueResolver estimateDocumentStatisticValueResolver,
                               TrackingStatisticService trackingStatisticService,
                               DocumentStatisticValueResolver trackingDocumentStatisticValueResolver,
                               StatusEntryFactory statusEntryFactory)
Method Detail

addCallbackComponent

public void addCallbackComponent(@Nullable
                                 RapidIssueEntryCallbackComponent component)

getIssues

public java.util.List<RapidIssueEntry> getIssues()

getProjects

public java.util.List<ProjectEntry> getProjects()

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.


getTotalDuration

public long getTotalDuration()

fieldData

public void fieldData(java.lang.Long issueId,
                      java.lang.String issueKey,
                      IssueFieldValueProvider data)
This gets called once for each issue we found, with the data we asked for.

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


Copyright © 2007-2014 Atlassian. All Rights Reserved.