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  org.slf4j.Logger logger
           
 
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, com.atlassian.jira.user.util.UserManager userManager, GHAvatarService avatarService, WebUtilities webUtilities, EstimateStatisticService estimateStatisticService, EstimateStatisticHelper estimateStatisticHelper, DocumentStatisticValueResolver estimateDocumentStatisticValueResolver)
           
 
Method Summary
 void addCallbackComponent(RapidIssueEntryCallbackComponent component)
           
 void fieldData(java.lang.Long issueId, java.lang.String issueKey, java.util.Map<java.lang.String,java.lang.String> 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

logger

protected org.slf4j.Logger logger
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,
                               com.atlassian.jira.user.util.UserManager userManager,
                               GHAvatarService avatarService,
                               WebUtilities webUtilities,
                               EstimateStatisticService estimateStatisticService,
                               EstimateStatisticHelper estimateStatisticHelper,
                               DocumentStatisticValueResolver estimateDocumentStatisticValueResolver)
Method Detail

addCallbackComponent

public void addCallbackComponent(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,
                      java.util.Map<java.lang.String,java.lang.String> 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-2012 Atlassian. All Rights Reserved.