Compare commits

..

9 Commits

Author SHA1 Message Date
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
6 changed files with 190 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId> <groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId> <artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name> <name>alfresco-tas-restapi</name>
<version>1.30</version> <version>1.33</version>
<parent> <parent>
<groupId>org.alfresco</groupId> <groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId> <artifactId>alfresco-super-pom</artifactId>
@@ -48,7 +48,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection> <connection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection> <developerConnection>scm:git:https://github.com/Alfresco/alfresco-tas-restapi.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-tas-restapi</url> <url>https://github.com/Alfresco/alfresco-tas-restapi</url>
<tag>v1.30</tag> <tag>v1.33</tag>
</scm> </scm>
<issueManagement> <issueManagement>

View File

@@ -166,6 +166,19 @@ public class JsonBodyGenerator
.add("title", title).build(); .add("title", title).build();
return value.toString(); 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) public static String process(String processDefinitionKey, UserModel assignee, boolean sendEmailNotifications, Priority priority)
{ {

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

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

View File

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

View File

@@ -192,6 +192,38 @@ public class Site extends ModelRequest<Site>
return restWrapper.processModel(RestSiteModel.class, request); 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 * Get site membership requests by using GET /site-membership-requests
* *