Compare commits

..

32 Commits

Author SHA1 Message Date
alfresco-build
0d1a6c8a0a [maven-release-plugin][skip ci] prepare release 23.1.0.103 2023-05-15 13:39:29 +00:00
Tom Page
4b9c052f0d Merge pull request #1918 from Alfresco/feature/ACS-5191_LicensePluginUpgrade
ACS-5191 Upgrade to license-maven-plugin 2.0.1.
2023-05-15 13:52:09 +01:00
alfresco-build
6fb0bb3042 [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-14 00:05:55 +00:00
alfresco-build
78f3d58c46 [maven-release-plugin][skip ci] prepare release 23.1.0.102 2023-05-14 00:05:52 +00:00
Alfresco CI User
1913258e84 [force] Force release for 2023-05-14. 2023-05-14 00:02:52 +00:00
Tom Page
d95e6c8e34 ACS-5191 Upgrade to license-maven-plugin 2.0.1. 2023-05-12 16:19:38 +01:00
alfresco-build
958d217339 [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-11 09:43:05 +00:00
alfresco-build
4417e28412 [maven-release-plugin][skip ci] prepare release 23.1.0.101 2023-05-11 09:43:02 +00:00
Damian Ujma
58653cb523 ACS-5087 Add more attempts to create a folder in RenditionIntegrationTests (#1904)
* ACS-5087 Add more attempts to create a folder

* ACS-5087 Use awaitility to add more attempts to create a folder

* ACS-5087 Add ignoreExceptions condition

* ACS-5087 Use a smaller pollInterval
2023-05-11 10:59:38 +02:00
alfresco-build
7af935d43a [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-08 12:41:15 +00:00
alfresco-build
f5d843446a [maven-release-plugin][skip ci] prepare release 23.1.0.100 2023-05-08 12:41:11 +00:00
mstrankowski
817901e74e Update Master branch to 23.1.0, forgotten updates 2023-05-08 13:52:16 +02:00
mstrankowski
c492683113 Update Master branch to 23.1.0 2023-05-08 13:02:01 +02:00
alfresco-build
e2305d053f [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-07 00:07:14 +00:00
alfresco-build
749768457e [maven-release-plugin][skip ci] prepare release 20.163 2023-05-07 00:07:11 +00:00
Alfresco CI User
118f2ecbab [force] Force release for 2023-05-07. 2023-05-07 00:03:02 +00:00
alfresco-build
a4ac93df7a [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-04 07:56:19 +00:00
alfresco-build
1e1fbe8207 [maven-release-plugin][skip ci] prepare release 20.162 2023-05-04 07:56:16 +00:00
Sara
e78f9ced98 ACS-5157_Bump_api-explorer_to_7-4-0 (#1912) 2023-05-04 08:10:00 +01:00
alfresco-build
72221c777d [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-03 20:54:48 +00:00
alfresco-build
25f3f33594 [maven-release-plugin][skip ci] prepare release 20.161 2023-05-03 20:54:45 +00:00
tiagosalvado10
f83328f7b0 [MNT-23550] Always disable behaviours to prevent unexpected modifier changes (#1898) 2023-05-03 20:34:37 +01:00
alfresco-build
a177f391db [maven-release-plugin][skip ci] prepare for next development iteration 2023-05-02 05:22:45 +00:00
alfresco-build
784557afcd [maven-release-plugin][skip ci] prepare release 20.160 2023-05-02 05:22:41 +00:00
MohinishSah
8fb7b0d224 Update G-drive and AOS final version 2023-05-01 12:24:30 +05:30
alfresco-build
011ec9d7e6 [maven-release-plugin][skip ci] prepare for next development iteration 2023-04-30 00:06:05 +00:00
alfresco-build
3900f589d9 [maven-release-plugin][skip ci] prepare release 20.159 2023-04-30 00:06:02 +00:00
Alfresco CI User
def7a0d432 [force] Force release for 2023-04-30. 2023-04-30 00:02:53 +00:00
alfresco-build
7371c5d7ff [maven-release-plugin][skip ci] prepare for next development iteration 2023-04-28 16:36:05 +00:00
alfresco-build
90406cef03 [maven-release-plugin][skip ci] prepare release 20.158 2023-04-28 16:36:01 +00:00
Sara
862e6d5596 ACS-5075 and ACS-4832 Bump t-core and t-service to 3.1.0 and 2.1.0 (#1906) 2023-04-28 16:05:00 +01:00
alfresco-build
27be717df5 [maven-release-plugin][skip ci] prepare for next development iteration 2023-04-26 12:50:39 +00:00
29 changed files with 126 additions and 55 deletions

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>

View File

@@ -3,8 +3,8 @@
#
# Version label
version.major=7
version.minor=4
version.major=23
version.minor=1
version.revision=0
version.label=

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>
@@ -20,7 +20,6 @@
<org.glassfish.version>1.1.4</org.glassfish.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>
<java.version>11</java.version>
</properties>
@@ -85,6 +84,13 @@
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${dependency.awaitility.version}</version>
<scope>test</scope>
</dependency>
<!-- REST ASSURED -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>

View File

@@ -1,5 +1,7 @@
package org.alfresco.rest.renditions;
import java.time.Duration;
import com.google.common.base.Predicates;
import org.alfresco.rest.RestTest;
import org.alfresco.rest.core.RestResponse;
import org.alfresco.rest.model.RestNodeModel;
@@ -8,6 +10,8 @@ import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.FolderModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.UserModel;
import org.awaitility.Awaitility;
import org.awaitility.Durations;
import org.springframework.http.HttpStatus;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
@@ -68,15 +72,23 @@ public abstract class RenditionIntegrationTests extends RestTest
*/
protected RestNodeModel uploadFile(String sourceFile) throws Exception
{
FolderModel folder = FolderModel.getRandomFolderModel();
folder = dataContent.usingUser(user).usingSite(site).createFolder(folder);
FolderModel folder = Awaitility
.await()
.atMost(Duration.ofSeconds(30))
.pollInterval(Durations.ONE_SECOND)
.ignoreExceptions()
.until(() -> {
FolderModel randomFolderModel = FolderModel.getRandomFolderModel();
return dataContent.usingUser(user).usingSite(site).createFolder(randomFolderModel);
}, Predicates.notNull());
restClient.authenticateUser(user).configureRequestSpec()
.addMultiPart("filedata", Utility.getResourceTestDataFile(sourceFile));
.addMultiPart("filedata", Utility.getResourceTestDataFile(sourceFile));
RestNodeModel fileNode = restClient.authenticateUser(user).withCoreAPI().usingNode(folder).createNode();
Assert.assertEquals(Integer.valueOf(restClient.getStatusCode()).intValue(), HttpStatus.CREATED.value(),
"Failed to created a node for rendition tests using file " + sourceFile);
"Failed to created a node for rendition tests using file " + sourceFile);
return fileNode;
}
}

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<properties>

20
pom.xml
View File

@@ -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>20.157</version>
<version>23.1.0.103</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -23,8 +23,8 @@
</modules>
<properties>
<acs.version.major>7</acs.version.major>
<acs.version.minor>4</acs.version.minor>
<acs.version.major>23</acs.version.major>
<acs.version.minor>1</acs.version.minor>
<acs.version.revision>0</acs.version.revision>
<acs.version.label />
<amp.min.version>${acs.version.major}.0.0</amp.min.version>
@@ -52,8 +52,8 @@
<dependency.alfresco-messaging-repo.version>1.2.20</dependency.alfresco-messaging-repo.version>
<dependency.activiti-engine.version>5.23.0</dependency.activiti-engine.version>
<dependency.activiti.version>5.23.0</dependency.activiti.version>
<dependency.alfresco-transform-service.version>2.1.0-A9</dependency.alfresco-transform-service.version>
<dependency.alfresco-transform-core.version>3.1.0-A12</dependency.alfresco-transform-core.version>
<dependency.alfresco-transform-service.version>2.1.0</dependency.alfresco-transform-service.version>
<dependency.alfresco-transform-core.version>3.1.0</dependency.alfresco-transform-core.version>
<dependency.alfresco-greenmail.version>6.5</dependency.alfresco-greenmail.version>
<dependency.acs-event-model.version>0.0.18</dependency.acs-event-model.version>
@@ -111,12 +111,12 @@
<dependency.json-smart.version>2.4.10</dependency.json-smart.version>
<dependency.jakarta-rpc-api.version>1.1.4</dependency.jakarta-rpc-api.version>
<alfresco.googledrive.version>3.4.0-A4</alfresco.googledrive.version>
<alfresco.aos-module.version>1.6.0-A5</alfresco.aos-module.version>
<alfresco.api-explorer.version>7.3.0</alfresco.api-explorer.version> <!-- Also in alfresco-enterprise-share -->
<alfresco.googledrive.version>3.4.0</alfresco.googledrive.version>
<alfresco.aos-module.version>1.6.0</alfresco.aos-module.version>
<alfresco.api-explorer.version>7.4.0</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-2</license-maven-plugin.version>
<license-maven-plugin.version>2.0.1</license-maven-plugin.version>
<dependency.postgresql.version>42.5.2</dependency.postgresql.version>
<dependency.mysql.version>8.0.30</dependency.mysql.version>
@@ -150,7 +150,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>20.157</tag>
<tag>23.1.0.103</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.157</version>
<version>23.1.0.103</version>
</parent>
<dependencies>

View File

@@ -514,15 +514,11 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
NodeRef renditionNode = getRenditionNode(sourceNodeRef, renditionName);
boolean createRenditionNode = renditionNode == null;
boolean sourceHasAspectRenditioned = nodeService.hasAspect(sourceNodeRef, RenditionModel.ASPECT_RENDITIONED);
boolean sourceChanges = !sourceHasAspectRenditioned || createRenditionNode || transformInputStream == null;
try
{
if (sourceChanges)
{
ruleService.disableRuleType(RuleType.UPDATE);
behaviourFilter.disableBehaviour(sourceNodeRef, ContentModel.ASPECT_AUDITABLE);
behaviourFilter.disableBehaviour(sourceNodeRef, ContentModel.ASPECT_VERSIONABLE);
}
ruleService.disableRuleType(RuleType.UPDATE);
behaviourFilter.disableBehaviour(sourceNodeRef, ContentModel.ASPECT_AUDITABLE);
behaviourFilter.disableBehaviour(sourceNodeRef, ContentModel.ASPECT_VERSIONABLE);
// If they do not exist create the rendition association and the rendition node.
if (createRenditionNode)
@@ -592,12 +588,9 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
}
finally
{
if (sourceChanges)
{
behaviourFilter.enableBehaviour(sourceNodeRef, ContentModel.ASPECT_AUDITABLE);
behaviourFilter.enableBehaviour(sourceNodeRef, ContentModel.ASPECT_VERSIONABLE);
ruleService.enableRuleType(RuleType.UPDATE);
}
behaviourFilter.enableBehaviour(sourceNodeRef, ContentModel.ASPECT_AUDITABLE);
behaviourFilter.enableBehaviour(sourceNodeRef, ContentModel.ASPECT_VERSIONABLE);
ruleService.enableRuleType(RuleType.UPDATE);
}
return null;
}, false, true));

View File

@@ -3,7 +3,7 @@
repository.name=Main Repository
# Schema number
version.schema=18000
version.schema=19000
# Directory configuration

View File

@@ -30,6 +30,7 @@ import static org.junit.Assert.assertNotEquals;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.model.ContentModel;
@@ -419,6 +420,65 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
assertTrue("New rendition content hash code was not generated", isValidRenditionContentHashCode(contentHashCode3));
}
@Test
public void testModifierAfterMultipleRenditionRequests() throws InterruptedException
{
String user1 = createRandomUser();
String user2 = createRandomUser();
List<NodeRef> nodes = new ArrayList<NodeRef>();
final int TOTAL_NODES = 10;
// Create nodes
for (int i = 0; i < TOTAL_NODES; i++)
{
NodeRef n = createSource(user1, "quick.jpg");
render(user1, n, DOC_LIB);
nodes.add(n);
}
// Ask rendition multiple times with 'user2'
for (int j = 0; j < 10; j++)
{
for (int i = 0; i < TOTAL_NODES; i++)
{
render(user2, nodes.get(i), DOC_LIB);
}
}
for (int i = 0; i < TOTAL_NODES; i++)
{
waitForRendition(user1, nodes.get(i), DOC_LIB, true);
}
// Check the modifier is still user1
assertEquals(TOTAL_NODES, countModifier(nodes, user1));
}
private int countModifier(List<NodeRef> nodes, String user)
{
int count = 0;
for (int i = 0; i < nodes.size(); i++)
{
count += compareModifier(nodes.get(i), user);
}
return count;
}
private int compareModifier(NodeRef nodeRef, String user)
{
int res = 0;
if (nodeRef != null && user != null)
{
String modifier = nodeService.getProperty(nodeRef, ContentModel.PROP_MODIFIER).toString();
if (user.equals(modifier))
{
res = 1;
}
}
return res;
}
/**
* @deprecated can be removed when we remove the original RenditionService
*/
@@ -622,4 +682,4 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
renditionService2.setEnabled(true);
}
}
}
}