Compare commits

..

50 Commits

Author SHA1 Message Date
Travis CI User
7d5f01f3d5 [maven-release-plugin][skip ci] prepare release v1.38 2020-04-10 05:34:28 +00:00
Ciprian Chelaru
1ae1f87cdf added missing quota and quotaUsed properties (#53) 2020-04-10 08:30:36 +03:00
Travis CI User
a5ceb3df00 [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-27 22:20:58 +00:00
Travis CI User
18dc254813 [maven-release-plugin][skip ci] prepare release v1.37 2020-03-27 22:20:51 +00:00
dependabot-preview[bot]
b737775fd3 Bump commons-lang3 from 3.9 to 3.10 (#51) 2020-03-27 22:16:48 +00:00
Travis CI User
175a525b64 [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-26 16:41:42 +00:00
Travis CI User
8dba7f9468 [maven-release-plugin][skip ci] prepare release v1.36 2020-03-26 16:41:35 +00:00
Meenal Bhave
838794f274 Search-2142: Configuring the right api endpoint, as the context changes from solr, solr admin and alfresco apis (#50) 2020-03-26 16:37:39 +00:00
Travis CI User
917961569d [maven-release-plugin][skip ci] prepare for next development iteration 2020-03-04 11:50:11 +00:00
Travis CI User
8e1c10aae0 [maven-release-plugin][skip ci] prepare release v1.35 2020-03-04 11:50:05 +00:00
Meenal Bhave
580dda50e6 Search-2078: Added a method to configure alfresco endpoint for search api in case its been reset to solr endpoint (#42) 2020-03-04 11:46:13 +00:00
Travis CI User
d0bc3f1ece [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-26 22:29:57 +00:00
Travis CI User
a05f2eb20f [maven-release-plugin][skip ci] prepare release v1.34 2020-02-26 22:29:49 +00:00
dependabot-preview[bot]
51029868a9 Bump utility from 3.0.19 to 3.0.20 (#41) 2020-02-26 22:18:30 +00:00
Travis CI User
e0b1c6f776 [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-17 12:38:43 +00:00
Travis CI User
9930f18291 [maven-release-plugin][skip ci] prepare release v1.33 2020-02-17 12:38:37 +00:00
Ciprian Chelaru
ca785cda74 APPSREPO-752 added identityServiceConfig obj into sync service model (#38) 2020-02-17 14:34:48 +02:00
Travis CI User
308a60dcfa [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-17 09:20:22 +00:00
Travis CI User
2518910fe1 [maven-release-plugin][skip ci] prepare release v1.32 2020-02-17 09:20:15 +00:00
ciprianchelaru
4ddfb16bff APPSREPO-752_new object in sync service model 2020-02-17 11:15:51 +02:00
Travis CI User
ffb4df068b [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-11 16:23:10 +00:00
Travis CI User
7fdb040b50 [maven-release-plugin][skip ci] prepare release v1.31 2020-02-11 16:23:04 +00:00
Meenal Bhave
c2e587d640 Search-2096: Added missing API to update Site (#37) 2020-02-11 16:19:15 +00:00
Travis CI User
bed12e40ca [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-06 12:14:27 +00:00
Travis CI User
a53daf152f [maven-release-plugin][skip ci] prepare release v1.30 2020-02-06 12:14:19 +00:00
Angel Borroy
cc03aaf92f RestWrapper for Solr Admin API (#34) 2020-02-06 13:10:30 +01:00
Travis CI User
f9102eae0d [maven-release-plugin][skip ci] prepare for next development iteration 2020-02-05 16:31:10 +00:00
Travis CI User
8f252b69f1 [maven-release-plugin][skip ci] prepare release v1.29 2020-02-05 16:31:04 +00:00
Keerat Lalia
50f884556c SEARCH-1681 Adding the shard params instance to the RestInstanceModel (#33)
* SEARCH-1681 Adding the shard params instance to the RestInstanceModel

* SEARCH-1681 Adding the changes from the review
2020-02-04 13:47:11 +00:00
dependabot-preview[bot]
b1ad95a756 Bump utility from 3.0.18 to 3.0.19 (#32) 2020-01-23 22:18:23 +00:00
Travis CI User
581f82f332 [maven-release-plugin][skip ci] prepare for next development iteration 2020-01-15 23:05:25 +00:00
Travis CI User
80fda4ed56 [maven-release-plugin][skip ci] prepare release v1.28 2020-01-15 23:05:19 +00:00
dependabot-preview[bot]
086ca9229e Bump utility from 3.0.17 to 3.0.18 (#27) 2020-01-15 22:26:44 +00:00
Travis CI User
6d84baa34e [maven-release-plugin][skip ci] prepare for next development iteration 2020-01-14 23:19:23 +00:00
Travis CI User
d048054903 [maven-release-plugin][skip ci] prepare release v1.27 2020-01-14 23:19:17 +00:00
dependabot-preview[bot]
faf6cafe5a Bump groovy-json from 2.5.8 to 2.5.9 (#26) 2020-01-14 22:37:31 +00:00
dependabot-preview[bot]
13a134da27 Bump groovy from 2.5.8 to 2.5.9 (#25) 2020-01-14 22:32:53 +00:00
Travis CI User
5e93e937f9 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-17 23:31:54 +00:00
Travis CI User
36c830ecdb [maven-release-plugin][skip ci] prepare release v1.26 2019-12-17 23:31:48 +00:00
dependabot-preview[bot]
013f3fac1c Bump utility from 3.0.16 to 3.0.17 (#23) 2019-12-17 22:57:31 +00:00
Travis CI User
ec675d6123 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-16 22:42:32 +00:00
Travis CI User
e115c673e1 [maven-release-plugin][skip ci] prepare release v1.25 2019-12-16 22:42:27 +00:00
dependabot-preview[bot]
2453b3c9c7 Bump slf4j-api from 1.7.29 to 1.7.30 (#22) 2019-12-16 22:31:24 +00:00
Travis CI User
761554ad83 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-14 00:26:40 +00:00
Travis CI User
20738f6ac5 [maven-release-plugin][skip ci] prepare release v1.24 2019-12-14 00:26:34 +00:00
Alex Mukha
1a90c129bc Revert "Decrease wait time for activity feed requests"
This reverts commit 9e9caec601.
2019-12-14 00:22:46 +00:00
Travis CI User
76ba1ce813 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-12 09:38:08 +00:00
Travis CI User
91bb8651d3 [maven-release-plugin][skip ci] prepare release v1.23 2019-12-12 09:38:02 +00:00
David Edwards
bbdc41555c Revert "Bump httpclient-osgi from 4.5.3 to 4.5.10 (#21)"
This reverts commit d0e94e0d68.
2019-12-12 09:33:42 +00:00
Travis CI User
1d77e2e852 [maven-release-plugin][skip ci] prepare for next development iteration 2019-12-11 22:41:31 +00:00
14 changed files with 316 additions and 12 deletions

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name>
<version>1.22</version>
<version>1.38</version>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
@@ -28,16 +28,16 @@
<suiteXmlFile>src/main/resources/shared-resources/testCount.xml</suiteXmlFile>
<maven.build.sourceVersion>11</maven.build.sourceVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tas.utility.version>3.0.16</tas.utility.version>
<tas.utility.version>3.0.20</tas.utility.version>
<rest-assured.version>3.3.0</rest-assured.version>
<httpclient-osgi-version>4.5.10</httpclient-osgi-version>
<httpclient-osgi-version>4.5.3</httpclient-osgi-version>
<json-path.version>3.3.0</json-path.version>
<xml-path.version>3.3.0</xml-path.version>
<json-schema-validator.version>3.3.0</json-schema-validator.version>
<jackson-databind.version>2.9.8</jackson-databind.version>
<maven-release.version>2.5.3</maven-release.version>
<org.glassfish.version>1.1.4</org.glassfish.version>
<commons-lang3.version>3.9</commons-lang3.version>
<commons-lang3.version>3.10</commons-lang3.version>
<scribejava-apis.version>6.9.0</scribejava-apis.version>
<test.exclude />
<test.include />
@@ -48,7 +48,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-tas-restapi</url>
<tag>v1.22</tag>
<tag>v1.38</tag>
</scm>
<issueManagement>
@@ -255,7 +255,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.29</version>
<version>1.7.30</version>
</dependency>
<!-- swagger parser -->
@@ -282,14 +282,14 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.8</version>
<version>2.5.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>2.5.8</version>
<version>2.5.9</version>
</dependency>
</dependencies>

View File

@@ -166,6 +166,19 @@ public class JsonBodyGenerator
.add("title", title).build();
return value.toString();
}
/**
* Method to create a Json object for SiteBody with site title, description, visibility
* @param siteModel
* @return String
*/
public static String updateSiteRequest(SiteModel siteModel)
{
JsonObject value = defineJSON()
.add("title", siteModel.getTitle())
.add("description", siteModel.getDescription())
.add("visibility", siteModel.getVisibility().toString()).build();
return value.toString();
}
public static String process(String processDefinitionKey, UserModel assignee, boolean sendEmailNotifications, Priority priority)
{

View File

@@ -42,6 +42,7 @@ import org.alfresco.rest.requests.search.SearchSQLAPI;
import org.alfresco.rest.requests.search.SearchSQLJDBC;
import org.alfresco.rest.requests.search.ShardInfoAPI;
import org.alfresco.rest.requests.search.SolrAPI;
import org.alfresco.rest.requests.search.SolrAdminAPI;
import org.alfresco.rest.requests.workflowAPI.RestWorkflowAPI;
import org.alfresco.utility.LogFactory;
import org.alfresco.utility.Utility;
@@ -955,6 +956,11 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
{
return new SolrAPI(this);
}
public SolrAdminAPI withSolrAdminAPI()
{
return new SolrAdminAPI(this);
}
/**
* @return {@link RestDiscoveryAPI} using the rest Discovery API as prefix: {@link /alfresco/api/discovery}
@@ -1134,4 +1140,15 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
configureRequestSpec().setBaseUri(this.serverURI);
configureRequestSpec().setPort(this.serverPort);
}
/**
* Adding new method to configure Alfresco Endpoint.
* Reconfiguration is required when restClient is used to executed apis on different <host>:<port> e.g. solr api followed by search api
*/
public void configureAlfrescoEndpoint()
{
this.serverURI = restProperties.envProperty().getTestServerUrl();
this.serverPort = restProperties.envProperty().getPort();
configureServerEndpoint();
}
}

View File

@@ -0,0 +1,127 @@
/*
* Copyright 2020 Alfresco Software, Ltd. All rights reserved.
* License rights for this program may be obtained from Alfresco Software, Ltd.
* pursuant to a written agreement and any use of this program without such an
* agreement is prohibited.
*/
package org.alfresco.rest.model;
import org.alfresco.utility.model.TestModel;
public class RestIdentityServiceConfigurationModel extends TestModel{
public RestIdentityServiceConfigurationModel() {
}
private String authenticationChain;
private String authenticationEnabled;
private String enableBasicAuth;
private String authServerUrl;
private String realm;
private String resource;
private String publicClient;
private String sslRequired;
private String enablePkce;
private String credentialsSecret;
private String credentialsProvider;
public String getAuthenticationChain() {
return authenticationChain;
}
public void setAuthenticationChain(String authenticationChain) {
this.authenticationChain = authenticationChain;
}
public String getAuthenticationEnabled() {
return authenticationEnabled;
}
public void setAuthenticationEnabled(String authenticationEnabled) {
this.authenticationEnabled = authenticationEnabled;
}
public String getEnableBasicAuth() {
return enableBasicAuth;
}
public void setEnableBasicAuth(String enableBasicAuth) {
this.enableBasicAuth = enableBasicAuth;
}
public String getAuthServerUrl() {
return authServerUrl;
}
public void setAuthServerUrl(String authServerUrl) {
this.authServerUrl = authServerUrl;
}
public String getRealm() {
return realm;
}
public void setRealm(String realm) {
this.realm = realm;
}
public String getResource() {
return resource;
}
public void setResource(String resource) {
this.resource = resource;
}
public String getPublicClient() {
return publicClient;
}
public void setPublicClient(String publicClient) {
this.publicClient = publicClient;
}
public String getSslRequired() {
return sslRequired;
}
public void setSslRequired(String sslRequired) {
this.sslRequired = sslRequired;
}
public String getEnablePkce() {
return enablePkce;
}
public void setEnablePkce(String enablePkce) {
this.enablePkce = enablePkce;
}
public String getCredentialsSecret() {
return credentialsSecret;
}
public void setCredentialsSecret(String credentialsSecret) {
this.credentialsSecret = credentialsSecret;
}
public String getCredentialsProvider() {
return credentialsProvider;
}
public void setCredentialsProvider(String credentialsProvider) {
this.credentialsProvider = credentialsProvider;
}
}

View File

@@ -71,6 +71,8 @@ public class RestPersonModel extends TestModel implements IModelAssertion<RestPe
private String userStatus;
private String password;
private Object properties;
private String quotaUsed;
private String quota;
private Map<String, Boolean> capabilities;
public RestPersonModel()
@@ -319,7 +321,25 @@ public class RestPersonModel extends TestModel implements IModelAssertion<RestPe
this.displayName = displayName;
}
/**
public String getQuotaUsed() {
return quotaUsed;
}
public void setQuotaUsed(String quotaUsed) {
this.quotaUsed = quotaUsed;
}
public String getQuota() {
return quota;
}
public void setQuota(String quota) {
this.quota = quota;
}
/**
* Generate a PersonModel with random values for all existing fields excluding fields specified as ingnoredFields
*
* @param ignoredFields field to be excluded when generating a random model

View File

@@ -63,6 +63,8 @@ public class RestSyncServiceConfigModel extends TestModel
@JsonProperty(required = true)
private RestSyncServiceRepoInfoModel repoInfo;
private RestIdentityServiceConfigurationModel identityServiceConfig;
public String getDsyncClientVersionMin()
{
return dsyncClientVersionMin;
@@ -77,5 +79,8 @@ public class RestSyncServiceConfigModel extends TestModel
{
return repoInfo;
}
public RestIdentityServiceConfigurationModel getIdentityServiceConfig() {
return identityServiceConfig;
}
}

View File

@@ -67,6 +67,8 @@ public class RestSyncServiceModel extends TestModel
@JsonProperty(required = true)
private RestSyncServiceConfigModel config;
private RestIdentityServiceConfigurationModel identityServiceConfig;
public String getId()
{
return id;
@@ -81,5 +83,12 @@ public class RestSyncServiceModel extends TestModel
{
return config;
}
public RestIdentityServiceConfigurationModel getIdentityServiceConfig() {
return identityServiceConfig;
}
public void setIdentityServiceConfig(RestIdentityServiceConfigurationModel identityServiceConfig) {
this.identityServiceConfig = identityServiceConfig;
}
}

View File

@@ -85,7 +85,7 @@ public class People extends ModelRequest<People>
{
while ((activityCollection.isEmpty() || activityCollection.getPagination().getCount() != expectedNoOfEntries) && retry < Utility.retryCountSeconds + 20)
{
Thread.sleep(300);
Utility.waitToLoopTime(2);
activityCollection = restWrapper.processModels(RestActivityModelsCollection.class, request);
retry++;
}

View File

@@ -192,6 +192,38 @@ public class Site extends ModelRequest<Site>
return restWrapper.processModel(RestSiteModel.class, request);
}
/**
* Update a site: Site title, description, visibility can be updated
* Body:
* {
* "title": "string",
* "description": "string",
* "visibility": "PRIVATE"
* }
*
* Response:
* {
* "entry": {
* "id": "string",
* "guid": "string",
* "title": "string",
* "description": "string",
* "visibility": "PRIVATE",
* "preset": "string",
* "role": "SiteConsumer"
* }
* }
*
* @return the properties of an updated site
* @throws Exception
*/
public RestSiteModel updateSite(SiteModel site) throws Exception
{
String siteBody = JsonBodyGenerator.updateSiteRequest(site);
RestRequest request = RestRequest.requestWithBody(HttpMethod.PUT, siteBody, "sites/{siteId}", site.getId());
return restWrapper.processModel(RestSiteModel.class, request);
}
/**
* Get site membership requests by using GET /site-membership-requests
*

View File

@@ -35,6 +35,7 @@ public class SearchAPI extends ModelRequest<SearchAPI>
public SearchAPI(RestWrapper restWrapper)
{
super(restWrapper);
restWrapper.configureAlfrescoEndpoint();
RestAssured.basePath = "alfresco/api/-default-/public/search/versions/1";
restWrapper.configureRequestSpec().setBasePath(RestAssured.basePath);
}

View File

@@ -127,6 +127,7 @@ public class SearchSQLAPI extends ModelRequest<SearchSQLAPI>
public SearchSQLAPI(RestWrapper restWrapper)
{
super(restWrapper);
restWrapper.configureAlfrescoEndpoint();
RestAssured.basePath = "alfresco/api/-default-/public/search/versions/1";
restWrapper.configureRequestSpec().setBasePath(RestAssured.basePath);
}

View File

@@ -42,6 +42,7 @@ public class ShardInfoAPI extends ModelRequest<ShardInfoAPI>
public ShardInfoAPI(RestWrapper restWrapper)
{
super(restWrapper);
restWrapper.configureAlfrescoEndpoint();
RestAssured.basePath = "alfresco/api/-default-/private/search/versions/1";
restWrapper.configureRequestSpec().setBasePath(RestAssured.basePath);
}

View File

@@ -0,0 +1,58 @@
/*
* Copyright (C) 2020 Alfresco Software Limited.
* This file is part of Alfresco
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
package org.alfresco.rest.requests.search;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.requests.ModelRequest;
import org.springframework.http.HttpMethod;
import io.restassured.RestAssured;
import io.restassured.http.Header;
import io.restassured.http.Headers;
/**
* Wrapper for SOLR Admin REST API
*
* @author aborroy
*
*/
public class SolrAdminAPI extends ModelRequest<SolrAdminAPI>
{
public SolrAdminAPI(RestWrapper restWrapper)
{
super(restWrapper);
RestAssured.basePath = "solr/admin";
restWrapper.configureSolrEndPoint();
restWrapper.configureRequestSpec().setBasePath(RestAssured.basePath);
}
public RestResponse getAction(String action) throws Exception
{
List<Header> headers = new ArrayList<Header>();
headers.add(new Header("Content-Type", "application/json"));
Headers header = new Headers(headers);
restWrapper.setResponseHeaders(header);
restWrapper.configureRequestSpec().setUrlEncodingEnabled(false);
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET,
"cores?action=" + action + "&wt=json&{parameters}", restWrapper.getParameters());
return restWrapper.process(request);
}
}

View File

@@ -57,6 +57,9 @@ public class RestInstanceModel
/** Transactions remaining */
private Long transactionsRemaining;
/** Sharding Parameters */
private String shardParams;
/**
* @return the baseUrl
@@ -233,4 +236,21 @@ public class RestInstanceModel
{
this.transactionsRemaining = transactionsRemaining;
}
/**
* @return the shardParams
*/
public String getShardParams()
{
return this.shardParams;
}
/**
* @param shardParams the shardParams to set
*/
public void setShardParams(String shardParams)
{
this.shardParams = shardParams;
}
}