Class SearchServiceImpl

java.lang.Object
com.atlassian.greenhopper.service.issue.SearchServiceImpl
All Implemented Interfaces:
SearchService

@Service public class SearchServiceImpl extends Object implements SearchService
Wrapper around JIRA's SearchService to make results easier to consume in GH.
Since:
v5.8.5
Author:
mtokar
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ServiceOutcome<Set<com.atlassian.query.Query>>
    findQueriesMatchingIssue(com.atlassian.jira.user.ApplicationUser user, Map<com.atlassian.jira.issue.Issue,Collection<com.atlassian.query.Query>> issuesAndQueries)
    Perform a search of the query to see if the specified issue matches it
    getJqlString(com.atlassian.query.Query query)
     
    boolean
    isQueryMatchingIssue(com.atlassian.jira.user.ApplicationUser user, com.atlassian.jira.issue.Issue issue, com.atlassian.query.Query query)
    Perform a search of the query to see if the specified issue matches it.
    ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>>
    search(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
    Perform an issue search using the specified user and query.
    ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>>
    search(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query, com.atlassian.jira.web.bean.PagerFilter<?> pager)
    Perform an issue search using the specified user, query, and pager.
    searchCount(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
    Perform an issue search using the specified user and query and return the number of results.
    searchCountOverrideSecurity(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
    Perform an issue search using the specified user and query and return the number of results.
    ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>>
    searchOverrideSecurity(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
    Perform an issue search using the specified user and query and return the results.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SearchServiceImpl

      public SearchServiceImpl()
  • Method Details

    • search

      @Nonnull public ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>> search(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
      Description copied from interface: SearchService
      Perform an issue search using the specified user and query. Will automatically select the correct PagerFilter depending on GreenHopper's settings. Neatly wraps exceptions into ServiceOutcome.
      Specified by:
      search in interface SearchService
      Parameters:
      user - the user
      query - the query
      Returns:
      the outcome
    • search

      @Nonnull public ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>> search(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query, com.atlassian.jira.web.bean.PagerFilter<?> pager)
      Description copied from interface: SearchService
      Perform an issue search using the specified user, query, and pager. Neatly wraps exceptions into ServiceOutcome.
      Specified by:
      search in interface SearchService
      Parameters:
      user - the user
      query - the query
      pager - the pager
      Returns:
      the outcome
    • searchOverrideSecurity

      @Nonnull public ServiceOutcome<com.atlassian.jira.issue.search.SearchResults<com.atlassian.jira.issue.Issue>> searchOverrideSecurity(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
      Description copied from interface: SearchService
      Perform an issue search using the specified user and query and return the results. User's permissions are not taken into account when performing the search. Neatly wraps exceptions into ServiceOutcome.
      Specified by:
      searchOverrideSecurity in interface SearchService
      Parameters:
      user - the user
      query - the query
      Returns:
      the outcome
    • findQueriesMatchingIssue

      @Nonnull public ServiceOutcome<Set<com.atlassian.query.Query>> findQueriesMatchingIssue(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull Map<com.atlassian.jira.issue.Issue,Collection<com.atlassian.query.Query>> issuesAndQueries)
      Description copied from interface: SearchService
      Perform a search of the query to see if the specified issue matches it
      Specified by:
      findQueriesMatchingIssue in interface SearchService
      Parameters:
      user - the user to search as
      issuesAndQueries - the issue to match and the queries to check
      Returns:
      the outcome
    • isQueryMatchingIssue

      public boolean isQueryMatchingIssue(@Nonnull com.atlassian.jira.user.ApplicationUser user, @Nonnull com.atlassian.jira.issue.Issue issue, @Nonnull com.atlassian.query.Query query)
      Description copied from interface: SearchService
      Perform a search of the query to see if the specified issue matches it.
      Specified by:
      isQueryMatchingIssue in interface SearchService
      Parameters:
      user - the user to search as
      issue - the issue to match
      query - the query to check
      Returns:
      true if issue was found in the result or false if it was not present
    • searchCount

      @Nonnull public ServiceOutcome<Long> searchCount(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
      Description copied from interface: SearchService
      Perform an issue search using the specified user and query and return the number of results. Neatly wraps exceptions into ServiceOutcome.
      Specified by:
      searchCount in interface SearchService
      Parameters:
      user - the user
      query - the query
      Returns:
      the outcome
    • searchCountOverrideSecurity

      @Nonnull public ServiceOutcome<Long> searchCountOverrideSecurity(com.atlassian.jira.user.ApplicationUser user, com.atlassian.query.Query query)
      Description copied from interface: SearchService
      Perform an issue search using the specified user and query and return the number of results. User's permissions are not taken into account when performing the search. Neatly wraps exceptions into ServiceOutcome.
      Specified by:
      searchCountOverrideSecurity in interface SearchService
      Parameters:
      user - the user
      query - the query
      Returns:
      the outcome
    • getJqlString

      @Nonnull public ServiceOutcome<String> getJqlString(com.atlassian.query.Query query)
      Specified by:
      getJqlString in interface SearchService