@Deprecated public interface SearchSortUtil
Modifier and Type | Field and Description |
---|---|
static String |
SORTER_FIELD
Deprecated.
|
static String |
SORTER_ORDER
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
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.
|
OrderBy |
getOrderByClause(Map parameterMap)
Deprecated.
This method is used to convert incoming, request-style, parameters into SearchSort objects.
|
List<String> |
getSearchSortDescriptions(SearchRequest searchRequest,
I18nHelper i18nHelper,
ApplicationUser searcher)
Deprecated.
Returns a list of the descriptions of each sorter defined in the search request.
|
List<SearchSort> |
getSearchSorts(Query query)
Deprecated.
|
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.
|
static final String SORTER_ORDER
static final String SORTER_FIELD
@Nonnull List<SearchSort> mergeSearchSorts(ApplicationUser user, Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength)
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 listList<SearchSort> getSearchSorts(Query query)
@Nonnull OrderBy getOrderByClause(Map parameterMap)
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.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.@Nonnull List<SearchSort> concatSearchSorts(Collection<SearchSort> newSorts, Collection<SearchSort> oldSorts, int maxLength)
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 listList<String> getSearchSortDescriptions(SearchRequest searchRequest, I18nHelper i18nHelper, ApplicationUser searcher)
If one of the sorters references a field which does not exist, it will be skipped.
searchRequest
- the search request containing the sorts; must not be null.i18nHelper
- i18n helpersearcher
- the user making the requestCopyright © 2002-2019 Atlassian. All Rights Reserved.