com.atlassian.greenhopper.service.rapid.view.color
Class CardColorQueryServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.service.rapid.view.color.CardColorQueryServiceImpl
All Implemented Interfaces:
CardColorQueryService

@Service
public class CardColorQueryServiceImpl
extends AbstractLoggable
implements CardColorQueryService

Implementation of CardColorQueryService


Field Summary
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
CardColorQueryServiceImpl()
           
 
Method Summary
 ServiceOutcome<RapidIssueEntryCallbackComponent> createCardColorIssueEntryCallback(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, CardColorStrategy cardColorStrategy)
          Get a RapidIssueEntryCallbackComponent for a given rapidView and cardColorStrategy.
 ServiceOutcome<CardColor> getCardColorForIssue(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, CardColorStrategy cardColorStrategy, com.atlassian.jira.issue.Issue issue)
          Get the card color for a single issue
 ServiceOutcome<java.util.Map<java.lang.Long,CardColor>> getCardColorsForQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, CardColorStrategy cardColorStrategy, com.atlassian.query.Query query, int maxVisitedIssues)
          Collect the card colors for all issues matching a given query.
 ServiceOutcome<java.lang.Void> queryAndAttributeColorSettingsForBoard(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, CardColorStrategy cardColorStrategy)
          Execute a search for the given strategy to ensure all possible values have a color
 boolean supportsIssueDataCallback(CardColorStrategy strategy)
          Can the card color be extracted directly from the issue index.
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn, setInfoLogLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CardColorQueryServiceImpl

public CardColorQueryServiceImpl()
Method Detail

supportsIssueDataCallback

public boolean supportsIssueDataCallback(CardColorStrategy strategy)
Description copied from interface: CardColorQueryService
Can the card color be extracted directly from the issue index. This is true for all types except for jql (which requires executing separate queries for each color)

Specified by:
supportsIssueDataCallback in interface CardColorQueryService

getCardColorForIssue

public ServiceOutcome<CardColor> getCardColorForIssue(com.atlassian.crowd.embedded.api.User user,
                                                      RapidView rapidView,
                                                      CardColorStrategy cardColorStrategy,
                                                      com.atlassian.jira.issue.Issue issue)
Description copied from interface: CardColorQueryService
Get the card color for a single issue

Specified by:
getCardColorForIssue in interface CardColorQueryService

getCardColorsForQuery

public ServiceOutcome<java.util.Map<java.lang.Long,CardColor>> getCardColorsForQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                     RapidView rapidView,
                                                                                     CardColorStrategy cardColorStrategy,
                                                                                     com.atlassian.query.Query query,
                                                                                     int maxVisitedIssues)
Collect the card colors for all issues matching a given query.

Specified by:
getCardColorsForQuery in interface CardColorQueryService
Parameters:
maxVisitedIssues - the maximum number of issues to visit. This is mainly an optimization for a single issue to stop when we found a matching color. Only use when the number of issues matched by the query is known

createCardColorIssueEntryCallback

public ServiceOutcome<RapidIssueEntryCallbackComponent> createCardColorIssueEntryCallback(com.atlassian.crowd.embedded.api.User user,
                                                                                          RapidView rapidView,
                                                                                          CardColorStrategy cardColorStrategy)
Description copied from interface: CardColorQueryService
Get a RapidIssueEntryCallbackComponent for a given rapidView and cardColorStrategy. Not all strategies allow to be fetched as a simple IssueDataCallback, so check supportsIssueDataCallback before calling this method. In case the strategy doesn't support a callback, use the appropriate query method below

Specified by:
createCardColorIssueEntryCallback in interface CardColorQueryService

queryAndAttributeColorSettingsForBoard

public ServiceOutcome<java.lang.Void> queryAndAttributeColorSettingsForBoard(com.atlassian.crowd.embedded.api.User user,
                                                                             RapidView rapidView,
                                                                             CardColorStrategy cardColorStrategy)
Description copied from interface: CardColorQueryService
Execute a search for the given strategy to ensure all possible values have a color

Specified by:
queryAndAttributeColorSettingsForBoard in interface CardColorQueryService


Copyright © 2007-2012 Atlassian. All Rights Reserved.