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:
Alexandru Epure
2016-08-09 14:18:28 +00:00
parent 061e91e491
commit 82cd8e6038
3 changed files with 4 additions and 117 deletions

View File

@@ -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>