com.atlassian.greenhopper.service.query
Interface QueryService

All Known Implementing Classes:
QueryServiceImpl

public interface QueryService

Some handy methods to operate on Query objects.


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.
 

Method Detail

isProjectClauseOnlyQuery

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

Parameters:
query - the query; may be null
Returns:
the result

getProjectsInProjectClauseOnlyQuery

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

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

ServiceOutcome<java.util.Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewFilterQuery(com.atlassian.crowd.embedded.api.User user,
                                                                                                     @NotNull
                                                                                                     RapidView rapidView)
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.

Returns:
a list of projects, empty if the filter is inconclusive

getProjectsForRapidViewIssuesOverrideSecurity

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. Note: This method returns all projects, even those the user isn't allowed to see

Returns:
a list of projects, empty if no issues are matched by the rapid view


Copyright © 2007-2014 Atlassian. All Rights Reserved.