RM-5416: REST API Tests for Folder Classification

This commit is contained in:
jcule
2017-09-25 18:31:43 +01:00
parent 701f7d065d
commit 7b3628a1e3
3 changed files with 93 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ import org.alfresco.rest.model.RestHtmlResponse;
import org.alfresco.rest.model.RestSiteModel;
import org.alfresco.rest.model.RestSiteModelsCollection;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.utility.model.StatusModel;
import org.alfresco.utility.model.UserModel;
@@ -145,6 +146,12 @@ public class RMRestWrapper
return restWrapper.withCoreAPI();
}
/** Get the Alfresco Search API. */
public SearchAPI withSearchAPI()
{
return restWrapper.withSearchAPI();
}
/**
* You can handle the request sent to server by calling this method.
* If for example you want to sent multipart form data you can use: <pre>

View File

@@ -32,6 +32,7 @@ import javax.annotation.Resource;
import org.alfresco.rest.requests.Node;
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
import org.alfresco.rest.requests.search.SearchAPI;
import org.alfresco.rest.rm.community.requests.gscore.GSCoreAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilePlanAPI;
import org.alfresco.rest.rm.community.requests.gscore.api.FilesAPI;
@@ -84,6 +85,12 @@ public class RestAPIFactory
getRmRestWrapper().authenticateUser(userModel != null ? userModel : getDataUser().getAdminUser());
return getRmRestWrapper().withCoreAPI();
}
private SearchAPI getSearchAPI(UserModel userModel)
{
getRmRestWrapper().authenticateUser(userModel != null ? userModel : getDataUser().getAdminUser());
return getRmRestWrapper().withSearchAPI();
}
public Node getNodeAPI(RepoTestModel model) throws Exception
{