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