com.atlassian.greenhopper.service.issue
Class SearchServiceImpl

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

@Service
public class SearchServiceImpl
extends java.lang.Object
implements SearchService

Wrapper around JIRA's SearchService to make results easier to consume in GH.

Since:
v5.8.5
Author:
mtokar

Constructor Summary
SearchServiceImpl()
           
 
Method Summary
 ServiceOutcome<java.lang.Iterable<com.atlassian.jira.issue.Issue>> findOne(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query)
          Perform an issue search for a single issue.
 ServiceOutcome<com.atlassian.jira.issue.search.SearchResults> search(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query)
          Perform an issue search using the specified user and query.
 ServiceOutcome<java.lang.Long> searchCount(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query)
          Perform an issue search using the specified user and query and return the number of results.
 ServiceOutcome<java.lang.Long> searchCountOverrideSecurity(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query)
          Perform an issue search using the specified user and query and return the number of results.
 ServiceOutcome<java.lang.Long> searchCountOverrideSecurity(com.atlassian.crowd.embedded.api.User user, org.apache.lucene.search.Query query)
          Fetches a search result count overriding security for a lucene query.
 ServiceOutcome<com.atlassian.jira.issue.search.SearchResults> searchOverrideSecurity(com.atlassian.crowd.embedded.api.User 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 Detail

SearchServiceImpl

public SearchServiceImpl()
Method Detail

findOne

public ServiceOutcome<java.lang.Iterable<com.atlassian.jira.issue.Issue>> findOne(com.atlassian.crowd.embedded.api.User user,
                                                                                  com.atlassian.query.Query query)
Description copied from interface: SearchService
Perform an issue search for a single issue. Will configure the PagerFilter appropriately. Returns an Iterable so you can neatly just for-each it if there are no errors, and things just work™

Specified by:
findOne in interface SearchService

search

@NotNull
public ServiceOutcome<com.atlassian.jira.issue.search.SearchResults> search(com.atlassian.crowd.embedded.api.User 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

searchOverrideSecurity

@NotNull
public ServiceOutcome<com.atlassian.jira.issue.search.SearchResults> searchOverrideSecurity(com.atlassian.crowd.embedded.api.User 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

searchCount

@NotNull
public ServiceOutcome<java.lang.Long> searchCount(com.atlassian.crowd.embedded.api.User 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

@NotNull
public ServiceOutcome<java.lang.Long> searchCountOverrideSecurity(com.atlassian.crowd.embedded.api.User 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

searchCountOverrideSecurity

@NotNull
public ServiceOutcome<java.lang.Long> searchCountOverrideSecurity(com.atlassian.crowd.embedded.api.User user,
                                                                          org.apache.lucene.search.Query query)
Fetches a search result count overriding security for a lucene query. As this isn't available through SearchProvider, so we have to go to the issue searcher directly

Specified by:
searchCountOverrideSecurity in interface SearchService
Parameters:
user - the user
query - the lucene query to search for
Returns:
the outcome


Copyright © 2007-2012 Atlassian. All Rights Reserved.