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

129188 mmuller: Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)
      129010 jvonka: V1 REST API: 1st-cut of Sites Live Search
      - TODO api sanity test
      - open-question, re: orderBy
      REPO-232, REPO-882


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 14:15:56 +00:00
parent 9927a7ae60
commit a6606ee147
4 changed files with 137 additions and 6 deletions

View File

@@ -39,6 +39,7 @@ import org.springframework.beans.factory.InitializingBean;
* An implementation of an Entity Resource for Queries.
*
* @author janv
* @author Alan Davis
*/
@EntityResource(name="queries", title = "Queries")
public class QueriesEntityResource implements
@@ -47,6 +48,7 @@ public class QueriesEntityResource implements
{
private final static String QUERY_LIVE_SEARCH_NODES = "live-search-nodes";
private final static String QUERY_LIVE_SEARCH_PEOPLE = "live-search-people";
private final static String QUERY_LIVE_SEARCH_SITES = "live-search-sites";
private Queries queries;
@@ -72,6 +74,8 @@ public class QueriesEntityResource implements
return queries.findNodes(parameters);
case QUERY_LIVE_SEARCH_PEOPLE:
return queries.findPeople(parameters);
case QUERY_LIVE_SEARCH_SITES:
return queries.findSites(parameters);
default:
throw new NotFoundException(queryId);
}