mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-24 14:32:01 +00:00
Compare commits
9 Commits
tas-restap
...
tas-restap
Author | SHA1 | Date | |
---|---|---|---|
|
9930f18291 | ||
|
ca785cda74 | ||
|
308a60dcfa | ||
|
2518910fe1 | ||
|
4ddfb16bff | ||
|
ffb4df068b | ||
|
7fdb040b50 | ||
|
c2e587d640 | ||
|
bed12e40ca |
@@ -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>
|
||||||
|
@@ -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)
|
||||||
{
|
{
|
||||||
|
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user