Interface QueryService

All Known Implementing Classes:
QueryServiceImpl

public interface QueryService
Some handy methods to operate on Query objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    ServiceOutcome<Set<com.atlassian.jira.project.Project>>
    getExplicitProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView)
    Find all projects for a given rapid view filter query which are explicitly mentioned in the jql query.
    ServiceOutcome<Set<com.atlassian.jira.project.Project>>
    getProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView)
    Find all projects for a given rapid view filter query.
    ServiceOutcome<Set<com.atlassian.jira.project.Project>>
    getProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query filterQuery)
    Find all projects for a given rapid view filter query.
    List<com.atlassian.jira.project.Project>
    getProjectsInProjectClauseOnlyQuery(com.atlassian.jira.user.ApplicationUser 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. whether this query only contains project clauses, possibly combined with the OR operator.
    projectBelongsToRapidView(com.atlassian.jira.user.ApplicationUser user, RapidView rapidView, com.atlassian.jira.project.Project project)
    An optimized method to check if project is explicitly mentioned in rapidView's query.
  • Method Details

    • 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

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

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

      ServiceOutcome<Set<com.atlassian.jira.project.Project>> getExplicitProjectsForRapidViewFilterQuery(com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView)
      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.
      Returns:
      a list of projects, empty if the filter is inconclusive
    • projectBelongsToRapidView

      ServiceOutcome<Boolean> projectBelongsToRapidView(com.atlassian.jira.user.ApplicationUser user, @Nonnull RapidView rapidView, @Nonnull com.atlassian.jira.project.Project project)
      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.
      Returns:
      true if project is explicitly mentioned in rapidView's query.