Class SearchServiceImpl
java.lang.Object
com.atlassian.greenhopper.service.issue.SearchServiceImpl
- All Implemented Interfaces:
SearchService
Wrapper around JIRA's
SearchService
to make results easier to consume in GH.- Since:
- v5.8.5
- Author:
- mtokar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionServiceOutcome
<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 itgetJqlString
(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.
-
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 correctPagerFilter
depending on GreenHopper's settings. Neatly wraps exceptions intoServiceOutcome
.- Specified by:
search
in interfaceSearchService
- Parameters:
user
- the userquery
- 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 intoServiceOutcome
.- Specified by:
search
in interfaceSearchService
- Parameters:
user
- the userquery
- the querypager
- 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 intoServiceOutcome
.- Specified by:
searchOverrideSecurity
in interfaceSearchService
- Parameters:
user
- the userquery
- 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 interfaceSearchService
- Parameters:
user
- the user to search asissuesAndQueries
- 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 interfaceSearchService
- Parameters:
user
- the user to search asissue
- the issue to matchquery
- 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 intoServiceOutcome
.- Specified by:
searchCount
in interfaceSearchService
- Parameters:
user
- the userquery
- 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 intoServiceOutcome
.- Specified by:
searchCountOverrideSecurity
in interfaceSearchService
- Parameters:
user
- the userquery
- the query- Returns:
- the outcome
-
getJqlString
- Specified by:
getJqlString
in interfaceSearchService
-