Interface SearchSortUtil
- All Known Implementing Classes:
SearchSortUtilImpl
Deprecated.
Looks at the current search sorts on a query and will add the default JIRA search sorts (issue key or none if there
is a text search included in the query) if there are no user specified sorts.
- Since:
- v4.0
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionconcatSearchSorts
(Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength) Deprecated.Concatenate the new search sorts and the old search sorts returning a list of sorts that is only of size maxLength.getOrderByClause
(Map parameterMap) Deprecated.This method is used to convert incoming, request-style, parameters into SearchSort objects.getSearchSortDescriptions
(SearchRequest searchRequest, I18nHelper i18nHelper, ApplicationUser searcher) Deprecated.Returns a list of the descriptions of each sorter defined in the search request.getSearchSorts
(Query query) Deprecated.mergeSearchSorts
(ApplicationUser user, Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength) Deprecated.Combine the new search sorts and the old search sorts returning a list of sorts that is only of size maxLength.
-
Field Details
-
SORTER_ORDER
Deprecated.- See Also:
-
SORTER_FIELD
Deprecated.- See Also:
-
-
Method Details
-
mergeSearchSorts
@Nonnull List<SearchSort> mergeSearchSorts(ApplicationUser user, Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength) Deprecated.Combine the new search sorts and the old search sorts returning a list of sorts that is only of size maxLength. Old sorts will fall off the end of the list first. If there are any sorts that are duplicated (the field is mentioned again, sort order not taken into account), then the old sort reference will not be mentioned and will be replaced with the new sort in the correct position in the list.- Parameters:
user
- performing the searchnewSorts
- the new sorts that should go in the front of the sort list; must not be nulloldSorts
- the old sorts that should be in the end of the sort list; may be nullmaxLength
- the max size of the produced list- Returns:
- a list of search sorts that contains the newest and oldest sorts respecting the max length.
-
getSearchSorts
Deprecated. -
getOrderByClause
Deprecated.This method is used to convert incoming, request-style, parameters into SearchSort objects.- Parameters:
parameterMap
- contains 0 or many "sorter/order" and "sorter/field" parameters that will be converted into a search sort. The field is the System/Custom field name and will be converted by this method into the JQL Primary clause name. The reason for this is that we need to support "old (pre 4.0)" URL parameters and these contain the field id, not the clause name. Since the UI is the only thing producing these parameters we decided to leave it generating the field id. When sorts are specified in JQL they will be in clause names.- Returns:
- an OrderBy that can be used to populate a
Query
which contains alist of SearchSort's that relate to the passed in parameters. Will be an order by with empty sorts if there are no search sorts in the parameters.
-
concatSearchSorts
@Nonnull List<SearchSort> concatSearchSorts(Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength) Deprecated.Concatenate the new search sorts and the old search sorts returning a list of sorts that is only of size maxLength. Old sorts will fall off the end of the list first.- Parameters:
newSorts
- the new sorts that should go in the front of the sort list; must not be nulloldSorts
- the old sorts that should be in the end of the sort list; may be nullmaxLength
- the max size of the produced list- Returns:
- a list of search sorts that contains the newest and oldest sorts respecting the max length.
-
getSearchSortDescriptions
List<String> getSearchSortDescriptions(SearchRequest searchRequest, I18nHelper i18nHelper, ApplicationUser searcher) Deprecated.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.i18nHelper
- i18n helpersearcher
- the user making the request- Returns:
- a list of strings describing the sorters; never null.
- Since:
- v5.0 (copied from SearchRequestUtils)
-