Class QueryServiceImpl

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

@Service public class QueryServiceImpl extends Object implements QueryService
  • Constructor Details

    • QueryServiceImpl

      @Inject public QueryServiceImpl(com.atlassian.jira.bc.issue.search.SearchService jiraSearchService, com.atlassian.jira.project.ProjectManager projectManager, com.atlassian.jira.issue.search.SearchRequestManager searchRequestManager, com.atlassian.jira.util.I18nHelper.BeanFactory i18nBeanFactory, RapidViewPermissionService rapidViewPermissionService, QueryToProjectMapper queryToProjectMapper)
  • Method Details

    • 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 List<com.atlassian.jira.project.Project> getProjectsInProjectClauseOnlyQuery(com.atlassian.jira.user.ApplicationUser user, @Nonnull 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<Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, @Nonnull 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
    • getProjectsForRapidViewFilterQuery

      public ServiceOutcome<Set<com.atlassian.jira.project.Project>> getProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, @Nonnull com.atlassian.query.Query filterQuery)
      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
    • getExplicitProjectsForRapidViewFilterQuery

      public ServiceOutcome<Set<com.atlassian.jira.project.Project>> getExplicitProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView)
      Description copied from interface: QueryService
      Find all projects for a given rapid view filter query which are explicitly mentioned in the jql 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:
      getExplicitProjectsForRapidViewFilterQuery in interface QueryService
      Returns:
      a list of projects, empty if the filter is inconclusive
    • projectBelongsToRapidView

      public ServiceOutcome<Boolean> projectBelongsToRapidView(com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, @Nonnull com.atlassian.jira.project.Project project)
      Description copied from interface: QueryService
      An optimized method to check if project is explicitly mentioned in rapidView's query. This method will return an error, if there user can't see rapidView.
      Specified by:
      projectBelongsToRapidView in interface QueryService
      Returns:
      true if project is explicitly mentioned in rapidView's query.