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/BRANCHES/DEV/5.2.N/root@129190 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Martin Muller
2016-08-05 13:49:27 +00:00
parent 4350d8026b
commit dd330266ed
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);
}