mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
46 Commits
14.80
...
rm_testbra
Author | SHA1 | Date | |
---|---|---|---|
|
611b89e544 | ||
|
9205486959 | ||
|
47e58e1303 | ||
|
398a03f3dd | ||
|
4338693f81 | ||
|
449fe34856 | ||
|
930fbe4cda | ||
|
e45d223124 | ||
|
4e0e797d9f | ||
|
5418c3936d | ||
|
f876016bb9 | ||
|
00186e5594 | ||
|
d6c39cc990 | ||
|
5a2bb6db5b | ||
|
351c3ac73a | ||
|
62f72f92be | ||
|
faa0ff0e40 | ||
|
7d6037a85f | ||
|
2aa5f162cc | ||
|
13bdfe6ac3 | ||
|
d0dbef04f4 | ||
|
d8f086640a | ||
|
452fa1d2d8 | ||
|
68e9d2bc7d | ||
|
0e083bbf6b | ||
|
3a17a30e8c | ||
|
c65a56b945 | ||
|
aa6c0fb2a9 | ||
|
235bef78a9 | ||
|
f80767359f | ||
|
8cd843df9d | ||
|
ce30495376 | ||
|
5b73d52753 | ||
|
7bb829d756 | ||
|
3bedfb2c33 | ||
|
9058b5923b | ||
|
07084b22f9 | ||
|
5c884c8552 | ||
|
becf46f58a | ||
|
839afbbc1c | ||
|
daacceebd2 | ||
|
cc11c13e54 | ||
|
9e1ece208f | ||
|
82ba856d2c | ||
|
8278c9ced2 | ||
|
4e9f362482 |
18
.travis.yml
18
.travis.yml
@@ -60,7 +60,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - AppContext02TestSuite"
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - AppContext04TestSuite"
|
||||
@@ -83,7 +83,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - AppContext05TestSuite"
|
||||
@@ -102,7 +102,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - AppContextExtraTestSuite"
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=AppContextExtraTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - MiscContextTestSuite"
|
||||
@@ -118,7 +118,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl repository -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Repository - SearchTestSuite"
|
||||
@@ -241,7 +241,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Remote-api - AppContext03TestSuite"
|
||||
@@ -249,7 +249,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Remote-api - AppContext04TestSuite"
|
||||
@@ -257,7 +257,7 @@ jobs:
|
||||
before_script:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:13.3 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.16.1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5-A1
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.5
|
||||
script: travis_wait 20 mvn -B test -pl remote-api -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
|
||||
- name: "Remote-api - AppContextExtraTestSuite"
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
@@ -45,7 +45,7 @@
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>1.7.32</version>
|
||||
<version>1.7.33</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-parent</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
TRANSFORMERS_TAG=2.5.5-A1
|
||||
SOLR6_TAG=2.0.2-RC1
|
||||
TRANSFORMERS_TAG=2.5.5
|
||||
SOLR6_TAG=2.0.2
|
||||
POSTGRES_TAG=13.3
|
||||
ACTIVEMQ_TAG=5.16.1
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -217,6 +217,7 @@
|
||||
<fileset dir="${project.build.outputDirectory}/alfresco" />
|
||||
</move>
|
||||
<copy file="${project.build.directory}/${project.build.finalName}/config/alfresco/module/org_alfresco_module_rm/module.properties" todir="${project.build.directory}/${project.build.finalName}" />
|
||||
<copy file="${project.build.directory}/generated-sources/license/THIRD-PARTY.txt" todir="${project.build.directory}/${project.build.finalName}/licenses/${artifactId}" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-amps</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
@@ -168,6 +168,10 @@
|
||||
<targetPath>../${project.build.finalName}</targetPath>
|
||||
<filtering>true</filtering>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/generated-sources/license</directory>
|
||||
<targetPath>../${project.build.finalName}/licenses/${artifactId}</targetPath>
|
||||
</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<testResource>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -9,6 +9,6 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
</project>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
TRANSFORMERS_TAG=2.5.5-A1
|
||||
TRANSFORMERS_TAG=2.5.5
|
||||
SOLR6_TAG=2.0.2
|
||||
POSTGRES_TAG=13.3
|
||||
ACTIVEMQ_TAG=5.16.1
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-tests</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<developers>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo-packaging</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
39
pom.xml
39
pom.xml
@@ -2,7 +2,7 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>Alfresco Community Repo Parent</name>
|
||||
|
||||
@@ -51,20 +51,20 @@
|
||||
<dependency.alfresco-log-sanitizer.version>0.2</dependency.alfresco-log-sanitizer.version>
|
||||
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
|
||||
<dependency.activiti.version>5.23.0</dependency.activiti.version>
|
||||
<dependency.alfresco-transform-model.version>1.4.6</dependency.alfresco-transform-model.version>
|
||||
<dependency.alfresco-transform-model.version>1.4.7</dependency.alfresco-transform-model.version>
|
||||
<dependency.alfresco-greenmail.version>6.2</dependency.alfresco-greenmail.version>
|
||||
<dependency.acs-event-model.version>0.0.13</dependency.acs-event-model.version>
|
||||
|
||||
<dependency.spring.version>5.3.14</dependency.spring.version>
|
||||
<dependency.spring.version>5.3.15</dependency.spring.version>
|
||||
<dependency.antlr.version>3.5.2</dependency.antlr.version>
|
||||
<dependency.jackson.version>2.13.0</dependency.jackson.version>
|
||||
<dependency.jackson-databind.version>2.13.1</dependency.jackson-databind.version>
|
||||
<dependency.cxf.version>3.5.0</dependency.cxf.version>
|
||||
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
|
||||
<dependency.webscripts.version>8.27</dependency.webscripts.version>
|
||||
<dependency.webscripts.version>8.28</dependency.webscripts.version>
|
||||
<dependency.bouncycastle.version>1.70</dependency.bouncycastle.version>
|
||||
<dependency.mockito-core.version>3.11.2</dependency.mockito-core.version>
|
||||
<dependency.org-json.version>20210307</dependency.org-json.version>
|
||||
<dependency.org-json.version>20211205</dependency.org-json.version>
|
||||
<dependency.commons-dbcp.version>1.4-DBCP330</dependency.commons-dbcp.version>
|
||||
<dependency.commons-io.version>2.11.0</dependency.commons-io.version>
|
||||
<dependency.gson.version>2.8.5</dependency.gson.version>
|
||||
@@ -72,7 +72,7 @@
|
||||
<dependency.httpcore.version>4.4.15</dependency.httpcore.version>
|
||||
<dependency.commons-httpclient.version>3.1-HTTPCLIENT-1265</dependency.commons-httpclient.version>
|
||||
<dependency.xercesImpl.version>2.12.1</dependency.xercesImpl.version>
|
||||
<dependency.slf4j.version>1.7.32</dependency.slf4j.version>
|
||||
<dependency.slf4j.version>1.7.33</dependency.slf4j.version>
|
||||
<dependency.gytheio.version>0.12</dependency.gytheio.version>
|
||||
<dependency.groovy.version>3.0.9</dependency.groovy.version>
|
||||
<dependency.tika.version>2.2.1</dependency.tika.version>
|
||||
@@ -81,8 +81,8 @@
|
||||
<dependency.poi.version>4.1.2</dependency.poi.version>
|
||||
<dependency.ooxml-schemas.version>1.4</dependency.ooxml-schemas.version>
|
||||
<dependency.keycloak.version>15.0.2</dependency.keycloak.version>
|
||||
<dependency.jboss.logging.version>3.4.2.Final</dependency.jboss.logging.version>
|
||||
<dependency.camel.version>3.7.4</dependency.camel.version>
|
||||
<dependency.jboss.logging.version>3.4.3.Final</dependency.jboss.logging.version>
|
||||
<dependency.camel.version>3.7.7</dependency.camel.version> <!-- when bumping this version, please keep track/sync with included netty.io dependencies (can cause dependency conflicts)-->
|
||||
<dependency.activemq.version>5.16.1</dependency.activemq.version>
|
||||
<dependency.apache-compress.version>1.21</dependency.apache-compress.version>
|
||||
<dependency.apache.taglibs.version>1.2.5</dependency.apache.taglibs.version>
|
||||
@@ -91,6 +91,7 @@
|
||||
<dependency.swagger-parser.version>1.0.56</dependency.swagger-parser.version>
|
||||
<dependency.maven-filtering.version>3.1.1</dependency.maven-filtering.version>
|
||||
<dependency.maven-artifact.version>3.8.4</dependency.maven-artifact.version>
|
||||
<dependency.jdom2.version>2.0.6.1</dependency.jdom2.version>
|
||||
|
||||
<dependency.jakarta-jaxb-api.version>2.3.3</dependency.jakarta-jaxb-api.version>
|
||||
<dependency.jakarta-ws-api.version>2.3.3</dependency.jakarta-ws-api.version>
|
||||
@@ -106,7 +107,7 @@
|
||||
|
||||
<alfresco.googledrive.version>3.2.1.3</alfresco.googledrive.version>
|
||||
<alfresco.aos-module.version>1.4.0.1</alfresco.aos-module.version>
|
||||
<alfresco.api-explorer.version>7.1.0.1</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
<alfresco.api-explorer.version>7.2.0-M2</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
|
||||
|
||||
<alfresco.maven-plugin.version>2.2.0</alfresco.maven-plugin.version>
|
||||
<license-maven-plugin.version>2.0.1.alfresco-1</license-maven-plugin.version>
|
||||
@@ -117,7 +118,7 @@
|
||||
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
|
||||
<dependency.tas-utility.version>3.0.47</dependency.tas-utility.version>
|
||||
<dependency.rest-assured.version>3.3.0</dependency.rest-assured.version>
|
||||
<dependency.tas-restapi.version>1.67</dependency.tas-restapi.version>
|
||||
<dependency.tas-restapi.version>1.68</dependency.tas-restapi.version>
|
||||
<dependency.tas-cmis.version>1.31</dependency.tas-cmis.version>
|
||||
<dependency.tas-email.version>1.8</dependency.tas-email.version>
|
||||
<dependency.tas-webdav.version>1.6</dependency.tas-webdav.version>
|
||||
@@ -145,7 +146,7 @@
|
||||
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
|
||||
<url>https://github.com/Alfresco/alfresco-community-repo</url>
|
||||
<tag>14.80</tag>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
|
||||
<distributionManagement>
|
||||
@@ -654,6 +655,12 @@
|
||||
<artifactId>commons-csv</artifactId>
|
||||
<version>1.9.0</version>
|
||||
</dependency>
|
||||
<!-- upgrade dependency from TIKA -->
|
||||
<dependency>
|
||||
<groupId>org.jdom</groupId>
|
||||
<artifactId>jdom2</artifactId>
|
||||
<version>${dependency.jdom2.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
@@ -783,6 +790,12 @@
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-codec-http</artifactId>
|
||||
<version>4.1.72.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- If you are going to bump dependency.camel.version, please check if the netty-codec-http has higher version that the one above.-->
|
||||
<groupId>org.apache.camel</groupId>
|
||||
<artifactId>camel-amqp</artifactId>
|
||||
<version>${dependency.camel.version}</version>
|
||||
@@ -880,7 +893,7 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.2.1</version>
|
||||
<version>3.2.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
@@ -925,7 +938,7 @@
|
||||
<configuration>
|
||||
<failOnMissing>true</failOnMissing>
|
||||
<excludedScopes>provided,test</excludedScopes>
|
||||
<excludedGroups>^(org\.alfresco|com\.alfresco|org\.activiti).*</excludedGroups>
|
||||
<excludedGroups>^(org\.alfresco|com\.alfresco|org\.activiti|org\.gytheio).*</excludedGroups>
|
||||
<failIfWarning>false</failIfWarning>
|
||||
<includedLicenses>
|
||||
https://raw.githubusercontent.com/Alfresco/third-party-license-overrides/master/includedLicenses.txt
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@@ -47,6 +47,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.transaction.TooBusyException;
|
||||
import org.alfresco.repo.web.scripts.bean.LoginPost;
|
||||
import org.alfresco.service.cmr.repository.ArchivedIOException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.TemplateService;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
@@ -506,6 +507,10 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (ArchivedIOException e) // handle ArchivedIOException to lower log pollution
|
||||
{
|
||||
handleArchivedIOException(e);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
handleIOException(e);
|
||||
@@ -606,6 +611,10 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
// Map TooBusyException to a 503 status code
|
||||
throw new WebScriptException(HttpServletResponse.SC_SERVICE_UNAVAILABLE, e.getMessage(), e);
|
||||
}
|
||||
catch (ArchivedIOException e) // handle ArchivedIOException to lower log pollution
|
||||
{
|
||||
handleArchivedIOException(e);
|
||||
}
|
||||
|
||||
// Ensure a response is always flushed after successful execution
|
||||
if (bufferedRes != null)
|
||||
@@ -615,6 +624,19 @@ public class RepositoryContainer extends AbstractRuntimeContainer
|
||||
}
|
||||
}
|
||||
|
||||
private void handleArchivedIOException(ArchivedIOException e)
|
||||
{
|
||||
if (logger.isDebugEnabled()) // log with stack trace at debug level
|
||||
{
|
||||
logger.debug("ArchivedIOException error ", e);
|
||||
}
|
||||
else if (logger.isInfoEnabled()) // log without stack trace at info level
|
||||
{
|
||||
logger.info("ArchivedIOException error. Message: " + e.getMessage());
|
||||
}
|
||||
throw new WebScriptException(HttpServletResponse.SC_PRECONDITION_FAILED, "Content is archived and not accessible.");
|
||||
}
|
||||
|
||||
private static void handleIOException(final IOException ioe) throws IOException
|
||||
{
|
||||
Throwable socketException = ExceptionStackUtil.getCause(ioe, SocketException.class);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -147,6 +147,25 @@ public interface Renditions
|
||||
void createRenditions(NodeRef nodeRef, String versionId, List<Rendition> renditions, Parameters parameters)
|
||||
throws NotFoundException, ConstraintViolatedException;
|
||||
|
||||
/**
|
||||
* Delete the rendition node.
|
||||
*
|
||||
* @param nodeRef the source nodeRef, ie. live node
|
||||
* @param renditionId the rendition id
|
||||
* @param parameters the {@link Parameters} object to get the parameters passed into the request
|
||||
*/
|
||||
void deleteRendition(NodeRef nodeRef, String renditionId, Parameters parameters);
|
||||
|
||||
/**
|
||||
* Delete the rendition node.
|
||||
*
|
||||
* @param nodeRef the source nodeRef, ie. live node
|
||||
* @param versionId the version id (aka version label)
|
||||
* @param renditionId the rendition id
|
||||
* @param parameters the {@link Parameters} object to get the parameters passed into the request
|
||||
*/
|
||||
void deleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters);
|
||||
|
||||
/**
|
||||
* Downloads rendition.
|
||||
*
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software LimitedP
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software LimitedP
|
||||
* %%
|
||||
* This file is part of the Alfresco software.
|
||||
* If the software was purchased under a paid Alfresco license, the terms of
|
||||
@@ -444,6 +444,31 @@ public class RenditionsImpl implements Renditions, ResourceLoaderAware
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRendition(NodeRef nodeRef, String renditionId, Parameters parameters)
|
||||
{
|
||||
deleteRendition(nodeRef, null, renditionId, parameters);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteRendition(NodeRef nodeRef, String versionId, String renditionId, Parameters parameters)
|
||||
{
|
||||
if (!renditionService2.isEnabled())
|
||||
{
|
||||
throw new DisabledServiceException("Rendition generation has been disabled.");
|
||||
}
|
||||
|
||||
final NodeRef validatedNodeRef = validateNode(nodeRef.getStoreRef(), nodeRef.getId(), versionId, parameters);
|
||||
NodeRef renditionNodeRef = getRenditionByName(validatedNodeRef, renditionId, parameters);
|
||||
|
||||
if (renditionNodeRef == null)
|
||||
{
|
||||
throw new NotFoundException(renditionId + " is not registered.");
|
||||
}
|
||||
|
||||
renditionService2.clearRenditionContentDataInTransaction(renditionNodeRef);
|
||||
}
|
||||
|
||||
private String getName(Rendition rendition)
|
||||
{
|
||||
String renditionName = rendition.getId();
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -65,6 +65,7 @@ public class NodeRenditionsRelation implements RelationshipResourceAction.Read<R
|
||||
RelationshipResourceAction.ReadById<Rendition>,
|
||||
RelationshipResourceAction.Create<Rendition>,
|
||||
RelationshipResourceBinaryAction.Read,
|
||||
RelationshipResourceAction.Delete,
|
||||
InitializingBean
|
||||
{
|
||||
|
||||
@@ -110,6 +111,14 @@ public class NodeRenditionsRelation implements RelationshipResourceAction.Read<R
|
||||
return null;
|
||||
}
|
||||
|
||||
@WebApiDescription(title = "Delete rendition")
|
||||
@Override
|
||||
public void delete(String nodeId, String renditionId, Parameters parameters)
|
||||
{
|
||||
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
|
||||
renditions.deleteRendition(nodeRef, renditionId, parameters);
|
||||
}
|
||||
|
||||
@WebApiDescription(title = "Download rendition", description = "Download rendition")
|
||||
@BinaryProperties({ "content" })
|
||||
@Override
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -48,10 +48,11 @@ import org.springframework.extensions.webscripts.Status;
|
||||
*
|
||||
* Node version renditions
|
||||
*
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions
|
||||
* - POST /nodes/{nodeId}/versions/{versionId}/renditions
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions
|
||||
* - POST /nodes/{nodeId}/versions/{versionId}/renditions
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
|
||||
* - DELETE /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}
|
||||
* - GET /nodes/{nodeId}/versions/{versionId}/renditions/{renditionId}/content
|
||||
*
|
||||
* @author janv
|
||||
*/
|
||||
@@ -59,6 +60,7 @@ import org.springframework.extensions.webscripts.Status;
|
||||
public class NodeVersionRenditionsRelation implements RelationshipResourceAction.Read<Rendition>,
|
||||
RelationshipResourceAction.ReadById<Rendition>,
|
||||
RelationshipResourceAction.Create<Rendition>,
|
||||
RelationshipResourceAction.Delete,
|
||||
RelationshipResourceBinaryAction.Read,
|
||||
InitializingBean
|
||||
{
|
||||
@@ -115,4 +117,13 @@ public class NodeVersionRenditionsRelation implements RelationshipResourceAction
|
||||
return renditions.getContent(nodeRef, versionId, renditionId, parameters);
|
||||
}
|
||||
|
||||
@WebApiDescription(title = "Delete rendition")
|
||||
@Override
|
||||
public void delete(String nodeId, String versionId, Parameters parameters)
|
||||
{
|
||||
String renditionId = parameters.getRelationship2Id();
|
||||
|
||||
NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
|
||||
renditions.deleteRendition(nodeRef, versionId, renditionId, parameters);
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -188,6 +188,8 @@ public class Params implements Parameters
|
||||
builder.append(this.entityId);
|
||||
builder.append(", relationshipId=");
|
||||
builder.append(this.relationshipId);
|
||||
builder.append(", relationship2Id=");
|
||||
builder.append(this.relationship2Id);
|
||||
builder.append(", passedIn=");
|
||||
builder.append(this.passedIn);
|
||||
builder.append(", paging=");
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2020 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -68,6 +68,7 @@ public class ResourceWebScriptDelete extends AbstractResourceWebScript implement
|
||||
final Map<String, String> resourceVars = locator.parseTemplateVars(req.getServiceMatch().getTemplateVars());
|
||||
final String entityId = resourceVars.get(ResourceLocator.ENTITY_ID);
|
||||
final String relationshipId = resourceVars.get(ResourceLocator.RELATIONSHIP_ID);
|
||||
final String relationship2Id = resourceVars.get(ResourceLocator.RELATIONSHIP2_ID);
|
||||
|
||||
final Params.RecognizedParams params = getRecognizedParams(req);
|
||||
|
||||
@@ -78,7 +79,15 @@ public class ResourceWebScriptDelete extends AbstractResourceWebScript implement
|
||||
return Params.valueOf(params, entityId, relationshipId, req);
|
||||
case RELATIONSHIP:
|
||||
// note: relationshipId can be null - when deleting a related set/collection
|
||||
return Params.valueOf(params, entityId, relationshipId, req);
|
||||
if (StringUtils.isNotBlank(relationship2Id))
|
||||
{
|
||||
return Params.valueOf(false, entityId, relationshipId, relationship2Id,
|
||||
null, null, null, params, null, req);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Params.valueOf(params, entityId, relationshipId, req);
|
||||
}
|
||||
case PROPERTY:
|
||||
final String resourceName = resourceVars.get(ResourceLocator.RELATIONSHIP_RESOURCE);
|
||||
final String propertyName = resourceVars.get(ResourceLocator.PROPERTY);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -1035,6 +1035,16 @@ public abstract class AbstractBaseApiTest extends EnterpriseTestApi
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_RENDITIONS;
|
||||
}
|
||||
|
||||
protected String getNodeRenditionIdUrl(String nodeId, String renditionID)
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_RENDITIONS + "/" + renditionID;
|
||||
}
|
||||
|
||||
protected String getNodeVersionRenditionIdUrl(String nodeId, String versionId, String renditionID)
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_VERSIONS + "/" + versionId + "/" + URL_RENDITIONS + "/" + renditionID;
|
||||
}
|
||||
|
||||
protected String getNodeVersionsUrl(String nodeId)
|
||||
{
|
||||
return URL_NODES + "/" + nodeId + "/" + URL_VERSIONS;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Remote API
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -6366,5 +6366,92 @@ public class NodeApiTest extends AbstractSingleNetworkSiteTest
|
||||
|
||||
HttpResponse dauResponse = post(getRequestContentDirectUrl(contentNodeId), null, null, null, null, 501);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRequestDeleteRendition() throws Exception
|
||||
{
|
||||
setRequestContext(networkOne.getId(), user1, null);
|
||||
|
||||
String myNodeId = getMyNodeId();
|
||||
|
||||
// Create multipart request - txt file
|
||||
String renditionName = "pdf";
|
||||
String fileName = "quick-1.txt";
|
||||
File file = getResourceFile(fileName);
|
||||
MultiPartRequest reqBody = MultiPartBuilder.create()
|
||||
.setFileData(new FileData(fileName, file))
|
||||
.setRenditions(Collections.singletonList(renditionName))
|
||||
.build();
|
||||
|
||||
//Upload file to user home node
|
||||
HttpResponse response = post(getNodeChildrenUrl(myNodeId), reqBody.getBody(), null, reqBody.getContentType(), 201);
|
||||
Document document = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
String contentNodeId = document.getId();
|
||||
|
||||
// wait and check that rendition is created ...
|
||||
Rendition rendition = waitAndGetRendition(contentNodeId, null, renditionName);
|
||||
assertNotNull(rendition);
|
||||
assertEquals(Rendition.RenditionStatus.CREATED, rendition.getStatus());
|
||||
|
||||
//clean rendition
|
||||
delete(getNodeRenditionIdUrl(contentNodeId, renditionName), null, null, null, null, 204);
|
||||
//retry to double-check deletion
|
||||
delete(getNodeRenditionIdUrl(contentNodeId, renditionName), null, null, null, null, 404);
|
||||
|
||||
//check if rendition was cleaned
|
||||
HttpResponse getResponse = getSingle(getNodeRenditionIdUrl(contentNodeId, renditionName), null, 200);
|
||||
Rendition renditionDeleted = RestApiUtil.parseRestApiEntry(getResponse.getJsonResponse(), Rendition.class);
|
||||
assertNotNull(renditionDeleted);
|
||||
assertEquals(Rendition.RenditionStatus.NOT_CREATED, renditionDeleted.getStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testRequestVersionDeleteRendition() throws Exception
|
||||
{
|
||||
setRequestContext(networkOne.getId(), user1, null);
|
||||
|
||||
String myNodeId = getMyNodeId();
|
||||
|
||||
// Create multipart request - txt file
|
||||
String renditionName = "pdf";
|
||||
String fileName = "quick-1.txt";
|
||||
File file = getResourceFile(fileName);
|
||||
MultiPartRequest reqBody = MultiPartBuilder.create()
|
||||
.setFileData(new FileData(fileName, file))
|
||||
.setRenditions(Collections.singletonList(renditionName))
|
||||
.build();
|
||||
|
||||
//Upload file to user home node
|
||||
HttpResponse response = post(getNodeChildrenUrl(myNodeId), reqBody.getBody(), null, reqBody.getContentType(), 201);
|
||||
Document document = RestApiUtil.parseRestApiEntry(response.getJsonResponse(), Document.class);
|
||||
String contentNodeId = document.getId();
|
||||
|
||||
//Update file to newer version
|
||||
String content = "The quick brown fox jumps over the lazy dog\n the lazy dog jumps over the quick brown fox";
|
||||
Map<String, String> params = new HashMap<>();
|
||||
params.put("comment", "my version ");
|
||||
|
||||
document = updateTextFile(contentNodeId, content, params);
|
||||
assertTrue(document.getAspectNames().contains("cm:versionable"));
|
||||
assertNotNull(document.getProperties());
|
||||
assertEquals("1.1", document.getProperties().get("cm:versionLabel"));
|
||||
|
||||
// create rendition for old version and check that rendition is created ...
|
||||
Rendition renditionUpdated = createAndGetRendition(contentNodeId, "1.0", renditionName);
|
||||
assertNotNull(renditionUpdated);
|
||||
assertEquals(Rendition.RenditionStatus.CREATED, renditionUpdated.getStatus());
|
||||
|
||||
//clean rendition
|
||||
delete(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, null, null, null, 204);
|
||||
//retry to double-check deletion
|
||||
delete(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, null, null, null, 404);
|
||||
|
||||
//check if rendition was cleaned
|
||||
HttpResponse getResponse = getSingle(getNodeVersionRenditionIdUrl(contentNodeId, "1.0", renditionName), null, 200);
|
||||
Rendition renditionDeleted = RestApiUtil.parseRestApiEntry(getResponse.getJsonResponse(), Rendition.class);
|
||||
assertNotNull(renditionDeleted);
|
||||
assertEquals(Rendition.RenditionStatus.NOT_CREATED, renditionDeleted.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@@ -204,7 +204,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
|
||||
assertEquals(d1Id, resp.getNodeId());
|
||||
assertEquals(fileName1, resp.getName());
|
||||
assertEquals("The quick brown fox jumps over the lazy dog", resp.getTitle());
|
||||
assertEquals("Gym class featuring a brown fox and lazy dog", resp.getDescription());
|
||||
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", resp.getDescription());
|
||||
|
||||
assertEquals(file1_MimeType, resp.getContent().getMimeType());
|
||||
assertEquals("Adobe PDF Document", resp.getContent().getMimeTypeName());
|
||||
@@ -245,7 +245,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
|
||||
assertEquals(shared1Id, resp.getId());
|
||||
assertEquals(fileName1, resp.getName());
|
||||
assertEquals("The quick brown fox jumps over the lazy dog", resp.getTitle());
|
||||
assertEquals("Gym class featuring a brown fox and lazy dog", resp.getDescription());
|
||||
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", resp.getDescription());
|
||||
assertEquals(d1Id, resp.getNodeId());
|
||||
assertNull(resp.getAllowableOperations()); // include is ignored
|
||||
assertNull(resp.getAllowableOperationsOnTarget()); // include is ignored
|
||||
@@ -1319,7 +1319,7 @@ public class SharedLinkApiTest extends AbstractBaseApiTest
|
||||
|
||||
// Quick check that some extended info is present.
|
||||
assertEquals("The quick brown fox jumps over the lazy dog", sharedLink.getTitle());
|
||||
assertEquals("Gym class featuring a brown fox and lazy dog", sharedLink.getDescription());
|
||||
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog", sharedLink.getDescription());
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-community-repo</artifactId>
|
||||
<version>14.80</version>
|
||||
<version>14.92-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@@ -427,12 +427,12 @@
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<version>3.5.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis</groupId>
|
||||
<artifactId>mybatis-spring</artifactId>
|
||||
<version>1.2.5</version>
|
||||
<version>2.0.6</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Activiti -->
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -28,6 +28,7 @@ package org.alfresco.ibatis;
|
||||
import org.alfresco.metrics.db.DBMetricsReporter;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.ibatis.cursor.Cursor;
|
||||
import org.apache.ibatis.executor.BatchResult;
|
||||
import org.apache.ibatis.session.Configuration;
|
||||
import org.apache.ibatis.session.ResultContext;
|
||||
@@ -246,6 +247,48 @@ public class SqlSessionMetricsWrapper implements SqlSession
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Cursor<T> selectCursor(String statement)
|
||||
{
|
||||
long startTime = System.currentTimeMillis();
|
||||
try
|
||||
{
|
||||
return this.sqlSession.selectCursor(statement);
|
||||
}
|
||||
finally
|
||||
{
|
||||
reportQueryExecuted(startTime, SELECT_LABEL, statement);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Cursor<T> selectCursor(String statement, Object parameter)
|
||||
{
|
||||
long startTime = System.currentTimeMillis();
|
||||
try
|
||||
{
|
||||
return this.sqlSession.selectCursor(statement, parameter);
|
||||
}
|
||||
finally
|
||||
{
|
||||
reportQueryExecuted(startTime, SELECT_LABEL, statement);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> Cursor<T> selectCursor(String statement, Object parameter, RowBounds rowBounds)
|
||||
{
|
||||
long startTime = System.currentTimeMillis();
|
||||
try
|
||||
{
|
||||
return this.sqlSession.selectCursor(statement, parameter, rowBounds);
|
||||
}
|
||||
finally
|
||||
{
|
||||
reportQueryExecuted(startTime, SELECT_LABEL, statement);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(String statement)
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -112,6 +112,14 @@ public interface RenditionService2
|
||||
@NotAuditable
|
||||
ChildAssociationRef getRenditionByName(NodeRef sourceNodeRef, String renditionName);
|
||||
|
||||
/**
|
||||
* This method clears source nodeRef rendition content and content hash code using supplied rendition name.
|
||||
*
|
||||
* @param renditionNode the rendition node
|
||||
*/
|
||||
@NotAuditable
|
||||
void clearRenditionContentDataInTransaction(NodeRef renditionNode);
|
||||
|
||||
/**
|
||||
* Indicates if renditions are enabled. Set using the {@code system.thumbnail.generate} value.
|
||||
*/
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -38,6 +38,7 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.util.PostTxnCallbackScheduler;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -553,11 +554,21 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
|
||||
contentWriter.setEncoding(DEFAULT_ENCODING);
|
||||
ContentWriter renditionWriter = contentWriter;
|
||||
renditionWriter.putContent(transformInputStream);
|
||||
if (logger.isDebugEnabled())
|
||||
|
||||
ContentReader contentReader = renditionWriter.getReader();
|
||||
long sizeOfRendition = contentReader.getSize();
|
||||
if (sizeOfRendition > 0L)
|
||||
{
|
||||
logger.debug("Set rendition hashcode for " + renditionName);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Set rendition hashcode for " + renditionName);
|
||||
}
|
||||
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.error("Transform was zero bytes for " + renditionName + " on " + sourceNodeRef);
|
||||
clearRenditionContentData(renditionNode);
|
||||
}
|
||||
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -892,6 +903,17 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearRenditionContentDataInTransaction(NodeRef renditionNode)
|
||||
{
|
||||
AuthenticationUtil.runAsSystem((AuthenticationUtil.RunAsWork<Void>) () ->
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(() ->
|
||||
{
|
||||
clearRenditionContentData(renditionNode);
|
||||
return null;
|
||||
}, false, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled()
|
||||
{
|
||||
|
@@ -49,12 +49,12 @@
|
||||
|
||||
<select id="select_Tenant" resultMap="result_Tenant">
|
||||
select
|
||||
tenant_domain as tenantDomain,
|
||||
tenant_domain as tenant_domain,
|
||||
version as version,
|
||||
enabled as enabled,
|
||||
tenant_name as tenantName,
|
||||
content_root as contentRoot,
|
||||
db_url as dbUrl
|
||||
enabled enabled,
|
||||
tenant_name tenant_name,
|
||||
content_root content_root,
|
||||
db_url db_url
|
||||
from
|
||||
alf_tenant
|
||||
where
|
||||
@@ -63,12 +63,12 @@
|
||||
|
||||
<select id="select_Tenants" parameterType="TenantQuery" resultMap="result_Tenant">
|
||||
select
|
||||
tenant_domain as tenantDomain,
|
||||
version as version,
|
||||
enabled as enabled,
|
||||
tenant_name as tenantName,
|
||||
content_root as contentRoot,
|
||||
db_url as dbUrl
|
||||
tenant_domain as tenant_domain,
|
||||
version as version,
|
||||
enabled as enabled,
|
||||
tenant_name as tenant_name,
|
||||
content_root as content_root,
|
||||
db_url as db_url
|
||||
from
|
||||
alf_tenant
|
||||
<where>
|
||||
|
@@ -15,7 +15,7 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="Ids" resultMap="alfresco.node.result_ChildAssocIds" fetchSize="-2147483648">
|
||||
<select id="select_ChildNodeIds_Limited" parameterType="ChildAssoc" resultMap="alfresco.node.result_ChildAssocIds" fetchSize="-2147483648">
|
||||
<include refid="alfresco.node.select_ChildNodeIds_Limited_Snippet"/>
|
||||
</select>
|
||||
|
||||
|
@@ -430,7 +430,7 @@ public class ActionServiceImpl2Test
|
||||
{
|
||||
public Void execute() throws Throwable
|
||||
{
|
||||
assertEquals("Gym class featuring a brown fox and lazy dog",
|
||||
assertEquals("Pangram, fox, dog, Gym class featuring a brown fox and lazy dog",
|
||||
nodeService.getProperty(testNode, ContentModel.PROP_DESCRIPTION));
|
||||
return null;
|
||||
}
|
||||
|
@@ -85,7 +85,7 @@ import java.util.Set;
|
||||
public class ContentMetadataExtracterTest extends BaseSpringTest
|
||||
{
|
||||
protected static final String QUICK_TITLE = "The quick brown fox jumps over the lazy dog";
|
||||
protected static final String QUICK_DESCRIPTION = "Gym class featuring a brown fox and lazy dog";
|
||||
protected static final String QUICK_DESCRIPTION = "Pangram, fox, dog, Gym class featuring a brown fox and lazy dog";
|
||||
protected static final String QUICK_CREATOR = "Nevin Nollop";
|
||||
|
||||
private NodeService nodeService;
|
||||
|
@@ -84,7 +84,7 @@ public abstract class AbstractMetadataExtracterTest extends TestCase
|
||||
protected ApplicationContext ctx;
|
||||
|
||||
public static final String QUICK_TITLE = "The quick brown fox jumps over the lazy dog";
|
||||
public static final String QUICK_DESCRIPTION = "Gym class featuring a brown fox and lazy dog";
|
||||
public static final String QUICK_DESCRIPTION = "Pangram, fox, dog, Gym class featuring a brown fox and lazy dog";
|
||||
public static final String QUICK_CREATOR = "Nevin Nollop";
|
||||
public static final String QUICK_CREATOR_EMAIL = "nevin.nollop@alfresco.com";
|
||||
public static final String QUICK_PREVIOUS_AUTHOR = "Derek Hulley";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2021 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -28,6 +28,8 @@ package org.alfresco.repo.rendition2;
|
||||
import static org.alfresco.model.ContentModel.PROP_CONTENT;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
@@ -358,7 +360,25 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
|
||||
* </p>
|
||||
*/
|
||||
@Test
|
||||
public void testRenditionWithoutContentButWithContentHashCode()
|
||||
public void testRenditionWithNullContentButWithContentHashCode()
|
||||
{
|
||||
testRenditionWithoutContentButWithContentHashCode(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests if a rendition without content (but with contentHashCode) can be generated again.
|
||||
* <p>
|
||||
* If the rendition consumption receives a zero length InputStream, the contentHashCode should be cleaned from the
|
||||
* rendition node, allowing new requests to generate the rendition.
|
||||
* </p>
|
||||
*/
|
||||
@Test
|
||||
public void testRenditionWithZeroContentButWithContentHashCode()
|
||||
{
|
||||
testRenditionWithoutContentButWithContentHashCode(new ByteArrayInputStream(new byte[0]));
|
||||
}
|
||||
|
||||
private void testRenditionWithoutContentButWithContentHashCode(InputStream transformInputStream)
|
||||
{
|
||||
// Create a node with an actual rendition
|
||||
NodeRef sourceNodeRef = createSource(ADMIN, "quick.jpg");
|
||||
@@ -379,7 +399,7 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
|
||||
// This is explicitly called to prove that rendition hash code will be cleaned (as opposite to previous behavior)
|
||||
RenditionDefinition2 renditionDefinition = renditionDefinitionRegistry2.getRenditionDefinition(DOC_LIB);
|
||||
AuthenticationUtil.runAs(() -> {
|
||||
renditionService2.consume(sourceNodeRef, null, renditionDefinition, contentHashCode);
|
||||
renditionService2.consume(sourceNodeRef, transformInputStream, renditionDefinition, contentHashCode);
|
||||
return null;
|
||||
}, ADMIN);
|
||||
waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, false);
|
||||
|
Reference in New Issue
Block a user