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

129187 mmuller: Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)
      129004 adavis: REPO-243 People Live Search
         - First cut of this code
         - Includes a re-factor of the code used by GET /queries/live-search-nodes as there is much in common.
         - Still have some tests to write and there are bound to be comments from the review.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129361 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alexandru Epure
2016-08-09 14:15:47 +00:00
parent c6fa0fd2f6
commit 9927a7ae60
10 changed files with 906 additions and 235 deletions

View File

@@ -26,31 +26,56 @@
package org.alfresco.rest.api;
import org.alfresco.model.ContentModel;
import org.alfresco.rest.api.model.Node;
import org.alfresco.rest.api.model.Person;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
import org.alfresco.rest.framework.resource.parameters.Parameters;
import org.alfresco.rest.framework.webscripts.ResourceWebScriptHelper;
/**
* Queries API
*
* @author janv
* @author Alan Davis
*/
public interface Queries
{
// General
static String PARAM_TERM = "term";
static String PARAM_ORDERBY = ResourceWebScriptHelper.PARAM_ORDERBY;
static String PARAM_FIELDS = ResourceWebScriptHelper.PARAM_FILTER_FIELDS;
static String PARAM_INCLUDE = ResourceWebScriptHelper.PARAM_INCLUDE;
// Node query
static String PARAM_ROOT_NODE_ID = "rootNodeId";
static String PARAM_NODE_TYPE = "nodeType";
static String PARAM_NAME = "name";
static String PARAM_CREATEDAT = "createdAt";
static String PARAM_MODIFIEDAT = "modifiedAt";
static int MIN_TERM_LENGTH_NODES = 3;
// People query
static String PARAM_USERNAME = ContentModel.PROP_USERNAME.getLocalName();
static String PARAM_FIRSTNAME = ContentModel.PROP_FIRSTNAME.getLocalName();
static String PARAM_LASTNAME = ContentModel.PROP_LASTNAME.getLocalName();
static int MIN_TERM_LENGTH_PEOPLE = 2;
/**
* Find Nodes
*
* @param queryId currently expects "live-search-nodes"
* @param parameters the {@link Parameters} object to get the parameters passed into the request
*
* @return the search query results
*/
CollectionWithPagingInfo<Node> findNodes(String queryId, Parameters parameters);
CollectionWithPagingInfo<Node> findNodes(Parameters parameters);
String PARAM_TERM = "term";
String PARAM_ROOT_NODE_ID = "rootNodeId";
String PARAM_NODE_TYPE = "nodeType";
String PARAM_NAME = "name";
String PARAM_CREATEDAT = "createdAt";
String PARAM_MODIFIEDAT = "modifiedAt";
/**
* Find People
*
* @param parameters the {@link Parameters} object to get the parameters passed into the request
*
* @return the search query results
*/
CollectionWithPagingInfo<Person> findPeople(Parameters parameters);
}