com.atlassian.jira.issue.search
Class SearchRequestUtils

java.lang.Object
  extended by com.atlassian.jira.issue.search.SearchRequestUtils

public class SearchRequestUtils
extends Object


Constructor Summary
SearchRequestUtils()
           
 
Method Summary
static SearchContext getCombinedSearchContext(SearchContext baseSearchContext, SearchContext possibleContext)
          Creates the most specific SearchContext possible from the two parameters.
static List<String> getSearchSortDescriptions(SearchRequest searchRequest, FieldManager fieldManager, SearchHandlerManager searchHandlerManager, SearchSortUtil searchSortUtil, I18nHelper i18nHelper, com.atlassian.crowd.embedded.api.User searcher)
          Deprecated. Use SearchSortUtil.getSearchSortDescriptions(SearchRequest, I18nHelper, User) instead. Since v5.0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchRequestUtils

public SearchRequestUtils()
Method Detail

getCombinedSearchContext

public static SearchContext getCombinedSearchContext(SearchContext baseSearchContext,
                                                     SearchContext possibleContext)
Creates the most specific SearchContext possible from the two parameters. The baseSearchContext is used as the parent context and the possibleContext is used to narrow it down. Thus if the possibleContext contains Project A and the baseSearchContext is global, a context with Project A will be returned. If baseSearchContext is Project A & Project B the Project A will be returned. If baseSearchContext is only Project B, then Project B will be returned. The same logic applies for issue types.

Parameters:
baseSearchContext - the base parent context
possibleContext - the context to try to narrow the baseSearchContext on
Returns:
a combineed SearchContext object based on the baseSearchContext. Null if baseSearchContext is null

getSearchSortDescriptions

public static List<String> getSearchSortDescriptions(SearchRequest searchRequest,
                                                     FieldManager fieldManager,
                                                     SearchHandlerManager searchHandlerManager,
                                                     SearchSortUtil searchSortUtil,
                                                     I18nHelper i18nHelper,
                                                     com.atlassian.crowd.embedded.api.User searcher)
Deprecated. Use SearchSortUtil.getSearchSortDescriptions(SearchRequest, I18nHelper, User) instead. Since v5.0.

Returns a list of the descriptions of each sorter defined in the search request. If one of the sorters references a field which does not exist, it will be skipped.

Parameters:
searchRequest - the search request containing the sorts; must not be null.
fieldManager - field manager
searchHandlerManager - search handler manager
searchSortUtil - search sort utility
i18nHelper - i18n helper
searcher - the user making the request
Returns:
a list of strings describing the sorters; never null.
Since:
v3.13.3


Copyright © 2002-2015 Atlassian. All Rights Reserved.