Compare commits

...

62 Commits

Author SHA1 Message Date
Travis CI User
0cecb28903 [maven-release-plugin][skip ci] prepare release v1.75 2022-02-28 09:02:33 +00:00
dependabot[bot]
19584814f0 Bump rest-assured from 3.3.0 to 4.5.1 (#158)
Bumps [rest-assured](https://github.com/rest-assured/rest-assured) from 3.3.0 to 4.5.1.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-3.3.0...rest-assured-4.5.1)

---
updated-dependencies:
- dependency-name: io.rest-assured:rest-assured
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-28 08:57:48 +00:00
Travis CI User
4ac6cf4088 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-24 13:43:31 +00:00
Travis CI User
04225ce5ef [maven-release-plugin][skip ci] prepare release v1.74 2022-02-24 13:43:29 +00:00
montgolfiere
c7464e7501 Create dependabot.yml 2022-02-24 13:38:40 +00:00
dependabot-preview[bot]
793ff892b7 Bump json-path from 3.3.0 to 4.4.0 (#133)
Bumps [json-path](https://github.com/rest-assured/rest-assured) from 3.3.0 to 4.4.0.
- [Release notes](https://github.com/rest-assured/rest-assured/releases)
- [Changelog](https://github.com/rest-assured/rest-assured/blob/master/changelog.txt)
- [Commits](https://github.com/rest-assured/rest-assured/compare/rest-assured-3.3.0...rest-assured-4.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2022-02-24 13:35:14 +00:00
Travis CI User
7c6d35d38c [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-18 09:44:58 +00:00
Travis CI User
b2dc3fa5cd [maven-release-plugin][skip ci] prepare release v1.73 2022-02-18 09:44:55 +00:00
Domenico Sibilio
54c91e8770 ACS-2566 Configure Solr shared secret authentication
* ACS-2566 Configure Solr shared secret

* Fix emoji in README.md
2022-02-18 10:39:34 +01:00
Travis CI User
da2db2c339 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-11 14:16:58 +00:00
Travis CI User
84b62f2386 [maven-release-plugin][skip ci] prepare release v1.72 2022-02-11 14:16:56 +00:00
dependabot[bot]
bcc3c30985 Bump jackson-databind from 2.9.8 to 2.9.10.8 (#142) 2022-02-11 14:12:20 +00:00
Travis CI User
c457fafc1b [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-09 11:18:52 +00:00
Travis CI User
fcf7d017b0 [maven-release-plugin][skip ci] prepare release v1.71 2022-02-09 11:18:50 +00:00
dependabot[bot]
94be653375 Bump groovy from 2.5.9 to 2.5.14 (#106) 2022-02-09 11:14:09 +00:00
Travis CI User
d9c37d5f9f [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-08 08:59:47 +00:00
Travis CI User
2555ff04f6 [maven-release-plugin][skip ci] prepare release v1.70 2022-02-08 08:59:45 +00:00
dependabot[bot]
668e14182f Bump xercesImpl from 2.12.1 to 2.12.2 (#146)
Bumps xercesImpl from 2.12.1 to 2.12.2.

---
updated-dependencies:
- dependency-name: xerces:xercesImpl
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-08 08:55:12 +00:00
Travis CI User
e0e27f6448 [maven-release-plugin][skip ci] prepare for next development iteration 2022-02-04 17:24:19 +00:00
Travis CI User
0c7fe86cc0 [maven-release-plugin][skip ci] prepare release v1.69 2022-02-04 17:24:16 +00:00
dependabot[bot]
c631cdba82 Bump swagger-parser from 1.0.23 to 1.0.31 (#4)
Bumps [swagger-parser](https://github.com/swagger-api/swagger-parser) from 1.0.23 to 1.0.31.
- [Release notes](https://github.com/swagger-api/swagger-parser/releases)
- [Commits](https://github.com/swagger-api/swagger-parser/compare/v1.0.23...v1.0.31)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-04 17:19:22 +00:00
Travis CI User
aabbcf449f [maven-release-plugin][skip ci] prepare for next development iteration 2022-01-21 09:56:16 +00:00
Travis CI User
ec4958a6e2 [maven-release-plugin][skip ci] prepare release v1.68 2022-01-21 09:56:14 +00:00
mpichura
751643bac1 ACS-2406: update tas rest api for new version storage info endpoints (#145)
* ACS-2406: Methods to handle new version storage-info endpoints

* ACS-2406: Fixing javadoc.
2022-01-21 10:52:42 +01:00
Travis CI User
08b603cc33 [maven-release-plugin][skip ci] prepare for next development iteration 2021-12-17 16:12:29 +00:00
Travis CI User
410759bb37 [maven-release-plugin][skip ci] prepare release v1.67 2021-12-17 16:12:27 +00:00
David Edwards
29b25ea8ce ACS-2201 Add new endpoints for storage-info (#144)
Models generated from swagger at branch:
feature/ACS-2336_POST_endpoints_archive_restore_content

Endpoints added:
GET nodes/{nodeId}/storage-info/{contentPropName}
POST nodes/{nodeId}/storage-info/{contentPropName}/archive
POST nodes/{nodeId}/storage-info/{contentPropName}/archive-restore
2021-12-17 11:08:53 -05:00
Travis CI User
cd6c38347f [maven-release-plugin][skip ci] prepare for next development iteration 2021-12-16 12:23:26 +00:00
Travis CI User
5ce6a774cc [maven-release-plugin][skip ci] prepare release v1.66 2021-12-16 12:23:24 +00:00
kcichonczyk
13529c0408 [ACS-2158] Prolonged retry window from 15 seconds to 1 minute (#143)
* [ACS-2158] Prolonged retry window from 15 seconds to 1 minute
2021-12-16 13:19:44 +01:00
Travis CI User
718968e77f [maven-release-plugin][skip ci] prepare for next development iteration 2021-11-09 01:10:29 +00:00
Travis CI User
2b59c3ad71 [maven-release-plugin][skip ci] prepare release v1.65 2021-11-09 01:10:27 +00:00
Jamal Kaabi-Mofrad
4c984b3b52 ACS-1795: Updated tas utility version. 2021-11-09 00:25:49 +00:00
Jamal Kaabi-Mofrad
764e47b472 ACS-1795: Updated tas utility version. 2021-11-08 23:41:24 +00:00
Travis CI User
0c24c55296 [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-31 15:32:23 +00:00
Travis CI User
5d74ca8323 [maven-release-plugin][skip ci] prepare release v1.64 2021-08-31 15:32:20 +00:00
Sara
a45137fc48 ACS-1881 Enable tests for DAUs (#140) 2021-08-31 16:28:38 +01:00
Travis CI User
3595ffd7cf [maven-release-plugin][skip ci] prepare for next development iteration 2021-08-19 10:27:50 +00:00
Travis CI User
586f5f546c [maven-release-plugin][skip ci] prepare release v1.63 2021-08-19 10:27:47 +00:00
tiagosalvado10
f129a47be0 [ACS-1893] Added maven profiles for alternate rest-api-explorer version. Added isDirectAccessUrlEnabled flag to status info model (#139) 2021-08-19 11:24:08 +01:00
Travis CI User
f8287e59e2 [maven-release-plugin][skip ci] prepare for next development iteration 2021-07-20 22:27:16 +00:00
Travis CI User
79c7310a34 [maven-release-plugin][skip ci] prepare release v1.62 2021-07-20 22:27:10 +00:00
dependabot-preview[bot]
5039d4d0d0 Bump slf4j-api from 1.7.31 to 1.7.32 (#137) 2021-07-20 22:23:27 +00:00
Travis CI User
f68299aa37 [maven-release-plugin][skip ci] prepare for next development iteration 2021-06-23 07:53:14 +00:00
Travis CI User
e63b0a8751 [maven-release-plugin][skip ci] prepare release v1.61 2021-06-23 07:53:08 +00:00
Andrei Forascu
3d2b7a733a ACS-1585: - add support for storage classes (#136) 2021-06-23 10:49:33 +03:00
Travis CI User
4bcffcd820 [maven-release-plugin][skip ci] prepare for next development iteration 2021-06-18 22:36:15 +00:00
Travis CI User
c552a7b660 [maven-release-plugin][skip ci] prepare release v1.60 2021-06-18 22:36:10 +00:00
dependabot-preview[bot]
3f41f8e4eb Bump slf4j-api from 1.7.30 to 1.7.31 (#135) 2021-06-18 22:25:24 +00:00
Travis CI User
71ed6d1155 [maven-release-plugin][skip ci] prepare for next development iteration 2021-04-30 22:22:53 +00:00
Travis CI User
c04a83e3c2 [maven-release-plugin][skip ci] prepare release v1.59 2021-04-30 22:22:48 +00:00
dependabot-preview[bot]
e946bfcf71 Bump maven-project-info-reports-plugin from 3.1.1 to 3.1.2 (#129) 2021-04-30 22:18:55 +00:00
Travis CI User
1cee8f46bd [maven-release-plugin][skip ci] prepare for next development iteration 2021-04-20 12:45:44 +00:00
Travis CI User
dfb05bb00e [maven-release-plugin][skip ci] prepare release v1.58 2021-04-20 12:45:39 +00:00
Davide
c33dde8f41 SEARCH-2748 add missing field and change the type for some field than can be included from primitive to boxed type in order to assert if it is present or not in the request (#126) 2021-04-20 14:41:39 +02:00
Travis CI User
f93d07d116 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-25 10:35:24 +00:00
Travis CI User
a88d0b07f2 [maven-release-plugin][skip ci] prepare release v1.57 2021-03-25 10:35:20 +00:00
Nithin Nambiar
da6e08b0e3 ACS-276 rendition version support (#122) 2021-03-25 10:09:24 +00:00
Travis CI User
48c0546bd0 [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-03 14:14:09 +00:00
Travis CI User
2c0fb3fe95 [maven-release-plugin][skip ci] prepare release v1.56 2021-03-03 14:14:03 +00:00
Simona C
ea308c1c0a Fix SyncServiceAPITest with unrecognized field (#121) 2021-03-03 16:10:04 +02:00
Travis CI User
a02f0e7e2f [maven-release-plugin][skip ci] prepare for next development iteration 2021-03-02 13:23:04 +00:00
14 changed files with 680 additions and 30 deletions

View File

@@ -0,0 +1,17 @@
version: 2
registries:
maven-alfresco-internal:
type: maven-repository
url: https://artifacts.alfresco.com/nexus/content/groups/internal
username: ${{secrets.NEXUS_USERNAME}}
password: ${{secrets.NEXUS_PASSWORD}}
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: daily
time: "22:00"
timezone: Europe/London
open-pull-requests-limit: 99
registries:
- maven-alfresco-internal

View File

@@ -20,7 +20,7 @@ Back to [TAS Master Documentation](https://git.alfresco.com/tas/alfresco-tas-uti
* [Configuration](#configuration)
* [How to enable Test Rail Integration?](#how-to-enable-test-rail-integration)
* [Reference](#reference)
* [Change Log](docs/CHANGELOG.md) :glowing_star:
* [Change Log](docs/CHANGELOG.md) 🌟
* [Contributors](#contributors)
* [Releasing](#releasing)
* [License](#license)

View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>restapi</artifactId>
<name>alfresco-tas-restapi</name>
<version>1.55</version>
<version>1.75</version>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-super-pom</artifactId>
@@ -28,13 +28,13 @@
<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.21</tas.utility.version>
<rest-assured.version>3.3.0</rest-assured.version>
<tas.utility.version>3.0.48</tas.utility.version>
<rest-assured.version>4.5.1</rest-assured.version>
<httpclient-osgi-version>4.5.3</httpclient-osgi-version>
<json-path.version>3.3.0</json-path.version>
<json-path.version>4.4.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>
<jackson-databind.version>2.9.10.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.12.0</commons-lang3.version>
@@ -44,11 +44,29 @@
<java.version>11</java.version>
</properties>
<profiles>
<profile>
<id>rest-api-explorer-master</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<rest.api.explorer.branch>master</rest.api.explorer.branch>
</properties>
</profile>
<profile>
<id>rest-api-explorer-52N</id>
<properties>
<rest.api.explorer.branch>5.2.N</rest.api.explorer.branch>
</properties>
</profile>
</profiles>
<scm>
<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.55</tag>
<tag>v1.75</tag>
</scm>
<issueManagement>
@@ -120,11 +138,11 @@
</executions>
<configuration>
<arguments>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/5.2.N/src/main/webapp/definitions/alfresco-auth.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/5.2.N/src/main/webapp/definitions/alfresco-core.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/5.2.N/src/main/webapp/definitions/alfresco-discovery.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/5.2.N/src/main/webapp/definitions/alfresco-search.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/5.2.N/src/main/webapp/definitions/alfresco-workflow.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-auth.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-core.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-discovery.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-search.yaml</argument>
<argument>https://raw.githubusercontent.com/Alfresco/rest-api-explorer/${rest.api.explorer.branch}/src/main/webapp/definitions/alfresco-workflow.yaml</argument>
</arguments>
<mainClass>org.alfresco.rest.core.swagger.Generator</mainClass>
</configuration>
@@ -255,14 +273,14 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
<version>1.7.32</version>
</dependency>
<!-- swagger parser -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-parser</artifactId>
<version>1.0.23</version>
<version>1.0.31</version>
<exclusions>
<exclusion>
<artifactId>commons-lang3</artifactId>
@@ -274,7 +292,7 @@
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.12.1</version>
<version>2.12.2</version>
</dependency>
<!--fixing java.lang.ClassCastException: class [B cannot be cast to class [C ([B and [C are in module java.base of loader 'bootstrap') -->
@@ -282,7 +300,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.9</version>
<version>2.5.14</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
@@ -299,7 +317,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.1</version>
<version>3.1.2</version>
<reportSets>
<reportSet>
<reports>

View File

@@ -1129,6 +1129,20 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
this.serverURI = restProperties.envProperty().getSolrServerUrl();
this.serverPort = restProperties.envProperty().getSolrPort();
configureServerEndpoint();
configureSecretHeader();
}
/**
* Adds the secret Solr header if it has been set
*/
private void configureSecretHeader()
{
String solrSecret = restProperties.envProperty().getSolrSecret();
if(!solrSecret.isEmpty())
{
String solrSecretName = restProperties.envProperty().getSolrSecretName();
configureRequestSpec().addHeader(solrSecretName, solrSecret);
}
}
/**

View File

@@ -0,0 +1,60 @@
/*
* Copyright 2021 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.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'dedwards' on '2021-12-16 08:32' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestArchiveContentRequestModel extends TestModel implements IRestModel<RestArchiveContentRequestModel>
{
@Override
public ModelAssertion<RestArchiveContentRequestModel> assertThat()
{
return new ModelAssertion<RestArchiveContentRequestModel>(this);
}
@Override
public ModelAssertion<RestArchiveContentRequestModel> and()
{
return assertThat();
}
@JsonProperty(value = "entry")
RestArchiveContentRequestModel model;
@Override
public RestArchiveContentRequestModel onModel()
{
return model;
}
/**
A map (String-String) of archive request properties for given content.
*/
private Object archiveProperties;
public Object getArchiveProperties()
{
return this.archiveProperties;
}
public void setArchiveProperties(Object archiveProperties)
{
this.archiveProperties = archiveProperties;
}
}

View File

@@ -2,6 +2,8 @@ package org.alfresco.rest.model;
import org.alfresco.utility.model.TestModel;
import java.util.Set;
/**
* Created by Claudia Agache on 11/11/2016.
*/
@@ -11,6 +13,7 @@ public class RestContentModel extends TestModel
private String mimeTypeName;
private String mimeType;
private String encoding;
private Set<String> storageClasses;
public int getSizeInBytes()
{
@@ -51,4 +54,14 @@ public class RestContentModel extends TestModel
{
this.encoding = encoding;
}
public Set<String> getStorageClasses()
{
return storageClasses;
}
public void setStorageClasses(Set<String> storageClasses)
{
this.storageClasses = storageClasses;
}
}

View File

@@ -0,0 +1,79 @@
/*
* Copyright 2021 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 java.util.Map;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'dedwards' on '2021-12-16 08:32' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestContentStorageInfoModel extends TestModel implements IRestModel<RestContentStorageInfoModel>
{
@Override
public ModelAssertion<RestContentStorageInfoModel> assertThat()
{
return new ModelAssertion<RestContentStorageInfoModel>(this);
}
@Override
public ModelAssertion<RestContentStorageInfoModel> and()
{
return assertThat();
}
@JsonProperty(value = "entry")
RestContentStorageInfoModel model;
@Override
public RestContentStorageInfoModel onModel()
{
return model;
}
/**
Content type property identifier (e.g. cm:content). Inside this object only colon (':') delimiter for namespace-prefix will be used.
*/
@JsonProperty(required = true)
private String id;
/**
A map (String-String) of storage properties for given content.
*/
private Map<String, String> storageProperties;
public String getId()
{
return this.id;
}
public void setId(String id)
{
this.id = id;
}
public Map<String, String> getStorageProperties()
{
return this.storageProperties;
}
public void setStorageProperties(Map<String, String> storageProperties)
{
this.storageProperties = storageProperties;
}
}

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2021 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.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'dedwards' on '2021-12-16 08:32' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
*/
public class RestRestoreArchivedContentRequestModel extends TestModel implements IRestModel<RestRestoreArchivedContentRequestModel>
{
@Override
public ModelAssertion<RestRestoreArchivedContentRequestModel> assertThat()
{
return new ModelAssertion<RestRestoreArchivedContentRequestModel>(this);
}
@Override
public ModelAssertion<RestRestoreArchivedContentRequestModel> and()
{
return assertThat();
}
@JsonProperty(value = "entry")
RestRestoreArchivedContentRequestModel model;
@Override
public RestRestoreArchivedContentRequestModel onModel()
{
return model;
}
/**
Restore from archive priority (Standard/High - to be mapped to Storage Provider specific values in Cloud Connectors)
*/
private String restorePriority;
public String getRestorePriority()
{
return this.restorePriority;
}
public void setRestorePriority(String restorePriority)
{
this.restorePriority = restorePriority;
}
}

View File

@@ -1,5 +1,7 @@
package org.alfresco.rest.model;
import java.util.List;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
import org.alfresco.utility.model.TestModel;
@@ -7,7 +9,7 @@ import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by 'aforascu' on '2018-01-10 16:02' from 'Alfresco Content Services REST API' swagger file
* Generated by 'tsalvado' on '2021-08-18 21:15' from 'Alfresco Content Services REST API' swagger file
* Generated from 'Alfresco Content Services REST API' swagger file
* Base Path {@linkplain /alfresco/api}
*/
@@ -47,6 +49,9 @@ public class RestStatusInfoModel extends TestModel implements IRestModel<RestSta
@JsonProperty(required = true)
private boolean isThumbnailGenerationEnabled;
@JsonProperty(required = true)
private boolean isDirectAccessUrlEnabled;
public boolean getIsReadOnly()
{
return this.isReadOnly;
@@ -86,5 +91,15 @@ public class RestStatusInfoModel extends TestModel implements IRestModel<RestSta
{
this.isThumbnailGenerationEnabled = isThumbnailGenerationEnabled;
}
public boolean getIsDirectAccessUrlEnabled()
{
return this.isDirectAccessUrlEnabled;
}
public void setIsDirectAccessUrlEnabled(boolean isDirectAccessUrlEnabled)
{
this.isDirectAccessUrlEnabled = isDirectAccessUrlEnabled;
}
}

View File

@@ -39,6 +39,9 @@ public class RestSyncServiceComponentModel extends TestModel
@JsonProperty
private int duration;
@JsonProperty
private String timestamp;
public Boolean getHealthy()
{
return healthy;
@@ -54,4 +57,9 @@ public class RestSyncServiceComponentModel extends TestModel
return duration;
}
public String getTimestamp()
{
return timestamp;
}
}

View File

@@ -0,0 +1,212 @@
/*
* Copyright 2021 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.requests;
import org.alfresco.rest.core.RestRequest;
import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.core.RestWrapper;
import org.alfresco.rest.model.RestArchiveContentRequestModel;
import org.alfresco.rest.model.RestContentStorageInfoModel;
import org.alfresco.rest.model.RestRestoreArchivedContentRequestModel;
import org.alfresco.utility.model.TestModel;
import org.springframework.http.HttpMethod;
public class ContentStorageInformation extends ModelRequest<ContentStorageInformation>
{
private static final String BASE_PATH = "nodes/{nodeId}/storage-info/{contentPropName}";
private static final String VERSIONS_BASE_PATH = "nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropName}";
private static final String ARCHIVE_PATH_SUFFIX = "/archive";
private static final String ARCHIVE_RESTORE_PATH_SUFFIX = "/archive-restore";
private String nodeId;
private String contentPropName;
private String versionId;
public ContentStorageInformation(RestWrapper restWrapper)
{
super(restWrapper);
}
public ContentStorageInformation withNodeId(String nodeId)
{
this.nodeId = nodeId;
return this;
}
public ContentStorageInformation withContentPropName(String contentPropName)
{
this.contentPropName = contentPropName;
return this;
}
public ContentStorageInformation withVersionId(String versionId)
{
this.versionId = versionId;
return this;
}
/**
* Get Content Storage Properties using GET call on "nodes/{nodeId}/storage-info/{contentPropName}"
* @return
*/
public RestContentStorageInfoModel getStorageInfo()
{
return getStorageInfo(nodeId, contentPropName);
}
/**
* Get Content Version Storage Properties using GET call on "nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropName}"
* @return
*/
public RestContentStorageInfoModel getVersionStorageInfo()
{
return getVersionStorageInfo(nodeId, versionId, contentPropName);
}
/**
* Get Content Storage Properties using GET call on "nodes/{nodeId}/storage-info/{contentPropName}"
* @param nodeId The nodeId
* @param contentPropName The content property QNAME ie. "cm:content"
* @return
*/
public RestContentStorageInfoModel getStorageInfo(String nodeId, String contentPropName)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, BASE_PATH, nodeId, contentPropName);
return restWrapper.processModel(RestContentStorageInfoModel.class, request);
}
/**
* Get Content Version Storage Properties using GET call on "nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropName}"
* @param nodeId The nodeId
* @param versionId The versionId
* @param contentPropName The content property QNAME ie. "cm:content"
* @return object of {@link RestContentStorageInfoModel}
*/
public RestContentStorageInfoModel getVersionStorageInfo(String nodeId, String versionId, String contentPropName)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, VERSIONS_BASE_PATH, nodeId, versionId, contentPropName);
return restWrapper.processModel(RestContentStorageInfoModel.class, request);
}
/**
* Send content to archive using POST call on "nodes/{nodeId}/storage-info/{contentPropName}/archive"
*
* @param archiveContentRequest The request body
* @return
*/
public RestResponse requestArchiveContent(RestArchiveContentRequestModel archiveContentRequest)
{
return requestArchiveContent(nodeId, contentPropName, archiveContentRequest);
}
/**
* Send version content to archive using POST call on "nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropName}/archive"
*
* @param archiveContentRequest The request body
* @return
*/
public RestResponse requestArchiveVersionContent(RestArchiveContentRequestModel archiveContentRequest)
{
return requestArchiveVersionContent(nodeId, contentPropName, versionId, archiveContentRequest);
}
/**
* Send content to archive using POST call on "nodes/{nodeId}/storage-info/{contentPropName}/archive"
*
* @param nodeId The nodeId
* @param contentPropName The content property QNAME ie. "cm:content"
* @param archiveContentRequest The request body
* @return
*/
public RestResponse requestArchiveContent(String nodeId, String contentPropName, RestArchiveContentRequestModel archiveContentRequest)
{
RestRequest request = createRestRequestWithBody(HttpMethod.POST, archiveContentRequest, BASE_PATH + ARCHIVE_PATH_SUFFIX, nodeId, contentPropName);
return restWrapper.process(request);
}
/**
* Send version content to archive using POST call on "nodes/{nodeId}/versions/{versionId}/storage-info/{contentPropName}/archive"
*
* @param nodeId The nodeId
* @param contentPropName The content property QNAME ie. "cm:content"
* @param versionId The versionId
* @param archiveContentRequest The request body
* @return
*/
public RestResponse requestArchiveVersionContent(String nodeId, String contentPropName, String versionId, RestArchiveContentRequestModel archiveContentRequest)
{
RestRequest request = createRestRequestWithBody(HttpMethod.POST, archiveContentRequest, VERSIONS_BASE_PATH + ARCHIVE_PATH_SUFFIX, nodeId, versionId, contentPropName);
return restWrapper.process(request);
}
/**
* Restore content from archive using POST call on "nodes/{nodeId}/storage-info/{contentPropName}/archive-restore"
*
* @param restoreArchivedContentRequest The request body
* @return
*/
public RestResponse requestRestoreContentFromArchive(RestRestoreArchivedContentRequestModel restoreArchivedContentRequest)
{
return requestRestoreContentFromArchive(nodeId, contentPropName, restoreArchivedContentRequest);
}
/**
* Restore version content from archive using POST call on "nodes/{nodeId}/storage-info/versions/{versionId}/{contentPropName}/archive-restore"
*
* @param restoreArchivedContentRequest The request body
* @return
*/
public RestResponse requestRestoreVersionContentFromArchive(RestRestoreArchivedContentRequestModel restoreArchivedContentRequest)
{
return requestRestoreVersionContentFromArchive(nodeId, contentPropName, versionId, restoreArchivedContentRequest);
}
/**
* Restore content from archive using POST call on "nodes/{nodeId}/storage-info/{contentPropName}/archive-restore"
*
* @param nodeId The nodeId
* @param contentPropName The content property QNAME ie. "cm:content"
* @param restoreArchivedContentRequest The request body
* @return
*/
public RestResponse requestRestoreContentFromArchive(String nodeId, String contentPropName, RestRestoreArchivedContentRequestModel restoreArchivedContentRequest)
{
RestRequest request = createRestRequestWithBody(HttpMethod.POST, restoreArchivedContentRequest, BASE_PATH +
ARCHIVE_RESTORE_PATH_SUFFIX, nodeId, contentPropName);
return restWrapper.process(request);
}
/**
* Restore version content from archive using POST call on "nodes/{nodeId}/storage-info/{contentPropName}/archive-restore"
*
* @param nodeId The nodeId
* @param contentPropName The content property QNAME ie. "cm:content"
* @param versionId The versionId
* @param restoreArchivedContentRequest The request body
* @return
*/
public RestResponse requestRestoreVersionContentFromArchive(String nodeId, String contentPropName, String versionId,
RestRestoreArchivedContentRequestModel restoreArchivedContentRequest)
{
RestRequest request = createRestRequestWithBody(HttpMethod.POST, restoreArchivedContentRequest, VERSIONS_BASE_PATH +
ARCHIVE_RESTORE_PATH_SUFFIX, nodeId, versionId, contentPropName);
return restWrapper.process(request);
}
private RestRequest createRestRequestWithBody(HttpMethod httpMethod, TestModel request, String path, String... pathParams)
{
if (request != null)
{
return RestRequest.requestWithBody(httpMethod, request.toJson(), path, pathParams);
}
else
{
return RestRequest.simpleRequest(httpMethod, path, pathParams);
}
}
}

View File

@@ -371,6 +371,23 @@ public class Node extends ModelRequest<Node>
restWrapper.processEmptyModel(request);
}
/**
* Create node version rendition using POST call on '/nodes/{nodeId}/versions/{versionId}/renditions'
*
* @param renditionId id of rendition to be created
* @param versionId version id of node
* @return
* @throws Exception
*/
public void createNodeVersionRendition(String renditionId, String versionId) throws Exception
{
String postBody = JsonBodyGenerator.keyValueJson("id", renditionId);
RestRequest request = RestRequest
.requestWithBody(HttpMethod.POST, postBody, "nodes/{nodeId}/versions/{versionId}/renditions",
repoModel.getNodeRef(), versionId);
restWrapper.processEmptyModel(request);
}
/**
* Check if specified rendition exists and if not
* create node rendition using POST call on '/nodes/{nodeId}/renditions'
@@ -403,6 +420,22 @@ public class Node extends ModelRequest<Node>
return restWrapper.processModel(RestRenditionInfoModel.class, request);
}
/**
* Get node version rendition using GET call on '/nodes/{nodeId}/versions/{versionId}renditions/{renditionId}
*
* @param renditionId id of rendition to be retrieved
* @param versionId versionId of the node
* @return
* @throws Exception
*/
public RestRenditionInfoModel getNodeVersionRendition(String renditionId, String versionId) throws Exception
{
RestRequest request = RestRequest
.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}",
repoModel.getNodeRef(), versionId, renditionId);
return restWrapper.processModel(RestRenditionInfoModel.class, request);
}
/**
* Get node rendition using GET call on 'nodes/{nodeId}/renditions/{renditionId} Please note that it retries to get
* the renditions response several times because on the alfresco server the rendition can take a while to be created.
@@ -426,6 +459,30 @@ public class Node extends ModelRequest<Node>
}
return renditions;
}
/**
* Get node version rendition using GET call on 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId} Please note that it retries to get
* the renditions response several times because on the alfresco server the rendition can take a while to be created.
*
* @return
* @throws Exception
*/
public RestRenditionInfoModel getNodeVersionRenditionUntilIsCreated(String renditionId, String versionId) throws Exception
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}",repoModel.getNodeRef(), versionId, renditionId);
RestRenditionInfoModel renditions = restWrapper.processModel(RestRenditionInfoModel.class, request);
int retry = 0;
if (Integer.valueOf(restWrapper.getStatusCode()).equals(HttpStatus.OK.value()))
{
while (renditions.getStatus().equals("NOT_CREATED") && retry < Utility.retryCountSeconds - 8)
{
Utility.waitToLoopTime(1);
renditions = restWrapper.processModel(RestRenditionInfoModel.class, request);
retry++;
}
}
return renditions;
}
/**
* Get node rendition content using GET call on
@@ -442,6 +499,32 @@ public class Node extends ModelRequest<Node>
renditionId);
RestResponse response = restWrapper.process(request);
int retry = 0;
//Multiplied by '4' because AI rendition test cases need more time (~30 seconds) - see ACS-2158
while (Integer.valueOf(response.getStatusCode()).equals(HttpStatus.NOT_FOUND.value()) && retry < (4 * Utility.retryCountSeconds))
{
Utility.waitToLoopTime(1);
response = restWrapper.process(request);
retry++;
}
return response;
}
/**
* Get node version rendition content using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content Please note that it
* retries to get the renditions response several times because on the
* alfresco server the rendition can take a while to be created.
*
* @return
* @throws Exception
*/
public RestResponse getNodeVersionRenditionContentUntilIsCreated(String renditionId, String versionId) throws Exception
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content", repoModel.getNodeRef(),
versionId, renditionId);
RestResponse response = restWrapper.process(request);
int retry = 0;
while (Integer.valueOf(response.getStatusCode()).equals(HttpStatus.NOT_FOUND.value()) && retry < Utility.retryCountSeconds)
{
Utility.waitToLoopTime(1);
@@ -466,6 +549,20 @@ public class Node extends ModelRequest<Node>
return restWrapper.process(request);
}
/**
* Get node version rendition content using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
*
* @return
* @throws Exception
*/
public RestResponse getNodeVersionRenditionContent(String renditionId, String versionId) throws Exception
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content", repoModel.getNodeRef(),
versionId, renditionId);
return restWrapper.process(request);
}
/**
* Get rendition information for available renditions for the node using GET call on
* 'nodes/{nodeId}/renditions'
@@ -479,6 +576,20 @@ public class Node extends ModelRequest<Node>
return restWrapper.processModels(RestRenditionInfoModelCollection.class, request);
}
/**
* Get rendition information for available renditions for the node version using GET call on
* 'nodes/{nodeId}/versions/{versionId}/renditions'
* @return
* @throws Exception
*/
public RestRenditionInfoModelCollection getNodeVersionRenditionsInfo(String versionId) throws Exception
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.GET, "nodes/{nodeId}/versions/{versionId}/renditions?{parameters}", repoModel.getNodeRef(),
versionId, restWrapper.getParameters());
return restWrapper.processModels(RestRenditionInfoModelCollection.class, request);
}
/**
* Get a node's children using GET call 'nodes/{nodeId}/children
*
@@ -789,9 +900,18 @@ public class Node extends ModelRequest<Node>
* Get Direct Access URL for a node
* @return
*/
public RestResponse createDirectAccessURL()
public RestResponse createDirectAccessURL(String postBody)
{
RestRequest request = RestRequest.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/request-content-url", this.repoModel.getNodeRef());
RestRequest request;
if (postBody == null)
{
request = RestRequest.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/request-direct-access-url", this.repoModel.getNodeRef());
}
else
{
request = RestRequest.requestWithBody(HttpMethod.POST, postBody, "nodes/{nodeId}/request-direct-access-url", this.repoModel.getNodeRef());
}
return this.restWrapper.process(request);
}
@@ -803,7 +923,7 @@ public class Node extends ModelRequest<Node>
public RestResponse createDirectAccessURLforVersion(String versionId)
{
RestRequest request = RestRequest
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/request-content-url", this.repoModel.getNodeRef(), versionId);
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/request-direct-access-url", this.repoModel.getNodeRef(), versionId);
return this.restWrapper.process(request);
}
@@ -816,7 +936,7 @@ public class Node extends ModelRequest<Node>
public RestResponse createDirectAccessURLforVersionAndRendition(String versionId, String renditionId)
{
RestRequest request = RestRequest
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/request-content-url", this.repoModel.getNodeRef(), versionId, renditionId);
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/request-direct-access-url", this.repoModel.getNodeRef(), versionId, renditionId);
return this.restWrapper.process(request);
}
@@ -828,8 +948,23 @@ public class Node extends ModelRequest<Node>
public RestResponse createDirectAccessURLforRendition(String renditionId)
{
RestRequest request = RestRequest
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/renditions/{renditionId}/request-content-url", this.repoModel.getNodeRef(), renditionId);
.simpleRequest(HttpMethod.POST, "nodes/{nodeId}/renditions/{renditionId}/request-direct-access-url", this.repoModel.getNodeRef(), renditionId);
return this.restWrapper.process(request);
}
}
public ContentStorageInformation usingStorageInfo(String contentPropName)
{
return new ContentStorageInformation(restWrapper)
.withNodeId(repoModel.getNodeRef())
.withContentPropName(contentPropName);
}
public ContentStorageInformation usingVersionStorageInfo(String contentPropName, String versionId)
{
return new ContentStorageInformation(restWrapper)
.withNodeId(repoModel.getNodeRef())
.withContentPropName(contentPropName)
.withVersionId(versionId);
}
}

View File

@@ -7,6 +7,7 @@ import org.alfresco.rest.model.RestTagModel;
import org.alfresco.rest.model.RestTagModelsCollection;
import org.alfresco.rest.requests.Actions;
import org.alfresco.rest.requests.Audit;
import org.alfresco.rest.requests.ContentStorageInformation;
import org.alfresco.rest.requests.Downloads;
import org.alfresco.rest.requests.Groups;
import org.alfresco.rest.requests.ModelRequest;
@@ -98,6 +99,11 @@ public class RestCoreAPI extends ModelRequest<RestCoreAPI>
return new Node(restWrapper);
}
public ContentStorageInformation usingStorageInfo()
{
return new ContentStorageInformation(restWrapper);
}
/**
* Provides DSL of all REST calls under <code>/people</code> API path
*

View File

@@ -1,6 +1,7 @@
package org.alfresco.rest.search;
import java.util.List;
import java.util.Map;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.rest.core.assertion.ModelAssertion;
@@ -40,7 +41,10 @@ public class SearchNodeModel extends TestModel implements IRestModel<SearchNodeM
private boolean isFile;
@JsonProperty
private boolean isLocked;
private Boolean isLocked;
@JsonProperty
private Map<String, Object> association;
@JsonProperty(required = true)
private String modifiedAt;
@@ -56,7 +60,7 @@ public class SearchNodeModel extends TestModel implements IRestModel<SearchNodeM
private String parentId;
private boolean isLink;
private Boolean isLink;
private RestContentModel content;
@@ -73,6 +77,16 @@ public class SearchNodeModel extends TestModel implements IRestModel<SearchNodeM
private String location;
public Map<String, Object> getAssociation()
{
return association;
}
public void setAssociation(Map<String, Object> association)
{
this.association = association;
}
public SearchScoreModel getSearch()
{
return search;
@@ -161,12 +175,12 @@ public class SearchNodeModel extends TestModel implements IRestModel<SearchNodeM
this.isFile = isFile;
}
public boolean isLocked()
public Boolean isLocked()
{
return isLocked;
}
public void setLocked(boolean isLocked)
public void setLocked(Boolean isLocked)
{
this.isLocked = isLocked;
}
@@ -221,12 +235,12 @@ public class SearchNodeModel extends TestModel implements IRestModel<SearchNodeM
this.parentId = parentId;
}
public boolean isLink()
public Boolean isLink()
{
return isLink;
}
public void setLink(boolean isLink)
public void setIsLink(Boolean isLink)
{
this.isLink = isLink;
}