com.atlassian.greenhopper.service.rapid
Class RapidViewQueryServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.rapid.RapidViewQueryServiceImpl
All Implemented Interfaces:
RapidViewQueryService

@Service
public class RapidViewQueryServiceImpl
extends java.lang.Object
implements RapidViewQueryService

Implementation of RapidViewQueryService


Field Summary
protected  LoggerWrapper log
           
 
Constructor Summary
RapidViewQueryServiceImpl()
           
 
Method Summary
 ServiceOutcome<com.atlassian.query.Query> getActiveSprintsForPlanModeQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Query used to find issues and active sprints for display in Plan mode.
 ServiceOutcome<com.atlassian.query.Query> getBacklogQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Query used to find issues on the Plan mode without the subtasks This query consists of the saved filter, the mapped statuses, the plan mode query.
 ServiceOutcome<com.atlassian.query.Query> getBacklogQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, boolean withSubtasks)
          Query used to find issues on the Plan mode.
 ServiceOutcome<com.atlassian.query.Query> getMappedRapidViewQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Get the base rapid view query plus the statuses which are mapped.
 ServiceOutcome<com.atlassian.query.Query> getOpenSprintQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.lang.Long sprintId)
          Query used to find an open sprint for a given rapid board.
 ServiceOutcome<com.atlassian.fugue.Pair<java.util.List<Sprint>,java.util.Set<java.lang.Long>>> getOpenSprintsAndBacklogProjects(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Get the list of open sprints for a given rapid view
 ServiceOutcome<com.atlassian.query.Query> getOpenSprintsQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Query used to find open sprints for a given rapid board.
 ServiceOutcome<com.atlassian.query.Query> getPlanModeIssuesQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Finds all issues for the plan mode.
 ServiceOutcome<ClauseToAdd> getQuickFilterClause(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.Set<java.lang.Long> activeQuickFilterIds)
          Get the Quick Filter clause from a set of active quick filter ids
 ServiceOutcome<com.atlassian.query.Query> getRapidViewQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Get the base rapid view query.
 ServiceOutcome<com.atlassian.query.Query> getScrumBoardQueryForVisibleIssues(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Attempts to build the query which will help determine if issues are viewable in the interface of a scrum board.
 ServiceOutcome<ClauseToAdd> getSprintFilterClause(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, java.util.Set<java.lang.Long> activeSprintIds)
          Get the Sprints clause from a set of active sprint ids
 ServiceOutcome<com.atlassian.query.clause.Clause> getStatusMappingClause(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Get the status mapping clause for a given RapidView
 ServiceOutcome<com.atlassian.query.Query> getWorkModeQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Get the query for the work mode.
 ServiceOutcome<com.atlassian.query.Query> getWorkModeQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView, Column column)
          Get the query for the work mode and a given column.
 
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

RapidViewQueryServiceImpl

public RapidViewQueryServiceImpl()
Method Detail

getRapidViewQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getRapidViewQuery(com.atlassian.crowd.embedded.api.User user,
                                                                           RapidView rapidView)
Description copied from interface: RapidViewQueryService
Get the base rapid view query. This currently only includes the saved filter

Specified by:
getRapidViewQuery in interface RapidViewQueryService

getStatusMappingClause

@Nonnull
public ServiceOutcome<com.atlassian.query.clause.Clause> getStatusMappingClause(com.atlassian.crowd.embedded.api.User user,
                                                                                        RapidView rapidView)
Description copied from interface: RapidViewQueryService
Get the status mapping clause for a given RapidView

Specified by:
getStatusMappingClause in interface RapidViewQueryService

getMappedRapidViewQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getMappedRapidViewQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                 RapidView rapidView)
Description copied from interface: RapidViewQueryService
Get the base rapid view query plus the statuses which are mapped.

Specified by:
getMappedRapidViewQuery in interface RapidViewQueryService

getWorkModeQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getWorkModeQuery(com.atlassian.crowd.embedded.api.User user,
                                                                          RapidView rapidView)
Description copied from interface: RapidViewQueryService
Get the query for the work mode. This query will contain the savedFilter, the work mode subquery and the set of mapped statuses

Specified by:
getWorkModeQuery in interface RapidViewQueryService

getWorkModeQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getWorkModeQuery(com.atlassian.crowd.embedded.api.User user,
                                                                          RapidView rapidView,
                                                                          Column column)
Description copied from interface: RapidViewQueryService
Get the query for the work mode and a given column. This query will contain the savedFilter, the work mode subquery and the set of mapped statuses of the given column

Specified by:
getWorkModeQuery in interface RapidViewQueryService

getBacklogQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getBacklogQuery(com.atlassian.crowd.embedded.api.User user,
                                                                         RapidView rapidView)
Description copied from interface: RapidViewQueryService
Query used to find issues on the Plan mode without the subtasks This query consists of the saved filter, the mapped statuses, the plan mode query. The epics are filtered out.

Specified by:
getBacklogQuery in interface RapidViewQueryService

getBacklogQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getBacklogQuery(com.atlassian.crowd.embedded.api.User user,
                                                                         RapidView rapidView,
                                                                         boolean withSubtasks)
Description copied from interface: RapidViewQueryService
Query used to find issues on the Plan mode. This query consists of the saved filter, the mapped statuses, the plan mode query. The epics are filtered out.

Specified by:
getBacklogQuery in interface RapidViewQueryService

getActiveSprintsForPlanModeQuery

public ServiceOutcome<com.atlassian.query.Query> getActiveSprintsForPlanModeQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                  RapidView rapidView)
Description copied from interface: RapidViewQueryService
Query used to find issues and active sprints for display in Plan mode. This query consists of the saved filter, the mapped statuses, the plan mode active sprints query

