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/BRANCHES/DEV/5.2.N/root@129187 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Martin Muller
2016-08-05 13:49:15 +00:00
parent 15f33e6130
commit 83e9fdf964
10 changed files with 906 additions and 235 deletions

View File

@@ -45,6 +45,7 @@ import org.alfresco.rest.api.tests.client.PublicApiClient;
import org.alfresco.rest.api.tests.client.PublicApiHttpClient.BinaryPayload;
import org.alfresco.rest.api.tests.client.PublicApiHttpClient.RequestBuilder;
import org.alfresco.rest.api.tests.client.RequestContext;
import org.alfresco.rest.api.tests.client.data.Company;
import org.alfresco.rest.api.tests.client.data.ContentInfo;
import org.alfresco.rest.api.tests.client.data.Document;
import org.alfresco.rest.api.tests.client.data.Folder;
@@ -452,10 +453,15 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
return createUser(username, "password", null);
}
protected String createUser(String usernameIn, String password, TestNetwork network)
{
return createUser(new PersonInfo(usernameIn, usernameIn, usernameIn, password, null, null, null, null, null, null, null), network);
}
/**
* TODO implement as remote api call
*/
protected String createUser(final String usernameIn, final String password, final TestNetwork network)
protected String createUser(final PersonInfo personInfo, final TestNetwork network)
{
final String tenantDomain = (network != null ? network.getId() : TenantService.DEFAULT_DOMAIN);
@@ -468,8 +474,8 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
{
public String doWork() throws Exception
{
String username = repoService.getPublicApiContext().createUserName(usernameIn, tenantDomain);
PersonInfo personInfo = new PersonInfo(username, username, username, password, null, null, null, null, null, null, null);
String username = repoService.getPublicApiContext().createUserName(personInfo.getUsername(), tenantDomain);
personInfo.setUsername(username);
RepoService.TestPerson person = repoService.createUser(personInfo, username, network);
return person.getId();