mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
129253 adavis: REPO-1069 Review live search sort order / sort type (sites and also people) - Removal of parameter sortType - we are going to be using the POST_QUERY_SORT - Removal of tests using IN_QUERY_SORT except for the one to do with the default sort. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129380 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -324,24 +324,6 @@ public class QueriesImpl implements Queries, InitializingBean
|
||||
@Override
|
||||
public CollectionWithPagingInfo<Site> findSites(Parameters parameters)
|
||||
{
|
||||
// TODO review
|
||||
AbstractQuery.Sort sortType = IN_QUERY_SORT;
|
||||
String sortTypeStr = parameters.getParameter(PARAM_SORT_TYPE);
|
||||
if (sortTypeStr != null) {
|
||||
if (sortTypeStr.equalsIgnoreCase("in-query"))
|
||||
{
|
||||
sortType = IN_QUERY_SORT;
|
||||
}
|
||||
else if (sortTypeStr.equalsIgnoreCase("post-query"))
|
||||
{
|
||||
sortType = POST_QUERY_SORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalArgumentException("Unexpected sortType: "+sortTypeStr+" (expected in-query or post-query)");
|
||||
}
|
||||
}
|
||||
|
||||
return new AbstractQuery<Site>(nodeService, searchService)
|
||||
{
|
||||
@Override
|
||||
@@ -380,7 +362,7 @@ public class QueriesImpl implements Queries, InitializingBean
|
||||
}
|
||||
return new Site(siteInfo, role);
|
||||
}
|
||||
}.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", sortType, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true));
|
||||
}.find(parameters, PARAM_TERM, MIN_TERM_LENGTH_SITES, "_SITE", POST_QUERY_SORT, SITE_SORT_PARAMS_TO_QNAMES, new SortColumn(PARAM_SITE_TITLE, true));
|
||||
}
|
||||
|
||||
public abstract static class AbstractQuery<T>
|
||||
|
Reference in New Issue
Block a user