Merged 5.2.N (5.2.1) to HEAD (5.2)

129190 mmuller: Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)
      129017 adavis: REPO-243 People Live Search
         - Added additional tests
         - Removed check in Person constructor for no id as we want to be able to create a Person from json which might not have the id.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129364 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 14:16:15 +00:00
parent fa0020fa58
commit c1875e3083
3 changed files with 97 additions and 63 deletions

View File

@@ -385,7 +385,8 @@ public class QueriesImpl implements Queries, InitializingBean
}
public CollectionWithPagingInfo<T> find(Parameters parameters,
String termName, int minTermLength, String queryTemplateName, Sort sort, Map<String, QName> sortParamsToQNames, SortColumn... defaultSort)
String termName, int minTermLength, String queryTemplateName,
Sort sort, Map<String, QName> sortParamsToQNames, SortColumn... defaultSort)
{
SearchParameters sp = new SearchParameters();
sp.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
@@ -541,6 +542,10 @@ public class QueriesImpl implements Queries, InitializingBean
for (SortColumn sortCol : sortCols)
{
QName sortPropQName = sortParamsToQNames.get(sortCol.column);
if (sortPropQName == null)
{
throw new InvalidArgumentException("Invalid sort field: "+sortCol.column);
}
sortPropQNames.add(sortPropQName);
}