com.atlassian.greenhopper.service.query
Class QueryServiceImpl

java.lang.Object
  extended by com.atlassian.greenhopper.service.query.QueryServiceImpl
All Implemented Interfaces:
QueryService

@Service
public class QueryServiceImpl
extends java.lang.Object
implements QueryService


Constructor Summary
QueryServiceImpl()
           
 
Method Summary
 ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewFilterQuery(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Find all projects for a given rapid view filter query.
 ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user, RapidView rapidView)
          Find all projects for a given rapid view by looking at the issues matched by the rapid view query.
 java.util.List<com.atlassian.jira.project.Project> getProjectsInProjectClauseOnlyQuery(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query projectBasedQuery)
          Return the projects which are included in this query.
 boolean isProjectClauseOnlyQuery(com.atlassian.query.Query query)
          Determine whether this query is "project based"; i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryServiceImpl

public QueryServiceImpl()
Method Detail

isProjectClauseOnlyQuery

public boolean isProjectClauseOnlyQuery(@Nullable
                                        com.atlassian.query.Query query)
Description copied from interface: QueryService
Determine whether this query is "project based"; i.e. whether this query only contains project clauses, possibly combined with the OR operator.

Specified by:
isProjectClauseOnlyQuery in interface QueryService
Parameters:
query - the query; may be null
Returns:
the result

getProjectsInProjectClauseOnlyQuery

public java.util.List<com.atlassian.jira.project.Project> getProjectsInProjectClauseOnlyQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                              @NotNull
                                                                                              com.atlassian.query.Query projectBasedQuery)
Description copied from interface: QueryService
Return the projects which are included in this query. This does not execute a search - it instead uses QueryContext information.

Specified by:
getProjectsInProjectClauseOnlyQuery in interface QueryService
Parameters:
user - the user performing the query
projectBasedQuery - the query; must not be null and must be a project-based query
Returns:
the IDs

getProjectsForRapidViewFilterQuery

public ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewFilterQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                                            @NotNull
                                                                                                            RapidView rapidView)
Description copied from interface: QueryService
Find all projects for a given rapid view filter query. This method extracts projects from the jql of the rapid view saved filter. It might return an empty set of projects if the query is global or not specific enough.

Specified by:
getProjectsForRapidViewFilterQuery in interface QueryService
Returns:
a list of projects, empty if the filter is inconclusive

getProjectsForRapidViewIssuesOverrideSecurity

public ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewIssuesOverrideSecurity(com.atlassian.crowd.embedded.api.User user,
                                                                                                                       RapidView rapidView)
Description copied from interface: QueryService
Find all projects for a given rapid view by looking at the issues matched by the rapid view query. Note: This method returns all projects, even those the user isn't allowed to see

Specified by:
getProjectsForRapidViewIssuesOverrideSecurity in interface QueryService
Returns:
a list of projects, empty if no issues are matched by the rapid view


Copyright © 2007-2014 Atlassian. All Rights Reserved.