Specified by:
getActiveSprintsForPlanModeQuery in interface RapidViewQueryService

getPlanModeIssuesQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getPlanModeIssuesQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                RapidView rapidView)
Description copied from interface: RapidViewQueryService
Finds all issues for the plan mode. All issues in active sprints and not done issues otherwise. Excludes epics. This query consists of the saved filter, the mapped statuses all issues not done or in an active sprint

Specified by:
getPlanModeIssuesQuery in interface RapidViewQueryService

getOpenSprintsQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getOpenSprintsQuery(com.atlassian.crowd.embedded.api.User user,
                                                                             RapidView rapidView)
Description copied from interface: RapidViewQueryService
Query used to find open sprints for a given rapid board. The query consists of the saved filter, the mapped statuses and the open sprints clause

Specified by:
getOpenSprintsQuery in interface RapidViewQueryService

getOpenSprintQuery

@Nonnull
public ServiceOutcome<com.atlassian.query.Query> getOpenSprintQuery(com.atlassian.crowd.embedded.api.User user,
                                                                            RapidView rapidView,
                                                                            java.lang.Long sprintId)
Description copied from interface: RapidViewQueryService
Query used to find an open sprint for a given rapid board. The query consists of the saved filter, the mapped statuses and a clause to check if the given sprintId is an open sprint

Specified by:
getOpenSprintQuery in interface RapidViewQueryService

getOpenSprintsAndBacklogProjects

@Nonnull
public ServiceOutcome<com.atlassian.fugue.Pair<java.util.List<Sprint>,java.util.Set<java.lang.Long>>> getOpenSprintsAndBacklogProjects(com.atlassian.crowd.embedded.api.User user,
                                                                                                                                               RapidView rapidView)
Description copied from interface: RapidViewQueryService
Get the list of open sprints for a given rapid view

Specified by:
getOpenSprintsAndBacklogProjects in interface RapidViewQueryService

getQuickFilterClause

@Nonnull
public ServiceOutcome<ClauseToAdd> getQuickFilterClause(com.atlassian.crowd.embedded.api.User user,
                                                                RapidView rapidView,
                                                                java.util.Set<java.lang.Long> activeQuickFilterIds)
Description copied from interface: RapidViewQueryService
Get the Quick Filter clause from a set of active quick filter ids

Specified by:
getQuickFilterClause in interface RapidViewQueryService

getSprintFilterClause

@Nonnull
public ServiceOutcome<ClauseToAdd> getSprintFilterClause(com.atlassian.crowd.embedded.api.User user,
                                                                 RapidView rapidView,
                                                                 java.util.Set<java.lang.Long> activeSprintIds)
Description copied from interface: RapidViewQueryService
Get the Sprints clause from a set of active sprint ids

Specified by:
getSprintFilterClause in interface RapidViewQueryService

getScrumBoardQueryForVisibleIssues

public ServiceOutcome<com.atlassian.query.Query> getScrumBoardQueryForVisibleIssues(com.atlassian.crowd.embedded.api.User user,
                                                                                    RapidView rapidView)
Description copied from interface: RapidViewQueryService
Attempts to build the query which will help determine if issues are viewable in the interface of a scrum board.

Specified by:
getScrumBoardQueryForVisibleIssues in interface RapidViewQueryService
Parameters:
user - the user
rapidView - the rapid view
Returns:
the query


Copyright © 2007-2014 Atlassian. All Rights Reserved.