mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
272 Commits
tas-restap
...
tas-restap
Author | SHA1 | Date | |
---|---|---|---|
|
3a8fde44ec | ||
|
646bbe3436 | ||
|
7c706dbac6 | ||
|
2ab4c70217 | ||
|
ed0bbf576d | ||
|
f3e43badfe | ||
|
e99b6a98de | ||
|
64644505b3 | ||
|
aca9e15668 | ||
|
1852309798 | ||
|
ee2e248e39 | ||
|
b2f90ff6bc | ||
|
59641e833e | ||
|
6dd7d32b2e | ||
|
83bf4d0a2f | ||
|
1af9f31b68 | ||
|
2b98e73468 | ||
|
966dd7d144 | ||
|
375c68f932 | ||
|
8ce6117a95 | ||
|
08e393c39f | ||
|
2f4303f4eb | ||
|
953a1cc3f9 | ||
|
23a1ddca6a | ||
|
439dd3771f | ||
|
df7ebe30b3 | ||
|
c482153183 | ||
|
cdbd153151 | ||
|
8564f9eace | ||
|
b5d7500ecc | ||
|
e875e1fbbe | ||
|
32179dc810 | ||
|
97ed056103 | ||
|
af97fd5d6a | ||
|
cef6e8fc7b | ||
|
31d0578a98 | ||
|
2e1ae3bb69 | ||
|
9af05df046 | ||
|
71801e9e5e | ||
|
52149bf292 | ||
|
6cb07e1b86 | ||
|
fa3df0987d | ||
|
fde20c948f | ||
|
9ea1336a18 | ||
|
b007740dd0 | ||
|
15b10ba605 | ||
|
8983a11d3d | ||
|
6fd482b492 | ||
|
0a0c90a230 | ||
|
109af6abff | ||
|
43532eebf5 | ||
|
5dc3424fe2 | ||
|
133670cd17 | ||
|
909e95685e | ||
|
91e7b0d66f | ||
|
cc40cf05a9 | ||
|
4629c20b51 | ||
|
ee88946b1c | ||
|
b1faf15806 | ||
|
367ad20fb7 | ||
|
80e770f2da | ||
|
e8cf525792 | ||
|
a594341bb5 | ||
|
058e8d6302 | ||
|
91fcbb0b59 | ||
|
830898c605 | ||
|
d214040bc8 | ||
|
1b071cb555 | ||
|
37e04ee2fc | ||
|
10f32aa74c | ||
|
bea386ddc8 | ||
|
2449d1d8f3 | ||
|
3883fd22e3 | ||
|
183ac4c7cd | ||
|
fa1b8d46dd | ||
|
df35137d12 | ||
|
1d1b454978 | ||
|
deaee78d09 | ||
|
9e3c144a7d | ||
|
d0b100a88b | ||
|
9d807242ee | ||
|
5f2b5fe9af | ||
|
7edee67997 | ||
|
5f151aaa96 | ||
|
dcf25d89d0 | ||
|
7d5aafecb5 | ||
|
1d8f1bd8a2 | ||
|
fe04e621e1 | ||
|
ee03296733 | ||
|
c5e89242ba | ||
|
0fbeffe80a | ||
|
d1e9cf0144 | ||
|
b51146c868 | ||
|
515f243911 | ||
|
a7263931f5 | ||
|
2c23c674a7 | ||
|
2b929b747a | ||
|
1fd36cf903 | ||
|
d45bc9e6c6 | ||
|
6ae2ff6cd9 | ||
|
e3fbdd5904 | ||
|
575f4f26c0 | ||
|
c11cd252d4 | ||
|
74141cf4b7 | ||
|
0105b87153 | ||
|
c2ed150a7d | ||
|
d47bf8c3ac | ||
|
6372e9124c | ||
|
dcf5e8325b | ||
|
ebabe9a16b | ||
|
bbb6d610fa | ||
|
20ccedfee8 | ||
|
fcc1eef0f5 | ||
|
f757fb6be8 | ||
|
439c578b8d | ||
|
55c53a6789 | ||
|
ea1d13a5a6 | ||
|
0b0b89a1be | ||
|
3e7200d65f | ||
|
9ed945504f | ||
|
ab18be55a4 | ||
|
80548d0c3f | ||
|
11a8824fd3 | ||
|
a73610c143 | ||
|
d43872a4ab | ||
|
7a66b812bb | ||
|
732fa806e7 | ||
|
c9d115664b | ||
|
0f1f67230f | ||
|
5f303be26d | ||
|
9d27f2099a | ||
|
0588182c81 | ||
|
85cdad32d0 | ||
|
976670de8a | ||
|
a5dc3d767c | ||
|
42a42fd941 | ||
|
709ebd2e12 | ||
|
6e27433ac5 | ||
|
2d7697bf2c | ||
|
a47409268f | ||
|
db7f49afbd | ||
|
b324c07568 | ||
|
63a47002f9 | ||
|
31e557261e | ||
|
5eb54e9b0c | ||
|
f7642f99f2 | ||
|
c9f6f1bdd4 | ||
|
9c54707ad8 | ||
|
52e5b2bc8a | ||
|
62cc9419c6 | ||
|
8a0f3849ff | ||
|
55e6f1c9b1 | ||
|
d62b8b0942 | ||
|
b2c38d9bb0 | ||
|
d16d88cd22 | ||
|
c8a3ce3af5 | ||
|
fc4a47a71a | ||
|
d6a3d3db2a | ||
|
45b9f63351 | ||
|
84269b568f | ||
|
b9ee972ff2 | ||
|
c95be234a0 | ||
|
bcd304abab | ||
|
170e82ad75 | ||
|
8c6cebec1d | ||
|
d822a4d7ac | ||
|
a9d9daf6bb | ||
|
9bfbc3a623 | ||
|
7bd1efb1f0 | ||
|
6b1b240da7 | ||
|
e9ce710f3c | ||
|
26d29b0bc0 | ||
|
df8e315d48 | ||
|
458a8c17ff | ||
|
0cecb28903 | ||
|
19584814f0 | ||
|
4ac6cf4088 | ||
|
04225ce5ef | ||
|
c7464e7501 | ||
|
793ff892b7 | ||
|
7c6d35d38c | ||
|
b2dc3fa5cd | ||
|
54c91e8770 | ||
|
da2db2c339 | ||
|
84b62f2386 | ||
|
bcc3c30985 | ||
|
c457fafc1b | ||
|
fcf7d017b0 | ||
|
94be653375 | ||
|
d9c37d5f9f | ||
|
2555ff04f6 | ||
|
668e14182f | ||
|
e0e27f6448 | ||
|
0c7fe86cc0 | ||
|
c631cdba82 | ||
|
aabbcf449f | ||
|
ec4958a6e2 | ||
|
751643bac1 | ||
|
08b603cc33 | ||
|
410759bb37 | ||
|
29b25ea8ce | ||
|
cd6c38347f | ||
|
5ce6a774cc | ||
|
13529c0408 | ||
|
718968e77f | ||
|
2b59c3ad71 | ||
|
4c984b3b52 | ||
|
764e47b472 | ||
|
0c24c55296 | ||
|
5d74ca8323 | ||
|
a45137fc48 | ||
|
3595ffd7cf | ||
|
586f5f546c | ||
|
f129a47be0 | ||
|
f8287e59e2 | ||
|
79c7310a34 | ||
|
5039d4d0d0 | ||
|
f68299aa37 | ||
|
e63b0a8751 | ||
|
3d2b7a733a | ||
|
4bcffcd820 | ||
|
c552a7b660 | ||
|
3f41f8e4eb | ||
|
71ed6d1155 | ||
|
c04a83e3c2 | ||
|
e946bfcf71 | ||
|
1cee8f46bd | ||
|
dfb05bb00e | ||
|
c33dde8f41 | ||
|
f93d07d116 | ||
|
a88d0b07f2 | ||
|
da6e08b0e3 | ||
|
48c0546bd0 | ||
|
2c0fb3fe95 | ||
|
ea308c1c0a | ||
|
a02f0e7e2f | ||
|
9f32368582 | ||
|
b42b08559a | ||
|
95af4d6876 | ||
|
9c17870040 | ||
|
e93028c30e | ||
|
7741456b79 | ||
|
27f7b2ec33 | ||
|
078ae4cd32 | ||
|
ab3a0f00c4 | ||
|
829c7ef65d | ||
|
0d40d455b2 | ||
|
3d91bf154d | ||
|
d87532ce55 | ||
|
e6f97e979a | ||
|
b800d4b7e4 | ||
|
92bad68c5b | ||
|
d77e02f9a8 | ||
|
8a6584540f | ||
|
2dec33388e | ||
|
2c149b412e | ||
|
10b427209d | ||
|
a53eb13f9f | ||
|
c0a90dd32b | ||
|
d2a414f8a7 | ||
|
e484360980 | ||
|
691855bed2 | ||
|
e81a33d770 | ||
|
9dab62b490 | ||
|
44f602eee4 | ||
|
c04c149779 | ||
|
9cfa31ca63 | ||
|
a061d8d4df | ||
|
8052f7f299 | ||
|
962ce7a740 | ||
|
57603871d3 | ||
|
7d7cc446a4 |
22
packaging/tests/tas-restapi/.github/dependabot.yml
vendored
Normal file
22
packaging/tests/tas-restapi/.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
ignore:
|
||||
# httpclient 4.5.7 and above normalize URIs removing empty path params
|
||||
# check https://alfresco.atlassian.net/browse/ACS-3186 for more details
|
||||
- dependency-name: "org.apache.httpcomponents:httpclient-osgi"
|
||||
versions: ">= 4.5.7"
|
@@ -1,19 +1,13 @@
|
||||
dist: trusty
|
||||
dist: focal
|
||||
sudo: required
|
||||
language: java
|
||||
jdk:
|
||||
- openjdk11
|
||||
- openjdk17
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2/repository
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
install: travis_retry mvn install -DskipTests=true -B -V
|
||||
|
||||
stages:
|
||||
- test
|
||||
- release
|
||||
@@ -22,7 +16,7 @@ jobs:
|
||||
include:
|
||||
- stage: test
|
||||
name: "Build and test"
|
||||
script: travis_retry mvn test -Dtest=ModelAssertionTest
|
||||
script: travis_retry mvn -B -V -ntp test
|
||||
- stage: release
|
||||
name: "Push to Nexus"
|
||||
if: fork = false AND branch = master AND type != pull_request AND commit_message !~ /\[no-release\]/
|
||||
@@ -33,5 +27,5 @@ jobs:
|
||||
- git checkout -B "${TRAVIS_BRANCH}"
|
||||
# Add email to link commits to user
|
||||
- git config user.email "${GIT_EMAIL}"
|
||||
# Skip building of release commits
|
||||
- mvn --batch-mode -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform
|
||||
# Make release
|
||||
- mvn --batch-mode -ntp -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -Darguments=-DskipTests release:clean release:prepare release:perform
|
||||
|
@@ -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)
|
||||
|
@@ -4,11 +4,11 @@
|
||||
<groupId>org.alfresco.tas</groupId>
|
||||
<artifactId>restapi</artifactId>
|
||||
<name>alfresco-tas-restapi</name>
|
||||
<version>1.43</version>
|
||||
<version>1.128</version>
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-super-pom</artifactId>
|
||||
<version>10</version>
|
||||
<version>12</version>
|
||||
</parent>
|
||||
|
||||
<organization>
|
||||
@@ -28,27 +28,46 @@
|
||||
<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>
|
||||
<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>
|
||||
<tas.utility.version>3.0.56</tas.utility.version>
|
||||
<rest-assured.version>5.2.0</rest-assured.version>
|
||||
<httpclient-osgi-version>4.5.6</httpclient-osgi-version>
|
||||
<jackson-databind.version>2.13.4</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.10</commons-lang3.version>
|
||||
<scribejava-apis.version>6.9.0</scribejava-apis.version>
|
||||
<commons-lang3.version>3.12.0</commons-lang3.version>
|
||||
<scribejava-apis.version>8.3.1</scribejava-apis.version>
|
||||
<license-maven-plugin.version>2.0.1.alfresco-2</license-maven-plugin.version>
|
||||
<license.update.copyright>false</license.update.copyright>
|
||||
<license.update.dryrun>true</license.update.dryrun>
|
||||
<license.name>community</license.name>
|
||||
<test.exclude />
|
||||
<test.include />
|
||||
<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.43</tag>
|
||||
<tag>v1.128</tag>
|
||||
</scm>
|
||||
|
||||
<issueManagement>
|
||||
@@ -120,34 +139,72 @@
|
||||
</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>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireMavenVersion>
|
||||
<version>3.3</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-maven</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireMavenVersion>
|
||||
<version>3.3</version>
|
||||
</requireMavenVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>license-maven-plugin</artifactId>
|
||||
<version>${license-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>check-licenses</id>
|
||||
<phase>compile</phase>
|
||||
<goals>
|
||||
<goal>update-file-header</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
|
||||
<organizationName>Alfresco Software Limited</organizationName>
|
||||
<canUpdateCopyright>${license.update.copyright}</canUpdateCopyright>
|
||||
<failOnMissingHeader>true</failOnMissingHeader>
|
||||
<failOnNotUptodateHeader>true</failOnNotUptodateHeader>
|
||||
<licenseResolver>classpath://alfresco</licenseResolver>
|
||||
<licenseName>${license.name}</licenseName>
|
||||
<dryRun>${license.update.dryrun}</dryRun>
|
||||
<roots>
|
||||
<root>src</root>
|
||||
</roots>
|
||||
<includes>
|
||||
<include>**/*.java</include>
|
||||
<include>**/*.jsp</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-license-headers</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -204,7 +261,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>json-path</artifactId>
|
||||
<version>${json-path.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -216,7 +273,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>xml-path</artifactId>
|
||||
<version>${xml-path.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -228,7 +285,7 @@
|
||||
<dependency>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>json-schema-validator</artifactId>
|
||||
<version>${json-schema-validator.version}</version>
|
||||
<version>${rest-assured.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
@@ -251,18 +308,11 @@
|
||||
<version>${org.glassfish.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- needed for swagger parser bellow -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>1.7.30</version>
|
||||
</dependency>
|
||||
|
||||
<!-- swagger parser -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-parser</artifactId>
|
||||
<version>1.0.23</version>
|
||||
<version>1.0.61</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
@@ -274,7 +324,7 @@
|
||||
<dependency>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
<version>2.12.0</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,16 +332,22 @@
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy</artifactId>
|
||||
<version>2.5.9</version>
|
||||
<version>3.0.12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-json-->
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-json</artifactId>
|
||||
<version>2.5.9</version>
|
||||
</dependency>
|
||||
<version>3.0.12</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>4.8.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<reporting>
|
||||
@@ -299,7 +355,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<version>3.4.1</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest;
|
||||
|
||||
import org.alfresco.rest.model.RestNetworkModel;
|
||||
@@ -14,7 +39,7 @@ public abstract class NetworkDataPrep extends RestTest
|
||||
protected static String tenantDomain;
|
||||
private static boolean isInitialized = false;
|
||||
|
||||
public void init() throws Exception
|
||||
public void init()
|
||||
{
|
||||
if(!isInitialized)
|
||||
{
|
||||
@@ -23,7 +48,7 @@ public abstract class NetworkDataPrep extends RestTest
|
||||
}
|
||||
}
|
||||
|
||||
public void initialization() throws Exception
|
||||
public void initialization()
|
||||
{
|
||||
adminUserModel = dataUser.getAdminUser();
|
||||
//create first tenant Admin User.
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
@@ -64,9 +89,16 @@ public abstract class RestTest extends AbstractTestNGSpringContextTests
|
||||
protected SiteModel testSite;
|
||||
|
||||
@BeforeSuite(alwaysRun = true)
|
||||
public void checkServerHealth() throws Exception
|
||||
public void checkServerHealth()
|
||||
{
|
||||
super.springTestContextPrepareTestInstance();
|
||||
try
|
||||
{
|
||||
super.springTestContextPrepareTestInstance();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw new IllegalStateException("Error while preparing for test execution", e);
|
||||
}
|
||||
serverHealth.assertServerIsOnline();
|
||||
testSite = dataSite.createPublicRandomSite();
|
||||
}
|
||||
|
@@ -1,9 +1,32 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import org.alfresco.rest.core.assertion.IModelAssertion;
|
||||
|
||||
public interface IRestModel<Model> extends IModelAssertion<Model> {
|
||||
|
||||
public Model onModel();
|
||||
|
||||
Model onModel();
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -1,22 +1,50 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.json.Json;
|
||||
import javax.json.JsonArrayBuilder;
|
||||
import javax.json.JsonBuilderFactory;
|
||||
import javax.json.JsonObject;
|
||||
import javax.json.JsonObjectBuilder;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
import org.alfresco.dataprep.CMISUtil.Priority;
|
||||
import org.alfresco.rest.model.RestProcessVariableModel;
|
||||
import org.alfresco.rest.model.RestVariableModel;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.model.FileModel;
|
||||
import org.alfresco.utility.model.FolderModel;
|
||||
import org.alfresco.utility.model.RepoTestModel;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
|
||||
/**
|
||||
@@ -158,6 +186,15 @@ public class JsonBodyGenerator
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
public static String siteGroup(String authorityId, UserRole role)
|
||||
{
|
||||
Utility.checkObjectIsInitialized(authorityId, "authorityId");
|
||||
JsonObject value = defineJSON()
|
||||
.add("role", role.name())
|
||||
.add("id", authorityId).build();
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
public static String siteMemberhipRequest(String message, SiteModel siteModel, String title)
|
||||
{
|
||||
JsonObject value = defineJSON()
|
||||
@@ -278,4 +315,21 @@ public class JsonBodyGenerator
|
||||
}
|
||||
return builder.build().toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a collection of {@link TestModel} objects to JSON for a multi-entity POST request.
|
||||
*
|
||||
* @param models The entities to convert.
|
||||
* @return The JSON string.
|
||||
*/
|
||||
public static String arrayToJson(List<? extends TestModel> models)
|
||||
{
|
||||
// Rather than convert backwards and forwards between Jackson and javax objects then we handle array creation ourselves.
|
||||
StringJoiner stringJoiner = new StringJoiner(",\n");
|
||||
for (TestModel model : models)
|
||||
{
|
||||
stringJoiner.add(model.toJson());
|
||||
}
|
||||
return "[\n" + stringJoiner.toString() + "\n]";
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
@@ -5,14 +30,14 @@ import static org.alfresco.utility.report.log.Step.STEP;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.assertion.IModelsCollectionAssertion;
|
||||
import org.alfresco.rest.core.assertion.ModelsCollectionAssertion;
|
||||
import org.alfresco.rest.exception.EmptyRestModelCollectionException;
|
||||
import org.alfresco.rest.model.RestPaginationModel;
|
||||
import org.alfresco.rest.model.RestSiteModelsCollection;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Map multiple entries of JSON response to a class <T>
|
||||
*
|
||||
@@ -94,7 +119,7 @@ public abstract class RestModels<Model, ModelCollection> implements IRestModelsC
|
||||
@Override
|
||||
public ModelsCollectionAssertion<RestModels<Model, ModelCollection>> assertThat()
|
||||
{
|
||||
return new ModelsCollectionAssertion<RestModels<Model, ModelCollection>>(this);
|
||||
return new ModelsCollectionAssertion<>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -134,4 +159,4 @@ public abstract class RestModels<Model, ModelCollection> implements IRestModelsC
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import org.alfresco.utility.TasProperties;
|
||||
@@ -17,4 +42,4 @@ public class RestProperties
|
||||
{
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,17 +1,47 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
||||
import org.springframework.http.HttpMethod;
|
||||
import java.util.MissingFormatArgumentException;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import io.restassured.RestAssured;
|
||||
import org.springframework.http.HttpMethod;
|
||||
|
||||
/**
|
||||
* @author Paul Brodner
|
||||
*/
|
||||
public class RestRequest
|
||||
{
|
||||
private String body = "";
|
||||
private static final String TOKEN_REGEX = "\\{.*?}";
|
||||
private String body;
|
||||
private HttpMethod httpMethod;
|
||||
private String path;
|
||||
private Object[] pathParams;
|
||||
@@ -19,10 +49,7 @@ public class RestRequest
|
||||
|
||||
private RestRequest(HttpMethod httpMethod, String path, String... pathParams)
|
||||
{
|
||||
setHttpMethod(httpMethod);
|
||||
setPath(path);
|
||||
setPathParams(pathParams);
|
||||
STEP(toString());
|
||||
this(httpMethod, "", path, pathParams);
|
||||
}
|
||||
|
||||
private RestRequest(HttpMethod httpMethod, String body, String path, String... pathParams)
|
||||
@@ -31,7 +58,8 @@ public class RestRequest
|
||||
setPath(path);
|
||||
setPathParams(pathParams);
|
||||
setBody(body);
|
||||
STEP(toString());
|
||||
// Validate that the supplied path and pathParams are compatible.
|
||||
constructPath();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,6 +117,7 @@ public class RestRequest
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
addQueryParamsIfNeeded();
|
||||
}
|
||||
|
||||
public Object[] getPathParams()
|
||||
@@ -99,6 +128,32 @@ public class RestRequest
|
||||
public void setPathParams(Object[] pathParams)
|
||||
{
|
||||
this.pathParams = pathParams;
|
||||
addQueryParamsIfNeeded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add query parameters to the path if needed.
|
||||
* <p>
|
||||
* e.g. For a path of "api/{fruit}" and params ["apple", "size=10", "colour=red"] then this will
|
||||
* update the path to be "api/{fruit}?{param0}&{param1}" so that the tokens will be populated by
|
||||
* RestAssured to make "api/apple?size=10&colour=red".
|
||||
*/
|
||||
private void addQueryParamsIfNeeded()
|
||||
{
|
||||
// Don't do anything if the path or path params haven't been set yet.
|
||||
if (path == null || path.length() == 0 || pathParams == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int groupCount = (int) Pattern.compile(TOKEN_REGEX).matcher(path).results().count();
|
||||
if (pathParams.length > groupCount)
|
||||
{
|
||||
// Add the remaining parameters to the URL query.
|
||||
String queryParams = IntStream.range(0, pathParams.length - groupCount)
|
||||
.mapToObj(index -> "{parameter" + index + "}")
|
||||
.collect(Collectors.joining("&"));
|
||||
path += (path.contains("?") ? "&" : "?") + queryParams;
|
||||
}
|
||||
}
|
||||
|
||||
public String getContentType()
|
||||
@@ -111,6 +166,10 @@ public class RestRequest
|
||||
this.contentType = contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @throws MissingFormatArgumentException If there are not enough pathParams for the path.
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
@@ -124,14 +183,8 @@ public class RestRequest
|
||||
.append("/")
|
||||
.append(RestAssured.basePath)
|
||||
.append("/");
|
||||
|
||||
String getPathFormatted = getPath();
|
||||
if(getPath().contains("{"))
|
||||
{
|
||||
getPathFormatted = getPath().replaceAll("\\{.*?}", "%s");
|
||||
getPathFormatted = String.format(getPathFormatted, getPathParams());
|
||||
}
|
||||
sb.append(getPathFormatted);
|
||||
|
||||
sb.append(constructPath());
|
||||
|
||||
if(!getBody().isEmpty())
|
||||
{
|
||||
@@ -143,4 +196,21 @@ public class RestRequest
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate the path with the pathParams.
|
||||
*
|
||||
* @return The path with tokens replaced with values.
|
||||
* @throws MissingFormatArgumentException If there are not enough pathParams for the path.
|
||||
*/
|
||||
private String constructPath()
|
||||
{
|
||||
String getPathFormatted = getPath();
|
||||
if(getPath().contains("{"))
|
||||
{
|
||||
getPathFormatted = getPath().replaceAll(TOKEN_REGEX, "%s");
|
||||
getPathFormatted = String.format(getPathFormatted, getPathParams());
|
||||
}
|
||||
return getPathFormatted;
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import io.restassured.response.Response;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core;
|
||||
|
||||
import static io.restassured.RestAssured.basic;
|
||||
@@ -14,6 +39,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
@@ -36,6 +62,7 @@ import org.alfresco.rest.requests.authAPI.RestAuthAPI;
|
||||
import org.alfresco.rest.requests.cmisAPI.RestCmisAPI;
|
||||
import org.alfresco.rest.requests.coreAPI.RestCoreAPI;
|
||||
import org.alfresco.rest.requests.discoveryAPI.RestDiscoveryAPI;
|
||||
import org.alfresco.rest.requests.modelAPI.RestModelAPI;
|
||||
import org.alfresco.rest.requests.privateAPI.RestPrivateAPI;
|
||||
import org.alfresco.rest.requests.search.SearchAPI;
|
||||
import org.alfresco.rest.requests.search.SearchSQLAPI;
|
||||
@@ -50,6 +77,7 @@ import org.alfresco.utility.dsl.DSLWrapper;
|
||||
import org.alfresco.utility.model.StatusModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.apache.xml.serialize.OutputFormat;
|
||||
@@ -245,28 +273,7 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
public <T> T processModels(Class<T> classz, RestRequest restRequest)
|
||||
throws EmptyJsonResponseException, JsonToModelConversionException
|
||||
{
|
||||
Response returnedResponse = sendRequest(restRequest);
|
||||
|
||||
setStatusCode(String.valueOf(returnedResponse.getStatusCode()));
|
||||
|
||||
boolean responseHasErrors = checkForJsonError(returnedResponse);
|
||||
boolean responseHasExceptions = checkForJsonStatusException(returnedResponse);
|
||||
|
||||
T models = null;
|
||||
|
||||
if (!responseHasExceptions && !responseHasErrors)
|
||||
{
|
||||
try
|
||||
{
|
||||
models = returnedResponse.jsonPath().getObject("list", classz);
|
||||
validateJsonModelSchema(classz, models);
|
||||
}
|
||||
catch (Exception processError)
|
||||
{
|
||||
processError.printStackTrace();
|
||||
throw new JsonToModelConversionException(classz, processError);
|
||||
}
|
||||
}
|
||||
T models = callAPIAndCreateModel(classz, restRequest, "list");
|
||||
|
||||
if (models == null)
|
||||
{
|
||||
@@ -292,27 +299,8 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
public <T> T processModel(Class<T> classz, RestRequest restRequest)
|
||||
throws EmptyJsonResponseException, JsonToModelConversionException
|
||||
{
|
||||
Response returnedResponse = sendRequest(restRequest);
|
||||
T model = callAPIAndCreateModel(classz, restRequest, "entry");
|
||||
|
||||
setStatusCode(String.valueOf(returnedResponse.getStatusCode()));
|
||||
|
||||
boolean responseHasErrors = checkForJsonError(returnedResponse);
|
||||
boolean responseHasExceptions = checkForJsonStatusException(returnedResponse);
|
||||
|
||||
T model = null;
|
||||
|
||||
try
|
||||
{
|
||||
if (!responseHasExceptions && !responseHasErrors)
|
||||
{
|
||||
model = returnedResponse.jsonPath().getObject("entry", classz);
|
||||
validateJsonModelSchema(classz, model);
|
||||
}
|
||||
}
|
||||
catch (Exception processError)
|
||||
{
|
||||
throw new JsonToModelConversionException(classz, processError);
|
||||
}
|
||||
if (model == null)
|
||||
{
|
||||
try
|
||||
@@ -328,6 +316,41 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the request and convert the response to the appropriate model.
|
||||
*
|
||||
* @param classz The class of the model to create.
|
||||
* @param restRequest The request to send.
|
||||
* @param path The path to the part of the response from which the model should be populated.
|
||||
* @return The populated model object.
|
||||
*/
|
||||
private <T> T callAPIAndCreateModel(Class<T> classz, RestRequest restRequest, String path)
|
||||
{
|
||||
Response returnedResponse = sendRequest(restRequest);
|
||||
|
||||
setStatusCode(String.valueOf(returnedResponse.getStatusCode()));
|
||||
|
||||
boolean responseHasErrors = checkForJsonError(returnedResponse);
|
||||
boolean responseHasExceptions = checkForJsonStatusException(returnedResponse);
|
||||
|
||||
T models = null;
|
||||
|
||||
if (!responseHasExceptions && !responseHasErrors)
|
||||
{
|
||||
try
|
||||
{
|
||||
models = returnedResponse.jsonPath().getObject(path, classz);
|
||||
validateJsonModelSchema(classz, models);
|
||||
}
|
||||
catch (Exception processError)
|
||||
{
|
||||
processError.printStackTrace();
|
||||
throw new JsonToModelConversionException(classz, processError);
|
||||
}
|
||||
}
|
||||
return models;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process responses for a single model as {@link RestSiteModel}
|
||||
*
|
||||
@@ -598,7 +621,16 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
*/
|
||||
protected Response sendRequest(RestRequest restRequest)
|
||||
{
|
||||
Response returnedResponse = null;
|
||||
// If there are unused parameters then include them in the request.
|
||||
String parameters = getParameters();
|
||||
if (parameters != null && !parameters.isEmpty())
|
||||
{
|
||||
restRequest.setPathParams(ArrayUtils.addAll(restRequest.getPathParams(), parameters));
|
||||
}
|
||||
|
||||
STEP(restRequest.toString());
|
||||
|
||||
Response returnedResponse;
|
||||
switch (restRequest.getHttpMethod())
|
||||
{
|
||||
case GET:
|
||||
@@ -607,7 +639,6 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
case DELETE:
|
||||
returnedResponse = onRequest().delete(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
|
||||
case HEAD:
|
||||
returnedResponse = onRequest().head(restRequest.getPath(), restRequest.getPathParams()).andReturn();
|
||||
break;
|
||||
@@ -845,6 +876,8 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
}
|
||||
|
||||
/**
|
||||
* Get and clear the stored parameters.
|
||||
*
|
||||
* @return parameters that you could pass on the request ?param=value
|
||||
*/
|
||||
public String getParameters()
|
||||
@@ -885,26 +918,17 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
}
|
||||
|
||||
/**
|
||||
* Send key=value parameters
|
||||
* All of them will be automatically passed to url.
|
||||
* Example: "maxItems=10000"
|
||||
*
|
||||
* @param parameters
|
||||
* @return
|
||||
* Send key=value parameters.
|
||||
* <p>
|
||||
* Note that this will replace any existing parameters.
|
||||
*
|
||||
* @param parameters A list of URL query parameters - e.g. "maxItems=10000"
|
||||
* @return The RestWrapper
|
||||
*/
|
||||
public RestWrapper withParams(String... parameters)
|
||||
{
|
||||
StringBuilder paramsUrl = new StringBuilder();
|
||||
String delimiter = (parameters.length > 1 ? "&" : "");
|
||||
|
||||
for (int i = 0; i < parameters.length; i++)
|
||||
{
|
||||
paramsUrl.append(parameters[i]);
|
||||
if (i < parameters.length - 1)
|
||||
paramsUrl.append(delimiter);
|
||||
}
|
||||
|
||||
setParameters(paramsUrl.toString());
|
||||
String paramsStr = Arrays.stream(parameters).collect(Collectors.joining("&"));
|
||||
setParameters(paramsStr);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -932,6 +956,11 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
return new RestAuthAPI(this);
|
||||
}
|
||||
|
||||
public RestModelAPI withModelAPI()
|
||||
{
|
||||
return new RestModelAPI(this);
|
||||
}
|
||||
|
||||
public SearchAPI withSearchAPI()
|
||||
{
|
||||
return new SearchAPI(this);
|
||||
@@ -1123,6 +1152,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1151,4 +1194,4 @@ public class RestWrapper extends DSLWrapper<RestWrapper>
|
||||
this.serverPort = restProperties.envProperty().getPort();
|
||||
configureServerEndpoint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,39 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.assertion;
|
||||
|
||||
public interface IModelAssertion<Model>
|
||||
public interface IModelAssertion<Model>
|
||||
{
|
||||
public ModelAssertion<Model> and();
|
||||
|
||||
public ModelAssertion<Model> assertThat();
|
||||
default ModelAssertion<Model> assertThat()
|
||||
{
|
||||
return new ModelAssertion<>(this);
|
||||
}
|
||||
|
||||
default ModelAssertion<Model> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.assertion;
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@@ -6,5 +31,9 @@ public interface IModelsCollectionAssertion<ModelCollection> {
|
||||
|
||||
public ModelsCollectionAssertion assertThat();
|
||||
|
||||
public ModelCollection when();
|
||||
@SuppressWarnings("unchecked")
|
||||
default ModelCollection when()
|
||||
{
|
||||
return (ModelCollection) this;
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.assertion;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
@@ -8,14 +33,16 @@ import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import io.restassured.path.json.JsonPath;
|
||||
import org.alfresco.utility.exception.TestConfigurationException;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
import org.testng.Assert;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.restassured.path.json.JsonPath;
|
||||
|
||||
/**
|
||||
* Assertion on Rest Model
|
||||
* Just pass your rest model as constructor
|
||||
@@ -32,7 +59,7 @@ public class ModelAssertion<T>
|
||||
Assert.fail(String.format("Field {%s} was not found in returned response.",fieldNameToBeRetuned));
|
||||
}
|
||||
}
|
||||
private Object model;
|
||||
private final Object model;
|
||||
|
||||
public ModelAssertion(Object model)
|
||||
{
|
||||
@@ -41,10 +68,11 @@ public class ModelAssertion<T>
|
||||
|
||||
/**
|
||||
* Use this DSL for asserting particular fields of your model if your model
|
||||
* is like this (basic POJO) public class Person extends
|
||||
* ModelAssertion<Person> { private String id = "1234"; you can use assert
|
||||
* the id of this person as:
|
||||
* Person p = new Person(); p.assertField("id").is("1234")
|
||||
* is like this (basic POJO)
|
||||
* public class Person extends ModelAssertion<Person>
|
||||
* { private String id = "1234"; }
|
||||
* you can use assert the id of this person as:
|
||||
* Person p = new Person(); p.assertThat().field("id").is("1234")
|
||||
*
|
||||
* @param fieldName
|
||||
* @return
|
||||
@@ -70,7 +98,7 @@ public class ModelAssertion<T>
|
||||
return new AssertionVerbs(model, fieldValue, fieldName);
|
||||
}
|
||||
|
||||
public AssertionItemVerbs fieldsCount() throws Exception
|
||||
public AssertionItemVerbs fieldsCount()
|
||||
{
|
||||
|
||||
int actualSize = 0;
|
||||
@@ -80,13 +108,39 @@ public class ModelAssertion<T>
|
||||
{
|
||||
|
||||
field.setAccessible(true);
|
||||
Object fieldValue = field.get(model);
|
||||
Object fieldValue = null;
|
||||
try
|
||||
{
|
||||
fieldValue = field.get(model);
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
{
|
||||
throw new IllegalStateException("Unable to load model using reflection.", e);
|
||||
}
|
||||
if (fieldValue != null)
|
||||
actualSize++;
|
||||
}
|
||||
return new AssertionItemVerbs(model, actualSize);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method for asserting whole model with different model object. Method allows to ignore particular fields during the comparison.
|
||||
*
|
||||
* WARNING: For proper work model should implement {@code toString()} and {@code equals()} methods.
|
||||
*
|
||||
* @param expected - expected model.
|
||||
* @param ignoreFields - fields which should be ignored during assertion.
|
||||
* @return model.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public T isEqualTo(T expected, String... ignoreFields)
|
||||
{
|
||||
T modelCopy = createCopyIgnoringFields((T) model, ignoreFields);
|
||||
T expectedCopy = createCopyIgnoringFields(expected, ignoreFields);
|
||||
Assert.assertEquals(modelCopy, expectedCopy, String.format("Compared objects of type: %s are not equal!", model.getClass()));
|
||||
return (T) model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all fields declared from all classes hierarchy
|
||||
*
|
||||
@@ -111,6 +165,18 @@ public class ModelAssertion<T>
|
||||
return fields;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private T createCopyIgnoringFields(T model, String... ignoreFields)
|
||||
{
|
||||
Gson gson = new Gson();
|
||||
JsonObject jsonObject = gson.fromJson(gson.toJson(model), JsonObject.class);
|
||||
for (String ignoreField : ignoreFields)
|
||||
{
|
||||
jsonObject.remove(ignoreField);
|
||||
}
|
||||
return gson.fromJson(gson.toJson(jsonObject), (Class<? extends T>) model.getClass());
|
||||
}
|
||||
|
||||
/**
|
||||
* DSL assertion on Rest Model fields
|
||||
*
|
||||
@@ -239,7 +305,19 @@ public class ModelAssertion<T>
|
||||
public T contains(String value)
|
||||
{
|
||||
if (!fieldValue.toString().contains(value))
|
||||
{
|
||||
Assert.fail(errorMessage("does NOT contain expected value: " + value + ", Current Value: " + fieldValue.toString()));
|
||||
}
|
||||
|
||||
return (T) model;
|
||||
}
|
||||
|
||||
public T notContains(String value)
|
||||
{
|
||||
if (fieldValue.toString().contains(value))
|
||||
{
|
||||
Assert.fail(errorMessage("does contain unexpected value: " + value + ", Current Value: " + fieldValue.toString()));
|
||||
}
|
||||
|
||||
return (T) model;
|
||||
}
|
||||
@@ -317,7 +395,7 @@ public class ModelAssertion<T>
|
||||
private Object model;
|
||||
private Object actual;
|
||||
|
||||
public AssertionItemVerbs(Object model, Object actual) throws Exception
|
||||
public AssertionItemVerbs(Object model, Object actual)
|
||||
{
|
||||
this.model = model;
|
||||
this.actual = actual;
|
||||
|
@@ -1,7 +1,33 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.assertion;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -12,6 +38,7 @@ import org.alfresco.utility.model.Model;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.testng.Assert;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.collect.Ordering;
|
||||
import io.restassured.path.json.JsonPath;
|
||||
@@ -65,14 +92,13 @@ public class ModelsCollectionAssertion<C>
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListContains(String key, String value) throws Exception
|
||||
public C entriesListContains(String key, String value)
|
||||
{
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
String fieldValue = "";
|
||||
for (Model m : modelEntries) {
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
try {
|
||||
Object model = loadModel(m);
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonInString = mapper.writeValueAsString(model);
|
||||
fieldValue = JsonPath.with(jsonInString).get(key);
|
||||
@@ -91,15 +117,14 @@ public class ModelsCollectionAssertion<C>
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListDoesNotContain(String key, String value) throws Exception
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListDoesNotContain(String key, String value)
|
||||
{
|
||||
boolean exist = false;
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
for (Model m : modelEntries) {
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
String fieldValue = "";
|
||||
Object model = loadModel(m);
|
||||
String fieldValue = "";
|
||||
try {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonInString = mapper.writeValueAsString(model);
|
||||
@@ -117,55 +142,54 @@ public class ModelsCollectionAssertion<C>
|
||||
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListDoesNotContain(String key) throws Exception
|
||||
public C entriesListDoesNotContain(String key)
|
||||
{
|
||||
boolean exist = false;
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
for (Model m : modelEntries) {
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
String fieldValue = "";
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonInString = mapper.writeValueAsString(model);
|
||||
fieldValue = JsonPath.with(jsonInString).get(key);
|
||||
if (fieldValue != null) {
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean exist = modelInList(key);
|
||||
Assert.assertFalse(exist,
|
||||
String.format("Entry list contains key: %s", key));
|
||||
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListContains(String key) throws Exception
|
||||
public C entriesListContains(String key)
|
||||
{
|
||||
boolean exist = false;
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
for (Model m : modelEntries) {
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
Object fieldValue = null;
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonInString = mapper.writeValueAsString(model);
|
||||
fieldValue = JsonPath.with(jsonInString).get(key);
|
||||
if (fieldValue != null) {
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
boolean exist = modelInList(key);
|
||||
Assert.assertTrue(exist,
|
||||
String.format("Entry list doesn't contain key: %s", key));
|
||||
String.format("Entry list doesn't contain key: %s", key));
|
||||
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
private boolean modelInList(String key)
|
||||
{
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
for (Model m : modelEntries)
|
||||
{
|
||||
Object model = loadModel(m);
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
String jsonInString;
|
||||
try
|
||||
{
|
||||
jsonInString = mapper.writeValueAsString(model);
|
||||
}
|
||||
catch (JsonProcessingException e)
|
||||
{
|
||||
throw new IllegalStateException("Failed to convert model to string.", e);
|
||||
}
|
||||
Object fieldValue = JsonPath.with(jsonInString).get(key);
|
||||
if (fieldValue != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public C paginationExist()
|
||||
public C paginationExist()
|
||||
{
|
||||
STEP("REST API: Assert that response has pagination");
|
||||
Assert.assertNotNull(modelCollection.getPagination(), "Pagination is was not found in the response");
|
||||
@@ -174,73 +198,82 @@ public class ModelsCollectionAssertion<C>
|
||||
|
||||
/**
|
||||
* Check one field from pagination json body
|
||||
*
|
||||
*
|
||||
* @param field
|
||||
* @return
|
||||
*/
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public PaginationAssertionVerbs paginationField(String field)
|
||||
public PaginationAssertionVerbs paginationField(String field)
|
||||
{
|
||||
return new PaginationAssertionVerbs<C>(modelCollection, field, modelCollection.getPagination());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check is the entries are ordered ASC by a specific field
|
||||
*
|
||||
*
|
||||
* @param field from json response
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListIsSortedAscBy(String field) throws Exception
|
||||
public C entriesListIsSortedAscBy(String field)
|
||||
{
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
List<String> fieldValues = new ArrayList<String>();
|
||||
for(Model m: modelEntries)
|
||||
{
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
Object model = loadModel(m);
|
||||
String fieldValue = "";
|
||||
try {
|
||||
fieldValue = BeanUtils.getProperty(model, field);
|
||||
fieldValues.add(fieldValue);
|
||||
}
|
||||
catch (Exception e)
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Assert.assertTrue(Ordering.natural().isOrdered(fieldValues), String.format("Entries are not ordered ASC by %s", field));
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check is the entries are ordered DESC by a specific field
|
||||
*
|
||||
*
|
||||
* @param field from json response
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public C entriesListIsSortedDescBy(String field) throws Exception
|
||||
public C entriesListIsSortedDescBy(String field)
|
||||
{
|
||||
List<Model> modelEntries = modelCollection.getEntries();
|
||||
List<String> fieldValues = new ArrayList<String>();
|
||||
for(Model m: modelEntries)
|
||||
{
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
Object model = method.invoke(m, new Object[] {});
|
||||
Object model = loadModel(m);
|
||||
String fieldValue = "";
|
||||
try {
|
||||
fieldValue = BeanUtils.getProperty(model, field);
|
||||
fieldValues.add(fieldValue);
|
||||
}
|
||||
catch (Exception e)
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Assert.assertTrue(Ordering.natural().reverse().isOrdered(fieldValues), String.format("Entries are not ordered DESC by %s", field));
|
||||
return (C) modelCollection;
|
||||
}
|
||||
|
||||
private Object loadModel(Model m)
|
||||
{
|
||||
try
|
||||
{
|
||||
Method method = m.getClass().getMethod("onModel", new Class[] {});
|
||||
return method.invoke(m, new Object[] {});
|
||||
}
|
||||
catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e)
|
||||
{
|
||||
throw new IllegalStateException("Failed to load model using reflection.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.assertion;
|
||||
|
||||
import org.alfresco.rest.core.IRestModelsCollection;
|
||||
@@ -25,9 +50,8 @@ public class PaginationAssertionVerbs<C> {
|
||||
|
||||
/**
|
||||
* @return the value of the field
|
||||
* @throws Exception
|
||||
*/
|
||||
private String getFieldValue() throws Exception {
|
||||
private String getFieldValue() {
|
||||
String value = "";
|
||||
try {
|
||||
value = BeanUtils.getProperty(pagination, fieldName);
|
||||
@@ -46,35 +70,35 @@ public class PaginationAssertionVerbs<C> {
|
||||
modelCollection.getClass().getCanonicalName(), info);
|
||||
}
|
||||
|
||||
public C is(String expected) throws Exception {
|
||||
public C is(String expected) {
|
||||
|
||||
Assert.assertEquals(getFieldValue(), expected, errorMessage("is NOT correct,"));
|
||||
return modelCollection;
|
||||
}
|
||||
|
||||
public C isNot(Object expected) throws Exception {
|
||||
public C isNot(Object expected) {
|
||||
|
||||
Assert.assertNotEquals(getFieldValue(), expected, errorMessage("is correct,"));
|
||||
return modelCollection;
|
||||
}
|
||||
|
||||
public C isNotEmpty() throws Exception {
|
||||
public C isNotEmpty() {
|
||||
Assert.assertNotEquals(getFieldValue(), "", errorMessage("is empty,"));
|
||||
return modelCollection;
|
||||
}
|
||||
|
||||
public C isNotNull() throws Exception {
|
||||
public C isNotNull() {
|
||||
Assert.assertNotNull(getFieldValue(), errorMessage("is null,"));
|
||||
return modelCollection;
|
||||
}
|
||||
|
||||
public C isNotPresent() throws Exception {
|
||||
public C isNotPresent() {
|
||||
Assert.assertNull(getFieldValue(), errorMessage("is present,"));
|
||||
return modelCollection;
|
||||
}
|
||||
|
||||
public C isEmpty() throws Exception {
|
||||
public C isEmpty() {
|
||||
Assert.assertEquals(getFieldValue(), "", errorMessage("is NOT empty,"));
|
||||
return modelCollection;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
/**
|
||||
@@ -14,7 +39,7 @@ public class Generator
|
||||
{
|
||||
public static String line = "********\n------------------------------------------------------------------------";
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
public static void main(String[] args)
|
||||
{
|
||||
|
||||
if (!System.getProperties().containsKey("coverage") && !System.getProperties().containsKey("models") || System.getProperties().containsKey("help") )
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import java.util.AbstractMap;
|
||||
|
@@ -1,7 +1,33 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.Console;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Path;
|
||||
@@ -34,21 +60,28 @@ public class SwaggerDefinitions
|
||||
modelsPath = Paths.get(Paths.get(".").toAbsolutePath().normalize().toFile().getPath(), "src/main/java/org/alfresco/rest/model");
|
||||
}
|
||||
|
||||
public void generateMissingDefinitions() throws Exception
|
||||
public void generateMissingDefinitions()
|
||||
{
|
||||
/*
|
||||
* read the content of ignore-moldels file
|
||||
*/
|
||||
List<String> ignoreModel = new ArrayList<String>();
|
||||
try (BufferedReader br = new BufferedReader(new FileReader(Paths.get(modelsPath.toFile().getPath(), "ignore-models").toFile())))
|
||||
try
|
||||
{
|
||||
String line;
|
||||
while ((line = br.readLine()) != null)
|
||||
try (BufferedReader br = new BufferedReader(new FileReader(Paths.get(modelsPath.toFile().getPath(), "ignore-models").toFile())))
|
||||
{
|
||||
if (!line.startsWith("#") && !line.equals(""))
|
||||
ignoreModel.add(line);
|
||||
String line;
|
||||
while ((line = br.readLine()) != null)
|
||||
{
|
||||
if (!line.startsWith("#") && !line.equals(""))
|
||||
ignoreModel.add(line);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new IllegalStateException("Exception while generating missing definitions.", e);
|
||||
}
|
||||
|
||||
/*
|
||||
* filter all models, ignoring the ones from ignore-model or the ones that are already created locally
|
||||
@@ -121,8 +154,8 @@ public class SwaggerDefinitions
|
||||
{
|
||||
System.out.println("\nStart generating all models...");
|
||||
for (SwaggerModel swaggerModel : missingSwaggerModels)
|
||||
{
|
||||
swaggerModel.generate();
|
||||
{
|
||||
generateModel(swaggerModel);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -147,27 +180,26 @@ public class SwaggerDefinitions
|
||||
* Generate the model based on the ID provided
|
||||
*
|
||||
* @param id
|
||||
* @throws Exception
|
||||
*/
|
||||
private void generateSelectedSwaggerModel(String id) throws Exception
|
||||
private void generateSelectedSwaggerModel(String id)
|
||||
{
|
||||
int choise = Integer.parseInt(id);
|
||||
if ((choise - 1) >= missingSwaggerModels.size())
|
||||
int choice = Integer.parseInt(id);
|
||||
if ((choice - 1) >= missingSwaggerModels.size())
|
||||
{
|
||||
throw new TestConfigurationException(
|
||||
"You specified a wrong ID: [" + id + "] please select one value from the list displayed above. Run the command again!");
|
||||
}
|
||||
missingSwaggerModels.get(choise - 1).generate();
|
||||
generateModel(missingSwaggerModels.get(choice - 1));
|
||||
}
|
||||
|
||||
public boolean generateDefinition(String modelParamValue) throws IOException, TemplateException
|
||||
public boolean generateDefinition(String modelParamValue)
|
||||
{
|
||||
for (Entry<String, Model> model : swagger.getDefinitions().entrySet())
|
||||
{
|
||||
SwaggerModel swaggerModel = new SwaggerModel(model, swagger);
|
||||
if (swaggerModel.getName().equals(modelParamValue))
|
||||
{
|
||||
swaggerModel.generate();
|
||||
generateModel(swaggerModel);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -175,4 +207,16 @@ public class SwaggerDefinitions
|
||||
System.err.printf("Model [%s] not found in Swagger file: %s\n", modelParamValue, swagger.getBasePath());
|
||||
return false;
|
||||
}
|
||||
|
||||
private void generateModel(SwaggerModel swaggerModel)
|
||||
{
|
||||
try
|
||||
{
|
||||
swaggerModel.generate();
|
||||
}
|
||||
catch (IOException | TemplateException e)
|
||||
{
|
||||
throw new IllegalStateException("Exception while generating model definition.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import java.io.Console;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
@@ -47,51 +72,55 @@ public class SwaggerPaths
|
||||
/**
|
||||
* Compare requests that exist in swagger yaml file vs request implemented in your code
|
||||
* any findings are saved to a missing-request txt file.
|
||||
* @throws Exception
|
||||
*
|
||||
*
|
||||
* @throws TestConfigurationException
|
||||
*/
|
||||
public void computeCoverage() throws Exception
|
||||
public void computeCoverage()
|
||||
{
|
||||
System.out.println("Start computing the coverage of TAS vs Swagger file. Stand by...");
|
||||
File missingReq = new File(String.format("missing-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
|
||||
missingReq.delete();
|
||||
fileWithMissingRequests = new BufferedWriter(new FileWriter(missingReq));
|
||||
fileWithMissingRequests.write(String.format("BasePath: {%s}", swagger.getBasePath()));
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.write("These requests generated should be analyzed and modified according to your needs.");
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.write("PLEASE UPDATE your 'RestReturnedModel' name with the appropiate returned model by your request.");
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.newLine();
|
||||
|
||||
File implReq = new File(String.format("implemented-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
|
||||
implReq.delete();
|
||||
fileWithImplementedRequests = new BufferedWriter(new FileWriter(implReq));
|
||||
|
||||
for (Entry<String, io.swagger.models.Path> path : swagger.getPaths().entrySet())
|
||||
try
|
||||
{
|
||||
for (Map.Entry<HttpMethod, Operation> operation : path.getValue().getOperationMap().entrySet())
|
||||
{
|
||||
searchPattern(path.getKey(),operation);
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(toString());
|
||||
|
||||
fileWithImplementedRequests.close();
|
||||
fileWithMissingRequests.close();
|
||||
|
||||
if (missingRequestCount > 0)
|
||||
{
|
||||
System.out.println("[ERROR] PLEASE ANALYSE THE GENERATED <missing-requests> file(s), it seems some request were NOT implemented!");
|
||||
}
|
||||
else
|
||||
System.out.println("Start computing the coverage of TAS vs Swagger file. Stand by...");
|
||||
File missingReq = new File(String.format("missing-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
|
||||
missingReq.delete();
|
||||
fileWithMissingRequests = new BufferedWriter(new FileWriter(missingReq));
|
||||
fileWithMissingRequests.write(String.format("BasePath: {%s}", swagger.getBasePath()));
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.write("These requests generated should be analyzed and modified according to your needs.");
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.write("PLEASE UPDATE your 'RestReturnedModel' name with the appropiate returned model by your request.");
|
||||
fileWithMissingRequests.newLine();
|
||||
fileWithMissingRequests.newLine();
|
||||
|
||||
System.out.println("ALSO ANALYZE <implemented-requests.txt> for current implementation, take a look at duplicated requests if any!");
|
||||
File implReq = new File(String.format("implemented-requests-%s.txt", FilenameUtils.getBaseName(swaggerFilePath)));
|
||||
implReq.delete();
|
||||
fileWithImplementedRequests = new BufferedWriter(new FileWriter(implReq));
|
||||
|
||||
for (Entry<String, io.swagger.models.Path> path : swagger.getPaths().entrySet())
|
||||
{
|
||||
for (Map.Entry<HttpMethod, Operation> operation : path.getValue().getOperationMap().entrySet())
|
||||
{
|
||||
searchPattern(path.getKey(), operation);
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(toString());
|
||||
|
||||
fileWithImplementedRequests.close();
|
||||
fileWithMissingRequests.close();
|
||||
|
||||
if (missingRequestCount > 0)
|
||||
{
|
||||
System.out.println("[ERROR] PLEASE ANALYSE THE GENERATED <missing-requests> file(s), it seems some request were NOT implemented!");
|
||||
}
|
||||
else
|
||||
missingReq.delete();
|
||||
|
||||
System.out.println("ALSO ANALYZE <implemented-requests.txt> for current implementation, take a look at duplicated requests if any!");
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new RuntimeException("Exception while trying to create coverage report.", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,9 +129,8 @@ public class SwaggerPaths
|
||||
* @param httpMethod
|
||||
* @param pathUrl
|
||||
* @param methodName
|
||||
* @throws Exception
|
||||
*/
|
||||
private void searchPattern(String pathUrl, Entry<HttpMethod, Operation> operation) throws Exception
|
||||
private void searchPattern(String pathUrl, Entry<HttpMethod, Operation> operation)
|
||||
{
|
||||
String originalPathUrl = pathUrl;
|
||||
String httpMethod = operation.getKey().name();
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import java.io.File;
|
||||
@@ -9,6 +34,7 @@ import java.util.Map;
|
||||
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.Template;
|
||||
import freemarker.template.TemplateException;
|
||||
import io.swagger.models.Operation;
|
||||
|
||||
public class SwaggerRequest
|
||||
@@ -18,12 +44,19 @@ public class SwaggerRequest
|
||||
private String httpMethod;
|
||||
private String pathUrl;
|
||||
|
||||
private Configuration getConfig() throws IOException
|
||||
private Configuration getConfig()
|
||||
{
|
||||
if (cfg == null)
|
||||
{
|
||||
cfg = new Configuration(Configuration.VERSION_2_3_23);
|
||||
cfg.setDirectoryForTemplateLoading(new File("src/main/resources"));
|
||||
try
|
||||
{
|
||||
cfg.setDirectoryForTemplateLoading(new File("src/main/resources"));
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new IllegalStateException("Exception while configuring Freemarker template directory.", e);
|
||||
}
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
@@ -35,18 +68,25 @@ public class SwaggerRequest
|
||||
this.pathUrl = pathUrl;
|
||||
}
|
||||
|
||||
public String getRequestSample() throws Exception
|
||||
public String getRequestSample()
|
||||
{
|
||||
Template template = getConfig().getTemplate("rest-request.ftl");
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("operationId", swaggerRequest.getOperationId());
|
||||
data.put("httpMethod", httpMethod);
|
||||
data.put("pathUrl", pathUrl);
|
||||
|
||||
Writer append = new StringWriter();
|
||||
template.process(data, append);
|
||||
|
||||
append.close();
|
||||
return append.toString();
|
||||
try
|
||||
{
|
||||
Template template = getConfig().getTemplate("rest-request.ftl");
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("operationId", swaggerRequest.getOperationId());
|
||||
data.put("httpMethod", httpMethod);
|
||||
data.put("pathUrl", pathUrl);
|
||||
|
||||
Writer append = new StringWriter();
|
||||
template.process(data, append);
|
||||
|
||||
append.close();
|
||||
return append.toString();
|
||||
}
|
||||
catch (IOException | TemplateException e)
|
||||
{
|
||||
throw new IllegalStateException("Exception while loading sample request.", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.core.swagger;
|
||||
|
||||
import org.alfresco.utility.exception.TestConfigurationException;
|
||||
@@ -26,12 +51,12 @@ public class SwaggerYamlParser
|
||||
|
||||
}
|
||||
|
||||
public void computeCoverage() throws Exception
|
||||
public void computeCoverage()
|
||||
{
|
||||
new SwaggerPaths(swagger, this.swaggerFilePath).computeCoverage();
|
||||
}
|
||||
|
||||
public void generateMissingModules() throws Exception
|
||||
public void generateMissingModules()
|
||||
{
|
||||
String modelParamValue = System.getProperty("models");
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.exception;
|
||||
|
||||
public class EmptyJsonResponseException extends RuntimeException
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.exception;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.exception;
|
||||
|
||||
public class JsonToModelConversionException extends RuntimeException
|
||||
|
@@ -1,11 +1,36 @@
|
||||
package org.alfresco.rest.exception;
|
||||
|
||||
public class ModelToJsonConversionException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public <T> ModelToJsonConversionException(Class<T> classz, Exception e)
|
||||
{
|
||||
super(String.format("Could not convert model for [%s] to JSON", classz.getName()), e);
|
||||
}
|
||||
}
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.exception;
|
||||
|
||||
public class ModelToJsonConversionException extends RuntimeException
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public <T> ModelToJsonConversionException(Class<T> classz, Exception e)
|
||||
{
|
||||
super(String.format("Could not convert model for [%s] to JSON", classz.getName()), e);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,167 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestAbstractClassModel extends TestModel implements IRestModel<RestAbstractClassModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestAbstractClassModel model;
|
||||
|
||||
@Override
|
||||
public RestAbstractClassModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
public String id;
|
||||
public String title;
|
||||
public String description;
|
||||
public String parentId;
|
||||
public Boolean isContainer = null;
|
||||
public Boolean isArchive = null;
|
||||
public Boolean includedInSupertypeQuery = null;
|
||||
public List<String> mandatoryAspects = null;
|
||||
public List<RestClassAssociationModel> associations = null;
|
||||
public List <RestPropertyDefinitionModel> properties = null;
|
||||
|
||||
@JsonProperty(value = "model")
|
||||
public RestClassModel modelInfo;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Boolean getContainer()
|
||||
{
|
||||
return isContainer;
|
||||
}
|
||||
|
||||
public void setContainer(Boolean container)
|
||||
{
|
||||
isContainer = container;
|
||||
}
|
||||
|
||||
public Boolean getArchive()
|
||||
{
|
||||
return isArchive;
|
||||
}
|
||||
|
||||
public void setArchive(Boolean archive)
|
||||
{
|
||||
isArchive = archive;
|
||||
}
|
||||
|
||||
public Boolean getIncludedInSupertypeQuery()
|
||||
{
|
||||
return includedInSupertypeQuery;
|
||||
}
|
||||
|
||||
public void setIncludedInSupertypeQuery(Boolean includedInSupertypeQuery)
|
||||
{
|
||||
this.includedInSupertypeQuery = includedInSupertypeQuery;
|
||||
}
|
||||
|
||||
public List<String> getMandatoryAspects()
|
||||
{
|
||||
return mandatoryAspects;
|
||||
}
|
||||
|
||||
public void setMandatoryAspects(List<String> mandatoryAspects)
|
||||
{
|
||||
this.mandatoryAspects = mandatoryAspects;
|
||||
}
|
||||
|
||||
public List<RestClassAssociationModel> getAssociations()
|
||||
{
|
||||
return associations;
|
||||
}
|
||||
|
||||
public void setAssociations(List<RestClassAssociationModel> associations)
|
||||
{
|
||||
this.associations = associations;
|
||||
}
|
||||
|
||||
public List<RestPropertyDefinitionModel> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(List<RestPropertyDefinitionModel> properties)
|
||||
{
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public RestClassModel getModelInfo()
|
||||
{
|
||||
return modelInfo;
|
||||
}
|
||||
|
||||
public void setModelInfo(RestClassModel modelInfo)
|
||||
{
|
||||
this.modelInfo = modelInfo;
|
||||
}
|
||||
}
|
@@ -0,0 +1,100 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-14 13:22' 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 RestActionBodyExecTemplateModel extends TestModel implements IRestModel<RestActionBodyExecTemplateModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestActionBodyExecTemplateModel model;
|
||||
|
||||
@Override
|
||||
public RestActionBodyExecTemplateModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String actionDefinitionId;
|
||||
|
||||
private Object params;
|
||||
|
||||
public String getActionDefinitionId()
|
||||
{
|
||||
return this.actionDefinitionId;
|
||||
}
|
||||
|
||||
public void setActionDefinitionId(String actionDefinitionId)
|
||||
{
|
||||
this.actionDefinitionId = actionDefinitionId;
|
||||
}
|
||||
|
||||
public Object getParams()
|
||||
{
|
||||
return this.params;
|
||||
}
|
||||
|
||||
public void setParams(Object params)
|
||||
{
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "RestActionBodyExecTemplateModel{" + "actionDefinitionId='" + actionDefinitionId + '\'' + ", params=" + params + '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
RestActionBodyExecTemplateModel that = (RestActionBodyExecTemplateModel) o;
|
||||
return Objects.equals(actionDefinitionId, that.actionDefinitionId) && Objects.equals(params, that.params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(actionDefinitionId, params);
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,37 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestActionDefinitionModel extends TestModel implements IRestModel<RestActionDefinitionModel>
|
||||
{
|
||||
|
||||
@@ -100,18 +126,6 @@ public class RestActionDefinitionModel extends TestModel implements IRestModel<R
|
||||
this.parameterDefinitions = parameterDefinitions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActionDefinitionModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActionDefinitionModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestActionDefinitionModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestActionDefinitionModel onModel()
|
||||
{
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Cristina Axinte
|
||||
@@ -134,17 +158,4 @@ public class RestActivityModel extends TestModel implements IRestModel<RestActiv
|
||||
{
|
||||
this.activitySummary = activitySummary;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActivityModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActivityModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestActivityModel>(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,12 +1,36 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.constants.UserRole;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
*
|
||||
* "activitySummary": {
|
||||
@@ -117,14 +141,4 @@ public class RestActivitySummaryModel extends TestModel implements IRestModel<Re
|
||||
{
|
||||
this.objectId = objectId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActivitySummaryModel> and() {
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestActivitySummaryModel> assertThat() {
|
||||
return new ModelAssertion<RestActivitySummaryModel>(this);
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestAggregateModel extends TestModel implements IRestModel<RestAggregateModel>
|
||||
{
|
||||
@JsonProperty(value = "aggregate")
|
||||
@@ -40,16 +64,4 @@ public class RestAggregateModel extends TestModel implements IRestModel<RestAggr
|
||||
{
|
||||
this.average = average;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestAggregateModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestAggregateModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestAggregateModel>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,72 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* 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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
{
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,30 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
public class RestAspectModel extends RestAbstractClassModel
|
||||
{
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
public class RestAspectsCollection extends RestModels<RestAspectModel, RestAspectsCollection>
|
||||
{
|
||||
}
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'aepure' on '2017-06-29 15:31' from 'Alfresco Content Services REST API' swagger file
|
||||
* Generated from 'Alfresco Content Services REST API' swagger file
|
||||
@@ -13,18 +37,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class RestAuditAppModel extends TestModel implements IRestModel<RestAuditAppModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestAuditAppModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestAuditAppModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestAuditAppModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestAuditAppModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,27 +1,39 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestAuditEntryModel extends TestModel implements IRestModel<RestAuditEntryModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestAuditEntryModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestAuditEntryModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestAuditEntryModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestAuditEntryModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestCandidateModel extends TestModel implements IRestModel<RestCandidateModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
@@ -44,16 +68,4 @@ public class RestCandidateModel extends TestModel implements IRestModel<RestCand
|
||||
{
|
||||
this.candidateId = candidateId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCandidateModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCandidateModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestCandidateModel>(this);
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -0,0 +1,87 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestClassAssociationDefinitionModel extends TestModel
|
||||
{
|
||||
public String role = null;
|
||||
public String cls = null;
|
||||
public Boolean isMany = null;
|
||||
public Boolean isMandatory = null;
|
||||
public Boolean isMandatoryEnforced = null;
|
||||
|
||||
public String getRole()
|
||||
{
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role)
|
||||
{
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getCls()
|
||||
{
|
||||
return cls;
|
||||
}
|
||||
|
||||
public void setCls(String cls)
|
||||
{
|
||||
this.cls = cls;
|
||||
}
|
||||
|
||||
public Boolean getMany()
|
||||
{
|
||||
return isMany;
|
||||
}
|
||||
|
||||
public void setMany(Boolean many)
|
||||
{
|
||||
isMany = many;
|
||||
}
|
||||
|
||||
public Boolean getMandatory()
|
||||
{
|
||||
return isMandatory;
|
||||
}
|
||||
|
||||
public void setMandatory(Boolean mandatory)
|
||||
{
|
||||
isMandatory = mandatory;
|
||||
}
|
||||
|
||||
public Boolean getMandatoryEnforced()
|
||||
{
|
||||
return isMandatoryEnforced;
|
||||
}
|
||||
|
||||
public void setMandatoryEnforced(Boolean mandatoryEnforced)
|
||||
{
|
||||
isMandatoryEnforced = mandatoryEnforced;
|
||||
}
|
||||
}
|
@@ -0,0 +1,111 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestClassAssociationModel extends TestModel
|
||||
{
|
||||
public String id;
|
||||
public String title;
|
||||
public String description;
|
||||
public Boolean isChild;
|
||||
public Boolean isProtected;
|
||||
public RestClassAssociationDefinitionModel source = null;
|
||||
public RestClassAssociationDefinitionModel target = null;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Boolean getChild()
|
||||
{
|
||||
return isChild;
|
||||
}
|
||||
|
||||
public void setIsChild(Boolean isChild)
|
||||
{
|
||||
this.isChild = isChild;
|
||||
}
|
||||
|
||||
public Boolean getIsProtected()
|
||||
{
|
||||
return isProtected;
|
||||
}
|
||||
|
||||
public void setIsProtected(Boolean isProtected)
|
||||
{
|
||||
this.isProtected = isProtected;
|
||||
}
|
||||
|
||||
public RestClassAssociationDefinitionModel getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setSource(RestClassAssociationDefinitionModel source)
|
||||
{
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public RestClassAssociationDefinitionModel getTarget()
|
||||
{
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setTarget(RestClassAssociationDefinitionModel target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,87 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestClassModel extends TestModel
|
||||
{
|
||||
public String id;
|
||||
public String author;
|
||||
public String description;
|
||||
public String namespaceUri;
|
||||
public String namespacePrefix;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAuthor()
|
||||
{
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author)
|
||||
{
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getNamespaceUri()
|
||||
{
|
||||
return namespaceUri;
|
||||
}
|
||||
|
||||
public void setNamespaceUri(String namespaceUri)
|
||||
{
|
||||
this.namespaceUri = namespaceUri;
|
||||
}
|
||||
|
||||
public String getNamespacePrefix()
|
||||
{
|
||||
return namespacePrefix;
|
||||
}
|
||||
|
||||
public void setNamespacePrefix(String namespacePrefix)
|
||||
{
|
||||
this.namespacePrefix = namespacePrefix;
|
||||
}
|
||||
}
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestCommentModel extends TestModel implements IRestModel<RestCommentModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
@@ -116,17 +140,4 @@ public class RestCommentModel extends TestModel implements IRestModel<RestCommen
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCommentModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCommentModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestCommentModel>(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,32 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
public class RestCommentModelsCollection extends RestModels<RestCommentModel, RestCommentModelsCollection>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,33 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
@@ -15,8 +42,10 @@ import org.alfresco.utility.model.TestModel;
|
||||
"email": "qLZ41D2QnXQcqySNK09J@yahoo.com"
|
||||
}
|
||||
*/
|
||||
public class RestCompanyModel extends TestModel
|
||||
public class RestCompanyModel extends TestModel implements IRestModel<RestCompanyModel>
|
||||
{
|
||||
@JsonProperty (value = "entry")
|
||||
RestCompanyModel model;
|
||||
private String organization;
|
||||
private String address1;
|
||||
private String address2;
|
||||
@@ -26,16 +55,12 @@ public class RestCompanyModel extends TestModel
|
||||
private String fax;
|
||||
private String email;
|
||||
|
||||
public ModelAssertion<RestCompanyModel> assertThat()
|
||||
@Override
|
||||
public RestCompanyModel onModel()
|
||||
{
|
||||
return new ModelAssertion<RestCompanyModel>(this);
|
||||
return model;
|
||||
}
|
||||
|
||||
public ModelAssertion<RestCompanyModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
public String getOrganization()
|
||||
{
|
||||
return organization;
|
||||
@@ -115,5 +140,4 @@ public class RestCompanyModel extends TestModel
|
||||
{
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,138 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-13 15:53' 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 RestCompositeConditionDefinitionModel extends TestModel implements IRestModel<RestCompositeConditionDefinitionModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestCompositeConditionDefinitionModel model;
|
||||
|
||||
@Override
|
||||
public RestCompositeConditionDefinitionModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
Whether to invert the logic for this condition (if true then "not" is applied to the whole condition)
|
||||
*/
|
||||
|
||||
private boolean inverted;
|
||||
/**
|
||||
How to combine the clauses of this condition ("and" or "or")
|
||||
*/
|
||||
|
||||
private String booleanMode;
|
||||
/**
|
||||
Nested list of composite clauses in this condition
|
||||
*/
|
||||
|
||||
private List<RestCompositeConditionDefinitionModel> compositeConditions;
|
||||
/**
|
||||
Nested list of simple (per field) conditions.
|
||||
*/
|
||||
|
||||
private List<RestSimpleConditionDefinitionModel> simpleConditions;
|
||||
|
||||
public boolean getInverted()
|
||||
{
|
||||
return this.inverted;
|
||||
}
|
||||
|
||||
public void setInverted(boolean inverted)
|
||||
{
|
||||
this.inverted = inverted;
|
||||
}
|
||||
|
||||
public String getBooleanMode()
|
||||
{
|
||||
return this.booleanMode;
|
||||
}
|
||||
|
||||
public void setBooleanMode(String booleanMode)
|
||||
{
|
||||
this.booleanMode = booleanMode;
|
||||
}
|
||||
|
||||
public List<RestCompositeConditionDefinitionModel> getCompositeConditions()
|
||||
{
|
||||
return this.compositeConditions;
|
||||
}
|
||||
|
||||
public void setCompositeConditions(List<RestCompositeConditionDefinitionModel> compositeConditions)
|
||||
{
|
||||
this.compositeConditions = compositeConditions;
|
||||
}
|
||||
|
||||
public List<RestSimpleConditionDefinitionModel> getSimpleConditions()
|
||||
{
|
||||
return this.simpleConditions;
|
||||
}
|
||||
|
||||
public void setSimpleConditions(List<RestSimpleConditionDefinitionModel> simpleConditions)
|
||||
{
|
||||
this.simpleConditions = simpleConditions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "RestCompositeConditionDefinitionModel{" + "inverted=" + inverted + ", booleanMode='" + booleanMode + '\'' + ", compositeConditions=" + compositeConditions
|
||||
+ ", simpleConditions=" + simpleConditions + '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o)
|
||||
{
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
RestCompositeConditionDefinitionModel that = (RestCompositeConditionDefinitionModel) o;
|
||||
return inverted == that.inverted && Objects.equals(booleanMode, that.booleanMode) && Objects.equals(compositeConditions, that.compositeConditions) && Objects.equals(
|
||||
simpleConditions, that.simpleConditions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hash(inverted, booleanMode, compositeConditions, simpleConditions);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,87 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class RestConstraintDefinitionModel
|
||||
{
|
||||
private String id;
|
||||
private String type;
|
||||
private String title;
|
||||
private String description;
|
||||
private Map<String, Object> parameters;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParameters()
|
||||
{
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public void setParameters(Map<String, Object> parameters)
|
||||
{
|
||||
this.parameters = parameters;
|
||||
}
|
||||
}
|
@@ -1,7 +1,34 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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 +38,7 @@ public class RestContentModel extends TestModel
|
||||
private String mimeTypeName;
|
||||
private String mimeType;
|
||||
private String encoding;
|
||||
private Set<String> storageClasses;
|
||||
|
||||
public int getSizeInBytes()
|
||||
{
|
||||
@@ -51,4 +79,14 @@ public class RestContentModel extends TestModel
|
||||
{
|
||||
this.encoding = encoding;
|
||||
}
|
||||
|
||||
public Set<String> getStorageClasses()
|
||||
{
|
||||
return storageClasses;
|
||||
}
|
||||
|
||||
public void setStorageClasses(Set<String> storageClasses)
|
||||
{
|
||||
this.storageClasses = storageClasses;
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,91 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* 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 com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* 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>
|
||||
{
|
||||
@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;
|
||||
}
|
||||
}
|
||||
|
@@ -1,33 +1,45 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.model.CustomAspectModel;
|
||||
import org.alfresco.utility.model.CustomAspectPropertiesModel;
|
||||
import org.testng.Assert;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author Bogdan Bocancea
|
||||
*/
|
||||
public class RestCustomAspectModel extends CustomAspectModel implements IRestModel<RestCustomAspectModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestCustomAspectModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestCustomAspectModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCustomAspectModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestCustomAspectModel model;
|
||||
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.model.CustomContentModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.CustomContentModel;
|
||||
|
||||
/**
|
||||
* @author Bogdan Bocancea
|
||||
*/
|
||||
@@ -14,18 +38,6 @@ public class RestCustomModel extends CustomContentModel implements IRestModel<Re
|
||||
@JsonProperty(value = "entry")
|
||||
RestCustomModel model;
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCustomModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCustomModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestCustomModel onModel()
|
||||
{
|
||||
|
@@ -1,13 +1,38 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.model.CustomAspectPropertiesModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Bogdan Bocancea
|
||||
*/
|
||||
@@ -55,18 +80,6 @@ public class RestCustomTypeModel extends TestModel implements IRestModel<RestCus
|
||||
return model;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCustomTypeModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestCustomTypeModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestCustomTypeModel>(this);
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Handles single Deployment Entry JSON response
|
||||
* "entry": {
|
||||
@@ -83,16 +107,4 @@ public class RestDeploymentModel extends TestModel implements IRestModel<RestDep
|
||||
{
|
||||
this.deployedAt = deployedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestDeploymentModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestDeploymentModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
@@ -43,4 +68,4 @@ public class RestDeploymentModelsCollection extends RestModels<RestDeploymentMod
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,25 +1,37 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestDiscoveryModel extends TestModel implements IRestModel<RestDiscoveryModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestDiscoveryModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestDiscoveryModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestDiscoveryModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestDiscoveryModel model;
|
||||
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/*
|
||||
* Handles responses for GET /downloads/{downloadId} and POST /downloads rest calls
|
||||
* E.g
|
||||
@@ -23,18 +47,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
public class RestDownloadsModel extends TestModel implements IRestModel<RestDownloadsModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestDownloadsModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestDownloadsModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestDownloadsModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestDownloadsModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
|
@@ -1,30 +1,42 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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 'aforascu' on '2018-01-10 16:02' from 'Alfresco Content Services REST API' swagger file
|
||||
* Generated by 'saspery' on '2022-09-28 06:54' from 'Alfresco Content Services REST API' swagger file
|
||||
* Generated from 'Alfresco Content Services REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api}
|
||||
*/
|
||||
public class RestEntitlementsInfoModel extends TestModel implements IRestModel<RestEntitlementsInfoModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestEntitlementsInfoModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestEntitlementsInfoModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestEntitlementsInfoModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestEntitlementsInfoModel model;
|
||||
|
||||
@@ -43,6 +55,8 @@ public class RestEntitlementsInfoModel extends TestModel implements IRestModel<R
|
||||
|
||||
private boolean isCryptodocEnabled;
|
||||
|
||||
private boolean isCustomEmbeddedWorkflowEnabled;
|
||||
|
||||
public int getMaxUsers()
|
||||
{
|
||||
return this.maxUsers;
|
||||
@@ -82,5 +96,15 @@ public class RestEntitlementsInfoModel extends TestModel implements IRestModel<R
|
||||
{
|
||||
this.isCryptodocEnabled = isCryptodocEnabled;
|
||||
}
|
||||
|
||||
public boolean getIsCustomEmbeddedWorkflowEnabled()
|
||||
{
|
||||
return this.isCustomEmbeddedWorkflowEnabled;
|
||||
}
|
||||
|
||||
public void setIsCustomEmbeddedWorkflowEnabled(boolean isCustomEmbeddedWorkflowEnabled)
|
||||
{
|
||||
this.isCustomEmbeddedWorkflowEnabled = isCustomEmbeddedWorkflowEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestFavoriteSiteModel extends TestModel implements IRestModel<RestFavoriteSiteModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
@@ -27,16 +51,4 @@ public class RestFavoriteSiteModel extends TestModel implements IRestModel<RestF
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFavoriteSiteModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFavoriteSiteModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestFavoriteSiteModel>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,260 +1,272 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* Handles single Folder JSON responses
|
||||
* Example:
|
||||
"createdAt": "2016-10-03T09:48:52.385+0000",
|
||||
"sizeInBytes": 19,
|
||||
"versionLabel": "1.0",
|
||||
"createdBy": "admin",
|
||||
"modifiedAt": "2016-10-03T09:48:52.385+0000",
|
||||
"name": "file-OUQAyqdsNi.txt",
|
||||
"guid": "00f6b250-a841-4ff6-b660-5b45cee30497",
|
||||
"modifiedBy": "admin",
|
||||
"mimeType": "text/plain",
|
||||
"id": "00f6b250-a841-4ff6-b660-5b45cee30497"
|
||||
*/
|
||||
|
||||
public class RestFileModel extends TestModel implements IRestModel<RestFileModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestFileModel model;
|
||||
|
||||
@Override
|
||||
public RestFileModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String sizeInBytes;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String versionLabel;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String guid;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String mimeType;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String id;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
RestPathModel path;
|
||||
|
||||
private boolean isFile;
|
||||
private boolean isFolder;
|
||||
private RestByUserModel createdByUser;
|
||||
private RestByUserModel modifiedByUser;
|
||||
private RestContentModel content;
|
||||
private String parentId;
|
||||
|
||||
public RestFileModel()
|
||||
{
|
||||
}
|
||||
|
||||
public String getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getSizeInBytes()
|
||||
{
|
||||
return sizeInBytes;
|
||||
}
|
||||
|
||||
public void setSizeInBytes(String sizeInBytes)
|
||||
{
|
||||
this.sizeInBytes = sizeInBytes;
|
||||
}
|
||||
|
||||
public String getVersionLabel()
|
||||
{
|
||||
return versionLabel;
|
||||
}
|
||||
|
||||
public void setVersionLabel(String versionLabel)
|
||||
{
|
||||
this.versionLabel = versionLabel;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getModifiedBy()
|
||||
{
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy)
|
||||
{
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedAt()
|
||||
{
|
||||
return modifiedAt;
|
||||
}
|
||||
|
||||
public void setModifiedAt(String modifiedAt)
|
||||
{
|
||||
this.modifiedAt = modifiedAt;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMimeType()
|
||||
{
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType)
|
||||
{
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public boolean getIsFile()
|
||||
{
|
||||
return isFile;
|
||||
}
|
||||
|
||||
public void setIsFile(boolean isFile)
|
||||
{
|
||||
this.isFile = isFile;
|
||||
}
|
||||
|
||||
public RestByUserModel getCreatedByUser()
|
||||
{
|
||||
return createdByUser;
|
||||
}
|
||||
|
||||
public void setCreatedByUser(RestByUserModel createdByUser)
|
||||
{
|
||||
this.createdByUser = createdByUser;
|
||||
}
|
||||
|
||||
public RestByUserModel getModifiedByUser()
|
||||
{
|
||||
return modifiedByUser;
|
||||
}
|
||||
|
||||
public void setModifiedByUser(RestByUserModel modifiedByUser)
|
||||
{
|
||||
this.modifiedByUser = modifiedByUser;
|
||||
}
|
||||
|
||||
public RestContentModel getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(RestContentModel content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public boolean getIsFolder()
|
||||
{
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
public void setIsFolder(boolean isFolder)
|
||||
{
|
||||
this.isFolder = isFolder;
|
||||
}
|
||||
|
||||
public RestPathModel getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(RestPathModel path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFileModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFileModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestFileModel>(this);
|
||||
}
|
||||
}
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Handles single Folder JSON responses
|
||||
* Example:
|
||||
"createdAt": "2016-10-03T09:48:52.385+0000",
|
||||
"sizeInBytes": 19,
|
||||
"versionLabel": "1.0",
|
||||
"createdBy": "admin",
|
||||
"modifiedAt": "2016-10-03T09:48:52.385+0000",
|
||||
"name": "file-OUQAyqdsNi.txt",
|
||||
"guid": "00f6b250-a841-4ff6-b660-5b45cee30497",
|
||||
"modifiedBy": "admin",
|
||||
"mimeType": "text/plain",
|
||||
"id": "00f6b250-a841-4ff6-b660-5b45cee30497"
|
||||
*/
|
||||
|
||||
public class RestFileModel extends TestModel implements IRestModel<RestFileModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestFileModel model;
|
||||
|
||||
@Override
|
||||
public RestFileModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String sizeInBytes;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String versionLabel;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String guid;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String mimeType;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String id;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
RestPathModel path;
|
||||
|
||||
private boolean isFile;
|
||||
private boolean isFolder;
|
||||
private RestByUserModel createdByUser;
|
||||
private RestByUserModel modifiedByUser;
|
||||
private RestContentModel content;
|
||||
private String parentId;
|
||||
|
||||
public RestFileModel()
|
||||
{
|
||||
}
|
||||
|
||||
public String getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getSizeInBytes()
|
||||
{
|
||||
return sizeInBytes;
|
||||
}
|
||||
|
||||
public void setSizeInBytes(String sizeInBytes)
|
||||
{
|
||||
this.sizeInBytes = sizeInBytes;
|
||||
}
|
||||
|
||||
public String getVersionLabel()
|
||||
{
|
||||
return versionLabel;
|
||||
}
|
||||
|
||||
public void setVersionLabel(String versionLabel)
|
||||
{
|
||||
this.versionLabel = versionLabel;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getModifiedBy()
|
||||
{
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy)
|
||||
{
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedAt()
|
||||
{
|
||||
return modifiedAt;
|
||||
}
|
||||
|
||||
public void setModifiedAt(String modifiedAt)
|
||||
{
|
||||
this.modifiedAt = modifiedAt;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMimeType()
|
||||
{
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType)
|
||||
{
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public boolean getIsFile()
|
||||
{
|
||||
return isFile;
|
||||
}
|
||||
|
||||
public void setIsFile(boolean isFile)
|
||||
{
|
||||
this.isFile = isFile;
|
||||
}
|
||||
|
||||
public RestByUserModel getCreatedByUser()
|
||||
{
|
||||
return createdByUser;
|
||||
}
|
||||
|
||||
public void setCreatedByUser(RestByUserModel createdByUser)
|
||||
{
|
||||
this.createdByUser = createdByUser;
|
||||
}
|
||||
|
||||
public RestByUserModel getModifiedByUser()
|
||||
{
|
||||
return modifiedByUser;
|
||||
}
|
||||
|
||||
public void setModifiedByUser(RestByUserModel modifiedByUser)
|
||||
{
|
||||
this.modifiedByUser = modifiedByUser;
|
||||
}
|
||||
|
||||
public RestContentModel getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(RestContentModel content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public boolean getIsFolder()
|
||||
{
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
public void setIsFolder(boolean isFolder)
|
||||
{
|
||||
this.isFolder = isFolder;
|
||||
}
|
||||
|
||||
public RestPathModel getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(RestPathModel path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
|
@@ -1,207 +1,219 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* Handles single Folder JSON responses
|
||||
* Example:
|
||||
"createdAt": "2016-10-03T08:15:08.722+0000",
|
||||
"createdBy": "admin",
|
||||
"modifiedAt": "2016-10-03T08:15:08.722+0000",
|
||||
"name": "Folder-EJJXzPAauf",
|
||||
"guid": "fd84a762-7fea-4ed8-b9cd-7622ab966ac4",
|
||||
"modifiedBy": "admin",
|
||||
"id": "fd84a762-7fea-4ed8-b9cd-7622ab966ac4"
|
||||
*/
|
||||
|
||||
public class RestFolderModel extends TestModel implements IRestModel<RestFolderModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestFolderModel model;
|
||||
|
||||
@Override
|
||||
public RestFolderModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String guid;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String id;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
RestPathModel path;
|
||||
|
||||
private boolean isFolder;
|
||||
private boolean isFile;
|
||||
private RestByUserModel createdByUser;
|
||||
private RestByUserModel modifiedByUser;
|
||||
private String parentId;
|
||||
|
||||
public RestFolderModel()
|
||||
{
|
||||
}
|
||||
|
||||
public String getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getModifiedBy()
|
||||
{
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy)
|
||||
{
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedAt()
|
||||
{
|
||||
return modifiedAt;
|
||||
}
|
||||
|
||||
public void setModifiedAt(String modifiedAt)
|
||||
{
|
||||
this.modifiedAt = modifiedAt;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean getIsFolder()
|
||||
{
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
public void setIsFolder(boolean isFolder)
|
||||
{
|
||||
this.isFolder = isFolder;
|
||||
}
|
||||
|
||||
public boolean getIsFile()
|
||||
{
|
||||
return isFile;
|
||||
}
|
||||
|
||||
public void setIsFile(boolean isFile)
|
||||
{
|
||||
this.isFile = isFile;
|
||||
}
|
||||
|
||||
public RestByUserModel getCreatedByUser()
|
||||
{
|
||||
return createdByUser;
|
||||
}
|
||||
|
||||
public void setCreatedByUser(RestByUserModel createdByUser)
|
||||
{
|
||||
this.createdByUser = createdByUser;
|
||||
}
|
||||
|
||||
public RestByUserModel getModifiedByUser()
|
||||
{
|
||||
return modifiedByUser;
|
||||
}
|
||||
|
||||
public void setModifiedByUser(RestByUserModel modifiedByUser)
|
||||
{
|
||||
this.modifiedByUser = modifiedByUser;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public RestPathModel getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(RestPathModel path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFolderModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFolderModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestFolderModel>(this);
|
||||
}
|
||||
}
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Handles single Folder JSON responses
|
||||
* Example:
|
||||
"createdAt": "2016-10-03T08:15:08.722+0000",
|
||||
"createdBy": "admin",
|
||||
"modifiedAt": "2016-10-03T08:15:08.722+0000",
|
||||
"name": "Folder-EJJXzPAauf",
|
||||
"guid": "fd84a762-7fea-4ed8-b9cd-7622ab966ac4",
|
||||
"modifiedBy": "admin",
|
||||
"id": "fd84a762-7fea-4ed8-b9cd-7622ab966ac4"
|
||||
*/
|
||||
|
||||
public class RestFolderModel extends TestModel implements IRestModel<RestFolderModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestFolderModel model;
|
||||
|
||||
@Override
|
||||
public RestFolderModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String createdBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedAt;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String name;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String guid;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String modifiedBy;
|
||||
|
||||
@JsonProperty(required = true)
|
||||
protected String id;
|
||||
|
||||
@JsonProperty(required = false)
|
||||
RestPathModel path;
|
||||
|
||||
private boolean isFolder;
|
||||
private boolean isFile;
|
||||
private RestByUserModel createdByUser;
|
||||
private RestByUserModel modifiedByUser;
|
||||
private String parentId;
|
||||
|
||||
public RestFolderModel()
|
||||
{
|
||||
}
|
||||
|
||||
public String getCreatedAt()
|
||||
{
|
||||
return createdAt;
|
||||
}
|
||||
|
||||
public void setCreatedAt(String createdAt)
|
||||
{
|
||||
this.createdAt = createdAt;
|
||||
}
|
||||
|
||||
public String getCreatedBy()
|
||||
{
|
||||
return createdBy;
|
||||
}
|
||||
|
||||
public void setCreatedBy(String createdBy)
|
||||
{
|
||||
this.createdBy = createdBy;
|
||||
}
|
||||
|
||||
public String getModifiedBy()
|
||||
{
|
||||
return modifiedBy;
|
||||
}
|
||||
|
||||
public void setModifiedBy(String modifiedBy)
|
||||
{
|
||||
this.modifiedBy = modifiedBy;
|
||||
}
|
||||
|
||||
public String getModifiedAt()
|
||||
{
|
||||
return modifiedAt;
|
||||
}
|
||||
|
||||
public void setModifiedAt(String modifiedAt)
|
||||
{
|
||||
this.modifiedAt = modifiedAt;
|
||||
}
|
||||
|
||||
public String getGuid()
|
||||
{
|
||||
return guid;
|
||||
}
|
||||
|
||||
public void setGuid(String guid)
|
||||
{
|
||||
this.guid = guid;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public boolean getIsFolder()
|
||||
{
|
||||
return isFolder;
|
||||
}
|
||||
|
||||
public void setIsFolder(boolean isFolder)
|
||||
{
|
||||
this.isFolder = isFolder;
|
||||
}
|
||||
|
||||
public boolean getIsFile()
|
||||
{
|
||||
return isFile;
|
||||
}
|
||||
|
||||
public void setIsFile(boolean isFile)
|
||||
{
|
||||
this.isFile = isFile;
|
||||
}
|
||||
|
||||
public RestByUserModel getCreatedByUser()
|
||||
{
|
||||
return createdByUser;
|
||||
}
|
||||
|
||||
public void setCreatedByUser(RestByUserModel createdByUser)
|
||||
{
|
||||
this.createdByUser = createdByUser;
|
||||
}
|
||||
|
||||
public RestByUserModel getModifiedByUser()
|
||||
{
|
||||
return modifiedByUser;
|
||||
}
|
||||
|
||||
public void setModifiedByUser(RestByUserModel modifiedByUser)
|
||||
{
|
||||
this.modifiedByUser = modifiedByUser;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public RestPathModel getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
public void setPath(RestPathModel path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Handles single representation of a Start Form Model
|
||||
* * "entry": {
|
||||
@@ -108,20 +132,4 @@ public class RestFormModel extends TestModel implements IRestModel<RestFormModel
|
||||
{
|
||||
this.required = required;
|
||||
}
|
||||
|
||||
/**
|
||||
* DSL for assertion on this rest model
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ModelAssertion<RestFormModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestFormModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestFormModel>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
@@ -51,4 +76,4 @@ public class RestFormModelsCollection extends RestModels<RestFormModel, RestForm
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,14 +1,38 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.rest.search.RestGenericMetricModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Generated by 'msuzuki' on '2017-05-15 13:08' from 'Alfresco Search REST API' swagger file
|
||||
* Generated from 'Alfresco Search REST API' swagger file
|
||||
@@ -16,18 +40,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class RestGenericBucketModel extends TestModel implements IRestModel<RestGenericBucketModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestGenericBucketModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestGenericBucketModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestGenericBucketModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestGenericBucketModel model;
|
||||
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestGroupMember extends TestModel implements IRestModel<RestGroupMember>
|
||||
{
|
||||
@JsonProperty(required = true)
|
||||
@@ -18,19 +42,6 @@ public class RestGroupMember extends TestModel implements IRestModel<RestGroupMe
|
||||
@JsonProperty(value = "entry")
|
||||
RestGroupMember model;
|
||||
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestGroupMember> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestGroupMember> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestGroupMember>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestGroupMember onModel()
|
||||
{
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,13 +1,37 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsModel>
|
||||
{
|
||||
@JsonProperty(required = true)
|
||||
@@ -25,19 +49,6 @@ public class RestGroupsModel extends TestModel implements IRestModel<RestGroupsM
|
||||
@JsonProperty(value = "entry")
|
||||
RestGroupsModel model;
|
||||
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestGroupsModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestGroupsModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestGroupsModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestGroupsModel onModel()
|
||||
{
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,13 +1,36 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.testng.Assert;
|
||||
|
||||
import io.restassured.http.Headers;
|
||||
import io.restassured.response.ResponseBody;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.testng.Assert;
|
||||
|
||||
/**
|
||||
* Created by Claudia Agache on 10/13/2016.
|
||||
@@ -32,7 +55,7 @@ public class RestHtmlResponse
|
||||
this.body = body;
|
||||
}
|
||||
|
||||
public void assertResponseContainsImage() throws Exception
|
||||
public void assertResponseContainsImage()
|
||||
{
|
||||
STEP("REST API: Assert that response has an image.");
|
||||
Utility.checkObjectIsInitialized(headers, "Headers");
|
||||
@@ -43,21 +66,6 @@ public class RestHtmlResponse
|
||||
Assert.assertFalse(body.toString().isEmpty(), "Body should not be empty.");
|
||||
}
|
||||
|
||||
/**
|
||||
* DSL for assertion on this rest model
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public ModelAssertion<RestHtmlResponse> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestHtmlResponse>(this);
|
||||
}
|
||||
|
||||
public ModelAssertion<RestHtmlResponse> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
/**
|
||||
* Assetion that a html element with specific html path has the specified value
|
||||
*
|
||||
@@ -68,4 +76,4 @@ public class RestHtmlResponse
|
||||
{
|
||||
Assert.assertEquals(body.htmlPath().get(elementHtmlPath), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
/*
|
||||
* Copyright 2020 Alfresco Software, Ltd. All rights reserved.
|
||||
* License rights for this program may be obtained from Alfresco Software, Ltd.
|
||||
@@ -124,4 +149,4 @@ public class RestIdentityServiceConfigurationModel extends TestModel{
|
||||
public void setCredentialsProvider(String credentialsProvider) {
|
||||
this.credentialsProvider = credentialsProvider;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
*
|
||||
"entry": {
|
||||
@@ -105,16 +129,4 @@ public class RestItemModel extends TestModel implements IRestModel<RestItemModel
|
||||
{
|
||||
this.modifiedAt = modifiedAt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestItemModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestItemModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestItemModel>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
@@ -41,4 +66,4 @@ public class RestItemModelsCollection extends RestModels<RestItemModel, RestItem
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'aforascu' on '2018-01-10 16:02' from 'Alfresco Content Services REST API' swagger file
|
||||
* Generated from 'Alfresco Content Services REST API' swagger file
|
||||
@@ -13,18 +37,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class RestLicenseInfoModel extends TestModel implements IRestModel<RestLicenseInfoModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestLicenseInfoModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestLicenseInfoModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestLicenseInfoModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestLicenseInfoModel model;
|
||||
|
||||
|
@@ -0,0 +1,66 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'Kristian.Dimitrov@hyland.com' on '2022-07-13 15:53' 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 RestLinkedRuleSetBodyCreateModel extends TestModel implements IRestModel<RestLinkedRuleSetBodyCreateModel>
|
||||
{
|
||||
@JsonProperty(value = "entry")
|
||||
RestLinkedRuleSetBodyCreateModel model;
|
||||
|
||||
@Override
|
||||
public RestLinkedRuleSetBodyCreateModel onModel()
|
||||
{
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
Identifier for either the folder or the rule set
|
||||
*/
|
||||
|
||||
@JsonProperty(required = true)
|
||||
private String id;
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'aforascu' on '2018-01-10 16:02' from 'Alfresco Content Services REST API' swagger file
|
||||
* Generated from 'Alfresco Content Services REST API' swagger file
|
||||
@@ -13,18 +37,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
*/
|
||||
public class RestModuleInfoModel extends TestModel implements IRestModel<RestModuleInfoModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestModuleInfoModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestModuleInfoModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestModuleInfoModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestModuleInfoModel model;
|
||||
|
||||
|
@@ -1,14 +1,38 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import static org.alfresco.utility.report.log.Step.STEP;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.rest.core.assertion.ModelAssertion;
|
||||
import org.alfresco.utility.model.UserModel;
|
||||
import org.testng.Assert;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* Created by Cristina Axinte on 9/26/2016.
|
||||
*
|
||||
@@ -64,20 +88,4 @@ public class RestNetworkModel extends RestPersonNetworkModel implements IRestMod
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* DSL for assertion on this rest model
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ModelAssertion<RestNetworkModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNetworkModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNetworkModel>(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,32 @@
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
public class RestNetworkModelsCollection extends RestModels<RestNetworkModel, RestNetworkModelsCollection>
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
||||
public class RestNetworkModelsCollection extends RestModels<RestNetworkModel, RestNetworkModelsCollection>
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -1,29 +1,41 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated by 'pbrodner' on '2016-12-19 14:12' from 'Alfresco Core REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
|
||||
*/
|
||||
public class RestNetworkQuotaModel extends TestModel implements IRestModel<RestNetworkQuotaModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNetworkQuotaModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNetworkQuotaModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNetworkQuotaModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestNetworkQuotaModel model;
|
||||
|
||||
@@ -71,4 +83,4 @@ public class RestNetworkQuotaModel extends TestModel implements IRestModel<RestN
|
||||
{
|
||||
this.usage = usage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,11 +1,35 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestNodeAssocTargetModel extends TestModel implements IRestModel<RestNodeAssocTargetModel>
|
||||
{
|
||||
@JsonProperty(value = "aggregate")
|
||||
@@ -52,17 +76,4 @@ public class RestNodeAssocTargetModel extends TestModel implements IRestModel<Re
|
||||
{
|
||||
this.assocType = assocType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssocTargetModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssocTargetModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeAssocTargetModel>(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,30 +1,42 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Created by Andrei Forascu on 30/08/2017.
|
||||
*/
|
||||
public class RestNodeAssociationModel extends TestModel implements IRestModel<RestNodeAssociationModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssociationModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeAssociationModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssociationModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestNodeAssociationModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
@@ -1,28 +1,40 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Represents an association between two nodes
|
||||
*/
|
||||
public class RestNodeAssociationTypeModel extends TestModel implements IRestModel<RestNodeAssociationTypeModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssociationTypeModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeAssociationTypeModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeAssociationTypeModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestNodeAssociationTypeModel model;
|
||||
|
||||
|
@@ -1,31 +1,43 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated from 'Alfresco Core REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
|
||||
*/
|
||||
public class RestNodeBodyModel extends TestModel implements IRestModel<RestNodeBodyModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNodeBodyModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeBodyModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeBodyModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestNodeBodyModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
@@ -5,4 +30,4 @@ import org.alfresco.rest.core.RestModels;
|
||||
public class RestNodeChildAssocModelCollection extends RestModels<RestNodeChildAssociationModel, RestNodeChildAssocModelCollection>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@@ -1,25 +1,37 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
public class RestNodeChildAssociationModel extends TestModel implements IRestModel<RestNodeChildAssociationModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNodeChildAssociationModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeChildAssociationModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeChildAssociationModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@Override
|
||||
public RestNodeChildAssociationModel onModel()
|
||||
{
|
||||
|
@@ -1,31 +1,43 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
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;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import org.alfresco.rest.core.IRestModel;
|
||||
import org.alfresco.utility.model.TestModel;
|
||||
|
||||
/**
|
||||
* Generated from 'Alfresco Core REST API' swagger file
|
||||
* Base Path {@linkplain /alfresco/api/-default-/public/alfresco/versions/1}
|
||||
*/
|
||||
public class RestNodeModel extends TestModel implements IRestModel<RestNodeModel>
|
||||
{
|
||||
@Override
|
||||
public ModelAssertion<RestNodeModel> assertThat()
|
||||
{
|
||||
return new ModelAssertion<RestNodeModel>(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModelAssertion<RestNodeModel> and()
|
||||
{
|
||||
return assertThat();
|
||||
}
|
||||
|
||||
@JsonProperty(value = "entry")
|
||||
RestNodeModel model;
|
||||
|
||||
|
@@ -1,3 +1,28 @@
|
||||
/*-
|
||||
* #%L
|
||||
* alfresco-tas-restapi
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
* the paid license agreement will prevail. Otherwise, the software is
|
||||
* provided under the following open source license terms:
|
||||
*
|
||||
* 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/>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.rest.model;
|
||||
|
||||
import org.alfresco.rest.core.RestModels;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user