mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-10 14:11:58 +00:00
Compare commits
32 Commits
20.157
...
23.1.0.103
Author | SHA1 | Date | |
---|---|---|---|
|
0d1a6c8a0a | ||
|
4b9c052f0d | ||
|
6fb0bb3042 | ||
|
78f3d58c46 | ||
|
1913258e84 | ||
|
d95e6c8e34 | ||
|
958d217339 | ||
|
4417e28412 | ||
|
58653cb523 | ||
|
7af935d43a | ||
|
f5d843446a | ||
|
817901e74e | ||
|
c492683113 | ||
|
e2305d053f | ||
|
749768457e | ||
|
118f2ecbab | ||
|
a4ac93df7a | ||
|
1e1fbe8207 | ||
|
e78f9ced98 | ||
|
72221c777d | ||
|
25f3f33594 | ||
|
f83328f7b0 | ||
|
a177f391db | ||
|
784557afcd | ||
|
8fb7b0d224 | ||
|
011ec9d7e6 | ||
|
3900f589d9 | ||
|
def7a0d432 | ||
|
7371c5d7ff | ||
|
90406cef03 | ||
|
862e6d5596 | ||
|
27be717df5 |
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -3,8 +3,8 @@
|
||||
#
|
||||
|
||||
# Version label
|
||||
version.major=7
|
||||
version.minor=4
|
||||
version.major=23
|
||||
version.minor=1
|
||||
version.revision=0
|
||||
version.label=
|
||||
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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>
|
||||
|
@@ -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
20
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>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>
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
@@ -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));
|
||||
|
@@ -3,7 +3,7 @@
|
||||
repository.name=Main Repository
|
||||
|
||||
# Schema number
|
||||
version.schema=18000
|
||||
version.schema=19000
|
||||
|
||||
# Directory configuration
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user