mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
129252 adavis: REPO-1079 Rename "Live Search" API endpoints - Changes to end points to reflect the rename of: /queries/live-search-nodes to /queries/nodes /queries/live-search-people to /queries/people /queries/live-search-sites to /queries/sites git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@129379 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -46,9 +46,9 @@ public class QueriesEntityResource implements
|
||||
EntityResourceAction.ReadById<CollectionWithPagingInfo<? extends Object>>,
|
||||
InitializingBean
|
||||
{
|
||||
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 final static String QUERY_NODES = "nodes";
|
||||
private final static String QUERY_PEOPLE = "people";
|
||||
private final static String QUERY_SITES = "sites";
|
||||
|
||||
private Queries queries;
|
||||
|
||||
@@ -70,11 +70,11 @@ public class QueriesEntityResource implements
|
||||
{
|
||||
switch (queryId)
|
||||
{
|
||||
case QUERY_LIVE_SEARCH_NODES:
|
||||
case QUERY_NODES:
|
||||
return queries.findNodes(parameters);
|
||||
case QUERY_LIVE_SEARCH_PEOPLE:
|
||||
case QUERY_PEOPLE:
|
||||
return queries.findPeople(parameters);
|
||||
case QUERY_LIVE_SEARCH_SITES:
|
||||
case QUERY_SITES:
|
||||
return queries.findSites(parameters);
|
||||
default:
|
||||
throw new NotFoundException(queryId);
|
||||
|
@@ -54,14 +54,14 @@ import static org.junit.Assert.*;
|
||||
* V1 REST API tests for pre-defined 'live' search Queries on Nodes
|
||||
*
|
||||
* <ul>
|
||||
* <li> {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/live-search-nodes} </li>
|
||||
* <li> {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/nodes} </li>
|
||||
* </ul>
|
||||
*
|
||||
* @author janv
|
||||
*/
|
||||
public class QueriesNodesApiTest extends AbstractSingleNetworkSiteTest
|
||||
{
|
||||
private static final String URL_QUERIES_LSN = "queries/live-search-nodes";
|
||||
private static final String URL_QUERIES_LSN = "queries/nodes";
|
||||
|
||||
public static <K, V extends Comparable<? super V>> Map<K, V> sortByValue( Map<K, V> map )
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public class QueriesNodesApiTest extends AbstractSingleNetworkSiteTest
|
||||
* Tests basic api for nodes live search - metadata (name, title, description) &/or full text search of file/content
|
||||
*
|
||||
* <p>GET:</p>
|
||||
* {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/live-search-nodes}
|
||||
* {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/nodes}
|
||||
*/
|
||||
@Test
|
||||
public void testLiveSearchNodes_FTS_and_Metadata() throws Exception
|
||||
|
@@ -62,7 +62,7 @@ import com.sun.star.lang.IllegalArgumentException;
|
||||
*/
|
||||
public class QueriesPeopleApiTest extends AbstractSingleNetworkSiteTest
|
||||
{
|
||||
private static final String URL_QUERIES_LSP = "queries/live-search-people";
|
||||
private static final String URL_QUERIES_LSP = "queries/people";
|
||||
|
||||
private static String TEST_TERM_PREFIX = Long.toString(System.currentTimeMillis()/1000);
|
||||
|
||||
|
@@ -46,20 +46,20 @@ import static org.junit.Assert.*;
|
||||
* V1 REST API tests for pre-defined 'live' search Queries on Sites
|
||||
*
|
||||
* <ul>
|
||||
* <li> {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/live-search-sites} </li>
|
||||
* <li> {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/sites} </li>
|
||||
* </ul>
|
||||
*
|
||||
* @author janv
|
||||
*/
|
||||
public class QueriesSitesApiTest extends AbstractSingleNetworkSiteTest
|
||||
{
|
||||
private static final String URL_QUERIES_LSS = "queries/live-search-sites";
|
||||
private static final String URL_QUERIES_LSS = "queries/sites";
|
||||
|
||||
/**
|
||||
* Tests basic api for nodes live search sites - metadata (id, title, description)
|
||||
*
|
||||
* <p>GET:</p>
|
||||
* {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/live-search-sites}
|
||||
* {@literal <host>:<port>/alfresco/api/<networkId>/public/alfresco/versions/1/queries/sites}
|
||||
*/
|
||||
@Test
|
||||
public void testLiveSearchSites() throws Exception
|
||||
|
Reference in New Issue
Block a user