Compare commits

..

1 Commits

Author SHA1 Message Date
dsaini
f0478515e6 check push test 2021-11-17 09:33:36 +05:30
66 changed files with 224 additions and 907 deletions

View File

@@ -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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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.4
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.5.3
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"

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.4
TRANSFORMERS_TAG=2.5.3
SOLR6_TAG=2.0.2-RC1
POSTGRES_TAG=13.3
ACTIVEMQ_TAG=5.16.1

View File

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

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -192,8 +192,6 @@ public class MimetypeMap implements MimetypeService
public static final String MIMETYPE_IMAGE_DWT = "image/x-dwt";
public static final String MIMETYPE_IMAGE_ICNS = "image/icns";
public static final String MIMETYPE_APPLICATION_EPS = "application/eps";
public static final String MIMETYPE_APPLICATION_PS = "application/postscript";

View File

@@ -1,53 +0,0 @@
/*
* #%L
* Alfresco Data model classes
* %%
* Copyright (C) 2005 - 2021 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.service.cmr.repository;
import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.service.Experimental;
/**
* Unable to access as content is in an Archived state.
* Default status is <i>Precondition Failed<i> Client Error = 412
*
* @author David Edwards
*/
@Experimental
@AlfrescoPublicApi
public class ArchivedIOException extends ContentIOException
{
private static final long serialVersionUID = 3258135874596276087L;
public ArchivedIOException(String msg)
{
super(msg);
}
public ArchivedIOException(String msg, Throwable cause)
{
super(msg, cause);
}
}

View File

@@ -611,10 +611,6 @@
<mimetype mimetype="application/vnd.apple.numbers" display="Apple iWork Numbers">
<extension>numbers</extension>
</mimetype>
<!-- Apple ICNS files -->
<mimetype mimetype="image/icns" display="Apple Icon">
<extension>icns</extension>
</mimetype>
<!-- Markdown -->
<mimetype mimetype="text/x-markdown" display="Markdown">

View File

@@ -94,8 +94,7 @@ public class MimetypeMapTest extends TestCase
// other text forms
assertEquals("text/csv", mimetypesByExtension.get("csv"));
assertEquals("text/html", mimetypesByExtension.get("html"));
assertEquals("image/icns", mimetypesByExtension.get("icns"));
// JPEG
assertEquals("jpg", extensionsByMimetype.get("image/jpeg"));
assertEquals("image/jpeg", mimetypesByExtension.get("jpg"));

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<dependencies>

View File

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

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<modules>

View File

@@ -1,4 +1,4 @@
TRANSFORMERS_TAG=2.5.4
TRANSFORMERS_TAG=2.5.3
SOLR6_TAG=2.0.2
POSTGRES_TAG=13.3
ACTIVEMQ_TAG=5.16.1

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -198,15 +198,4 @@ public class UnlockFileTests extends WebDavTest
.then().unlock()
.and().assertThat().hasStatus(HttpStatus.NO_CONTENT.value()).and().assertThat().isUnlocked();
}
@TestRail(section={TestGroup.PROTOCOLS, TestGroup.WEBDAV}, executionType= ExecutionType.SANITY,
description ="Checks no existent file is not locked (and status 404)")
@Test(groups = {TestGroup.PROTOCOLS, TestGroup.WEBDAV, TestGroup.SANITY})
public void checkLockStatusForNonExistentFile() throws Exception
{
testFile = FileModel.getRandomFileModel(FileType.TEXT_PLAIN, content);
webDavProtocol.authenticateUser(dataUser.getAdminUser()).
usingResource(testFile).
assertThat().isUnlocked().assertThat().hasStatus(HttpStatus.NOT_FOUND.value());
}
}

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<properties>

View File

@@ -2,7 +2,7 @@
#%L
Alfresco Repository WAR Community
%%
Copyright (C) 2005 - 2021 Alfresco Software Limited
Copyright (C) 2005 - 2016 Alfresco Software Limited
%%
This file is part of the Alfresco software.
If the software was purchased under a paid Alfresco license, the terms of
@@ -35,6 +35,15 @@
<%@ page import="org.alfresco.service.cmr.module.ModuleInstallState" %>
<%@ page import="java.util.Calendar" %>
<!-- Enterprise index-jsp placeholder -->
<%
// route WebDAV requests
if (request.getMethod().equalsIgnoreCase("PROPFIND") || request.getMethod().equalsIgnoreCase("OPTIONS"))
{
response.sendRedirect(request.getContextPath() + "/webdav/");
}
%>
<%
WebApplicationContext context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext());
SysAdminParams sysAdminParams = (SysAdminParams)context.getBean("sysAdminParams");

13
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>14.40</version>
<version>14.28-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -12,6 +12,7 @@
<version>12</version>
</parent>
<modules>
<module>core</module>
<module>data-model</module>
@@ -51,7 +52,7 @@
<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.3</dependency.alfresco-transform-model.version>
<dependency.alfresco-transform-model.version>1.4.0</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>
@@ -61,7 +62,7 @@
<dependency.jackson-databind.version>2.12.4</dependency.jackson-databind.version>
<dependency.cxf.version>3.4.5</dependency.cxf.version>
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
<dependency.webscripts.version>8.26</dependency.webscripts.version>
<dependency.webscripts.version>8.24</dependency.webscripts.version>
<dependency.bouncycastle.version>1.69</dependency.bouncycastle.version>
<dependency.mockito-core.version>3.11.2</dependency.mockito-core.version>
<dependency.org-json.version>20210307</dependency.org-json.version>
@@ -113,9 +114,9 @@
<dependency.mysql.version>8.0.25</dependency.mysql.version>
<dependency.mysql-image.version>8</dependency.mysql-image.version>
<dependency.mariadb.version>2.7.4</dependency.mariadb.version>
<dependency.tas-utility.version>3.0.47</dependency.tas-utility.version>
<dependency.tas-utility.version>3.0.45</dependency.tas-utility.version>
<dependency.rest-assured.version>3.3.0</dependency.rest-assured.version>
<dependency.tas-restapi.version>1.65</dependency.tas-restapi.version>
<dependency.tas-restapi.version>1.64</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>
@@ -143,7 +144,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.40</tag>
<tag>HEAD</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<dependencies>
@@ -47,7 +47,7 @@
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>2.3.0</version>
<version>2.2.3</version>
</dependency>
<!-- newer version, see REPO-3133 -->
<dependency>

View File

@@ -44,7 +44,6 @@ import org.alfresco.repo.content.filestore.FileContentReader;
import org.alfresco.sync.repo.events.EventPublisher;
import org.alfresco.repo.web.util.HttpRangeProcessor;
import org.alfresco.rest.framework.resource.content.CacheDirective;
import org.alfresco.service.cmr.repository.ArchivedIOException;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
@@ -450,11 +449,7 @@ public class ContentStreamer implements ResourceLoaderAware
if (logger.isInfoEnabled())
logger.info("Client aborted stream read:\n\tcontent: " + reader);
}
catch (ArchivedIOException e2)
{
throw e2;
}
catch (ContentIOException e3)
catch (ContentIOException e2)
{
if (logger.isInfoEnabled())
logger.info("Client aborted stream read:\n\tcontent: " + reader);

View File

@@ -64,18 +64,6 @@ public class ApiException extends PlatformRuntimeException
super(msgId, cause);
this.msgId = msgId;
}
public ApiException(String msgId, String message)
{
super(message);
this.msgId = msgId;
}
public ApiException(String msgId, String message, Throwable cause)
{
super(message, cause);
this.msgId = msgId;
}
public ApiException(String msgId, Throwable cause, Map<String,Object> additionalState)
{

View File

@@ -1,72 +0,0 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 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.framework.core.exceptions;
import org.alfresco.service.Experimental;
/**
* Thrown when the content is archived and not readily accessible.
* Status is <i>Precondition Failed</i> client error = 412.
*
* @author David Edwards
*/
@Experimental
public class ArchivedContentException extends ApiException
{
public static String DEFAULT_MESSAGE_ID = "framework.exception.ArchivedContent";
public ArchivedContentException()
{
super(DEFAULT_MESSAGE_ID);
}
public ArchivedContentException(String message)
{
this(DEFAULT_MESSAGE_ID, message);
}
private ArchivedContentException(String msgId, String message)
{
super(msgId, message);
}
public ArchivedContentException(Throwable cause)
{
this(DEFAULT_MESSAGE_ID, cause.getLocalizedMessage(), cause);
}
public ArchivedContentException(String message, Throwable cause)
{
this(DEFAULT_MESSAGE_ID, message, cause);
}
private ArchivedContentException(String msgId, String message, Throwable cause)
{
super(msgId, message, cause);
}
}

View File

@@ -42,7 +42,6 @@ import org.alfresco.rest.framework.core.ResourceLocator;
import org.alfresco.rest.framework.core.ResourceOperation;
import org.alfresco.rest.framework.core.ResourceWithMetadata;
import org.alfresco.rest.framework.core.exceptions.ApiException;
import org.alfresco.rest.framework.core.exceptions.ArchivedContentException;
import org.alfresco.rest.framework.resource.actions.ActionExecutor;
import org.alfresco.rest.framework.resource.actions.interfaces.BinaryResourceAction;
import org.alfresco.rest.framework.resource.actions.interfaces.RelationshipResourceBinaryAction;
@@ -53,8 +52,6 @@ import org.alfresco.rest.framework.resource.content.FileBinaryResource;
import org.alfresco.rest.framework.resource.content.NodeBinaryResource;
import org.alfresco.rest.framework.resource.parameters.Params;
import org.alfresco.rest.framework.tools.ResponseWriter;
import org.alfresco.service.cmr.repository.ArchivedIOException;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -87,8 +84,6 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
private ContentStreamer streamer;
protected ResourceWebScriptHelper helper;
private static final String HEADER_CONTENT_LENGTH = "Content-Length";
@SuppressWarnings("rawtypes")
@Override
public void execute(final Api api, final WebScriptRequest req, final WebScriptResponse res) throws IOException
@@ -178,10 +173,6 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
}
}
catch (ContentIOException cioe)
{
handleContentIOException(res, cioe);
}
catch (AlfrescoRuntimeException | ApiException | WebScriptException xception )
{
renderException(xception, res, assistant);
@@ -224,20 +215,6 @@ public abstract class AbstractResourceWebScript extends ApiWebScript implements
return toReturn;
}
private void handleContentIOException(final WebScriptResponse res, ContentIOException exception) throws IOException
{
// If the Content-Length is not set back to -1 any client will expect to receive binary and will hang until it times out
res.setHeader(HEADER_CONTENT_LENGTH, String.valueOf(-1));
if (exception instanceof ArchivedIOException)
{
renderException(new ArchivedContentException(exception.getMsgId(), exception), res, assistant);
}
else
{
renderException(exception, res, assistant);
}
}
protected RetryingTransactionHelper getTransactionHelper(String api)
{
RetryingTransactionHelper transHelper = transactionService.getRetryingTransactionHelper();

View File

@@ -174,7 +174,6 @@
<entry key="org.springframework.http.InvalidMediaTypeException" value="#{T(org.springframework.extensions.webscripts.Status).STATUS_UNSUPPORTED_MEDIA_TYPE}" />
<entry key="org.alfresco.rest.framework.core.exceptions.ServiceUnavailableException" value="503" />
<entry key="org.alfresco.service.cmr.dictionary.InvalidTypeException" value="409" />
<entry key="org.alfresco.rest.framework.core.exceptions.ArchivedContentException" value="#{T(org.springframework.extensions.webscripts.Status).STATUS_PRECONDITION_FAILED}" />
</map>
</property>
</bean>

View File

@@ -37,6 +37,7 @@ import org.alfresco.service.cmr.security.MutableAuthenticationService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.util.BaseSpringTest;
import org.alfresco.util.PropertyMap;
import org.alfresco.util.testing.category.FrequentlyFailingTests;
import org.alfresco.util.testing.category.IntermittentlyFailingTests;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang3.RandomStringUtils;

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,6 +25,7 @@
*/
package org.alfresco.rest.api.tests;
import org.alfresco.repo.action.ActionServiceImpl;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.quickshare.QuickShareLinkExpiryActionImpl;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -64,6 +65,7 @@ import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.site.SiteVisibility;
import org.alfresco.util.testing.category.FrequentlyFailingTests;
import org.alfresco.util.testing.category.LuceneTests;
import org.alfresco.util.testing.category.RedundantTests;
import org.joda.time.DateTime;

View File

@@ -82,7 +82,8 @@ Sometimes it is desirable to create a version automatically. Whether this happe
When _cm:autoVersion_ is true, a new version is created when the _cm:content_ of a content node changes.
When _cm:autoVersionOnUpdateProps_ is true, a new version is created when any of the properties of a content node change.
The defaults for these properties are set in the contentModel.xml file in the usual way. But to simplify the admin experience, the values of these properties can also be set using global properties:
The defaults for these properties are set in the contentModel.xml file in the usual way. But to simplify the admin experience, the values of these properties can also set using global properties:
* version.store.enableAutoVersioning
* version.store.enableAutoVersionOnUpdateProps

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>14.40</version>
<version>14.28-SNAPSHOT</version>
</parent>
<dependencies>

View File

@@ -47,7 +47,6 @@ import org.alfresco.api.AlfrescoPublicApi;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.content.filestore.FileContentWriter;
import org.alfresco.repo.content.transform.TransformerDebug;
import org.alfresco.service.cmr.repository.ArchivedIOException;
import org.alfresco.service.cmr.repository.ContentAccessor;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.repository.ContentReader;
@@ -430,7 +429,6 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
}
catch (Throwable e)
{
if (e instanceof ArchivedIOException) throw e;
throw new ContentIOException("Failed to open stream onto channel: \n" +
" accessor: " + this,
e);
@@ -543,10 +541,6 @@ public abstract class AbstractContentReader extends AbstractContentAccessor impl
// done
return content;
}
catch (ArchivedIOException e)
{
throw e;
}
catch (Exception e)
{
throw new ContentIOException("Failed to copy content to string: \n" +

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2019 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -34,7 +34,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.transform.client.model.config.SupportedSourceAndTarget;
import org.alfresco.transform.client.model.config.TransformOption;
import org.alfresco.transform.client.model.config.Transformer;
import org.alfresco.transform.client.registry.AbstractTransformRegistry;
import org.alfresco.transform.client.registry.CombinedConfig;
import java.io.IOException;
@@ -53,8 +52,7 @@ import java.util.Set;
* any mimetype starting "text/", or "application/x-javascript", or "application/dita+xml". There must be no transform
* options, but in case of the text transform the source and target encodings may be change.
*
* Supported transforms are added by {@link CombinedConfig#addPassThroughTransformer(
* org.alfresco.service.cmr.repository.MimetypeService, AbstractTransformRegistry)}.
* Supported transforms are added by {@link CombinedConfig#addPassThroughTransformer(org.alfresco.service.cmr.repository.MimetypeService)}.
*
* @author adavis
*/
@@ -78,18 +76,10 @@ public class LocalPassThroughTransform extends AbstractLocalTransform
Set<SupportedSourceAndTarget> supportedSourceAndTargetList = new HashSet();
for (String mimetype: mimetypes)
{
supportedSourceAndTargetList.add(SupportedSourceAndTarget.builder()
.withSourceMediaType(mimetype)
.withTargetMediaType(mimetype)
.withPriority(20)
.build());
supportedSourceAndTargetList.add(new SupportedSourceAndTarget(mimetype, mimetype, -1, 20));
if (isToText(mimetype, mimetype))
{
supportedSourceAndTargetList.add(SupportedSourceAndTarget.builder()
.withSourceMediaType(mimetype)
.withTargetMediaType(MimetypeMap.MIMETYPE_TEXT_PLAIN)
.withPriority(20)
.build());
supportedSourceAndTargetList.add(new SupportedSourceAndTarget(mimetype, MimetypeMap.MIMETYPE_TEXT_PLAIN, -1, 20));
}
}
return Transformer.builder().withTransformerName(LocalPassThroughTransform.NAME).

View File

@@ -26,6 +26,7 @@
package org.alfresco.repo.content.transform;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -33,7 +34,6 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import org.alfresco.service.cmr.repository.MimetypeService;
import org.alfresco.transform.client.model.config.TransformOptionGroup;
@@ -133,15 +133,15 @@ public class LocalTransformServiceRegistry extends TransformServiceRegistryImpl
@Override
public boolean readConfig() throws IOException
{
CombinedConfig combinedConfig = new CombinedConfig(getLog(), this);
List<String> urls = getTEngineUrlsSortedByName();
CombinedConfig combinedConfig = new CombinedConfig(getLog());
List<String> urls = getTEngineUrls();
boolean successReadingConfig = combinedConfig.addRemoteConfig(urls, "T-Engine");
successReadingConfig &= combinedConfig.addLocalConfig("alfresco/transforms");
if (pipelineConfigDir != null && !pipelineConfigDir.isBlank())
{
successReadingConfig &= combinedConfig.addLocalConfig(pipelineConfigDir);
}
combinedConfig.addPassThroughTransformer(mimetypeService, this);
combinedConfig.addPassThroughTransformer(mimetypeService);
combinedConfig.register(this);
return successReadingConfig;
}
@@ -159,8 +159,8 @@ public class LocalTransformServiceRegistry extends TransformServiceRegistryImpl
}
@Override
protected void register(Transformer transformer, Map<String, Set<TransformOption>> transformOptions,
String baseUrl, String readFrom)
public void register(Transformer transformer, Map<String, Set<TransformOption>> transformOptions,
String baseUrl, String readFrom)
{
try
{
@@ -321,23 +321,30 @@ public class LocalTransformServiceRegistry extends TransformServiceRegistryImpl
return log;
}
/**
* @return urls from System or Alfresco global properties that match of localTransform.<name>.url=<url> sorted
* in <name> order.
*/
List<String> getTEngineUrlsSortedByName()
private List<String> getTEngineUrls()
{
// T-Engines are sorted by name so they are in the same order as in the all-in-one transformer and the
// T-Router. See AIOCustomConfig#getTEnginesSortedByName and TransformersConfigRegistry#retrieveRemoteConfig.
return getKeySet().stream()
.filter(key -> key instanceof String)
.filter(key -> key.startsWith(LOCAL_TRANSFORMER) && key.endsWith(URL))
.sorted()
.map(key -> getProperty(key, null))
.filter(url -> url instanceof String)
.map(url -> url.trim())
.filter(url -> !url.isEmpty())
.collect(Collectors.toList());
List<String> urls = new ArrayList<>();
for (Object o : getKeySet())
{
if (o instanceof String)
{
String key = (String)o;
if (key.startsWith(LOCAL_TRANSFORMER) && key.endsWith(URL))
{
Object url = getProperty(key, null);
if (url instanceof String)
{
String urlStr = ((String)url).trim();
if (!urlStr.isEmpty())
{
urls.add((String) url);
}
}
}
}
}
return urls;
}
private int getStartupRetryPeriodSeconds(String name)

View File

@@ -415,13 +415,12 @@ implements TenantDeployer, DictionaryListener, /*TenantDictionaryListener, */Mes
for (NodeRef messageResource : nodeRefs)
{
String messageResourcePath = nodeService.getPath(messageResource).toPrefixString(namespaceService);
String bundleBasePrefixedName = messageResourcePath.substring(messageResourcePath.lastIndexOf("/"));
String bundleBaseName = messageService.getBaseBundleName(bundleBasePrefixedName);
String resourceName = (String) nodeService.getProperty(messageResource, ContentModel.PROP_NAME);
String bundleBaseName = messageService.getBaseBundleName(resourceName);
if (!resourceBundleBaseNames.contains(bundleBaseName))
{
messageService.registerResourceBundle(storeRef.toString() + repositoryLocation.getPath() + bundleBaseName);
resourceBundleBaseNames.add(bundleBaseName);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -683,7 +683,6 @@ public class RenditionServiceImpl implements
log.debug("OnContentUpdate calling RenditionService2.render(\""+sourceNodeRef+"\", \""+renditionName+"\" so we switch to the new service.");
}
useRenditionService2 = true;
renditionService2.clearRenditionContentData(sourceNodeRef, renditionName);
renditionService2.render(sourceNodeRef, renditionName);
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -538,8 +538,9 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
}
if (logger.isDebugEnabled())
{
logger.debug("Set ThumbnailLastModified for " + renditionName);
logger.debug("Set rendition hashcode " + transformContentHashCode + " and ThumbnailLastModified for " + renditionName);
}
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
setThumbnailLastModified(sourceNodeRef, renditionName);
if (transformInputStream != null)
@@ -553,11 +554,6 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
contentWriter.setEncoding(DEFAULT_ENCODING);
ContentWriter renditionWriter = contentWriter;
renditionWriter.putContent(transformInputStream);
if (logger.isDebugEnabled())
{
logger.debug("Set rendition hashcode for " + renditionName);
}
nodeService.setProperty(renditionNode, RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE, transformContentHashCode);
}
catch (Exception e)
{
@@ -567,7 +563,16 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
}
else
{
clearRenditionContentData(renditionNode);
Serializable content = nodeService.getProperty(renditionNode, PROP_CONTENT);
if (content != null)
{
nodeService.removeProperty(renditionNode, PROP_CONTENT);
nodeService.removeProperty(renditionNode, PROP_RENDITION_CONTENT_HASH_CODE);
if (logger.isDebugEnabled())
{
logger.debug("Cleared rendition content and hashcode");
}
}
}
if (!sourceHasAspectRenditioned)
@@ -731,43 +736,6 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
}
}
/**
* Clears source nodeRef rendition content and content hash code using supplied rendition name
*
* @param sourceNodeRef
* @param renditionName
*/
public void clearRenditionContentData(NodeRef sourceNodeRef, String renditionName)
{
clearRenditionContentData(getRenditionNode(sourceNodeRef, renditionName));
}
/**
* Clears supplied rendition node content (if exists) and content hash code
*
* @param renditionNode
*/
private void clearRenditionContentData(NodeRef renditionNode)
{
if (renditionNode != null)
{
Serializable content = nodeService.getProperty(renditionNode, PROP_CONTENT);
if (content != null)
{
nodeService.removeProperty(renditionNode, PROP_CONTENT);
if (logger.isDebugEnabled())
{
logger.debug("Cleared rendition content");
}
}
nodeService.removeProperty(renditionNode, PROP_RENDITION_CONTENT_HASH_CODE);
if (logger.isDebugEnabled())
{
logger.debug("Cleared rendition hashcode");
}
}
}
/**
* This method checks whether the specified source node is of a content class which has been registered for
* rendition prevention.
@@ -918,7 +886,6 @@ public class RenditionService2Impl implements RenditionService2, InitializingBea
RenditionDefinition2 renditionDefinition = renditionDefinitionRegistry2.getRenditionDefinition(renditionName);
if (renditionDefinition != null)
{
clearRenditionContentData(sourceNodeRef, renditionName);
render(sourceNodeRef, renditionName);
}
else

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2017 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -640,7 +640,7 @@ public class ThumbnailServiceImpl implements ThumbnailService,
boolean valid = true;
ContentData content = (ContentData) this.nodeService.getProperty(thumbnailNode, ContentModel.PROP_CONTENT);
// (MNT-17162) A thumbnail with an empty content is cached for post-transaction removal, to prevent the delete in read-only transactions.
if (content == null || content.getSize() == 0)
if (content.getSize() == 0)
{
TransactionalResourceHelper.getSet(THUMBNAIL_TO_DELETE_NODES).add(thumbnailNode);
TransactionSupportUtil.bindListener(this.thumbnailsToDeleteTransactionListener, 0);

View File

@@ -44,7 +44,6 @@ import org.apache.http.util.EntityUtils;
import java.io.IOException;
import java.io.StringReader;
import java.util.Collections;
import java.util.List;
/**
@@ -52,8 +51,8 @@ import java.util.List;
* in one file. Transform options are shared between all sources.<p>
*
* The caller should make calls to {@link #addRemoteConfig(List, String)}, {@link #addLocalConfig(String)} or
* {@link CombinedTransformConfig#addTransformConfig(TransformConfig, String, String, AbstractTransformRegistry)}
* followed by a call to {@link #register(TransformServiceRegistryImpl)}.
* {@link #addTransformConfig(TransformConfig, String, String)} followed by a call to
* {@link #register(TransformServiceRegistryImpl)}.
*
* @author adavis
*/
@@ -65,7 +64,7 @@ public class CombinedConfig extends CombinedTransformConfig
private ConfigFileFinder configFileFinder;
private int tEngineCount;
public CombinedConfig(Log log, AbstractTransformRegistry registry)
public CombinedConfig(Log log)
{
this.log = log;
@@ -75,7 +74,7 @@ public class CombinedConfig extends CombinedTransformConfig
protected void readJson(JsonNode jsonNode, String readFrom, String baseUrl)
{
TransformConfig transformConfig = jsonObjectMapper.convertValue(jsonNode, TransformConfig.class);
addTransformConfig(transformConfig, readFrom, baseUrl, registry);
addTransformConfig(transformConfig, readFrom, baseUrl);
}
};
}
@@ -130,9 +129,9 @@ public class CombinedConfig extends CombinedTransformConfig
String content = getContent(resEntity);
try (StringReader reader = new StringReader(content))
{
int transformCount = transformerCount();
int transformCount = combinedTransformers.size();
configFileFinder.readFile(reader, remoteType+" on "+baseUrl, "json", baseUrl, log);
if (transformCount == transformerCount())
if (transformCount == combinedTransformers.size())
{
successReadingConfig = false;
}
@@ -226,14 +225,11 @@ public class CombinedConfig extends CombinedTransformConfig
* from selected text based types.
* @param mimetypeService to find all the mimetypes
*/
public void addPassThroughTransformer(MimetypeService mimetypeService, AbstractTransformRegistry registry)
public void addPassThroughTransformer(MimetypeService mimetypeService)
{
List<String> mimetypes = mimetypeService.getMimetypes();
Transformer transformer = LocalPassThroughTransform.getConfig(mimetypes);
TransformConfig transformConfig = TransformConfig.builder()
.withTransformers(Collections.singletonList(transformer))
.build();
addTransformConfig(transformConfig, "based on mimetype list", null, registry);
combinedTransformers.add(new TransformAndItsOrigin(transformer, null, "based on mimetype list"));
}
public void register(TransformServiceRegistryImpl registry)

View File

@@ -7,19 +7,19 @@
-- Please contact support@alfresco.com if you need assistance with the upgrade.
--
DROP INDEX idx_alf_node_ver ON alf_node; --(optional)
DROP INDEX idx_alf_node_ver; --(optional)
CREATE INDEX idx_alf_node_ver ON alf_node (version);
DROP INDEX idx_alf_node_txn ON alf_node; --(optional)
DROP INDEX idx_alf_node_txn; --(optional)
CREATE INDEX idx_alf_node_txn ON alf_node (transaction_id);
DROP INDEX idx_alf_txn_ctms ON alf_transaction; --(optional)
DROP INDEX idx_alf_txn_ctms; --(optional)
CREATE INDEX idx_alf_txn_ctms ON alf_transaction (commit_time_ms, id);
DROP INDEX idx_alf_txn_ctms_sc ON alf_transaction; --(optional)
DROP INDEX idx_alf_txn_ctms_sc; --(optional)
CREATE INDEX idx_alf_txn_ctms_sc ON alf_transaction (commit_time_ms);
DROP INDEX idx_alf_txn_id_ctms ON alf_transaction; --(optional)
DROP INDEX idx_alf_txn_id_ctms; --(optional)
CREATE INDEX idx_alf_txn_id_ctms ON alf_transaction (id, commit_time_ms);
--
@@ -32,4 +32,4 @@ INSERT INTO alf_applied_patch
(
'patch.db-V6.3-add-indexes-node-transaction', 'Create aditional indexes on alf_node and alf_transaction',
0, 14001, -1, 14002, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
);
);

View File

@@ -10,12 +10,12 @@
SET FOREIGN_KEY_CHECKS=0;
DROP TABLE alf_server;
ALTER TABLE alf_transaction
DROP FOREIGN KEY fk_alf_txn_svr,
DROP COLUMN server_id;
DROP TABLE IF EXISTS alf_server;
SET FOREIGN_KEY_CHECKS=1;
--

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2020 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -59,7 +59,7 @@ import org.alfresco.service.namespace.QName;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.Pair;
import org.alfresco.util.testing.category.FrequentlyFailingTests;
import org.alfresco.util.testing.category.IntermittentlyFailingTests;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
@@ -338,7 +338,7 @@ public class EncryptionTests extends TestCase
testChangeKeysImpl(true);
}
@Category(FrequentlyFailingTests.class) // ACS-2242
@Category(IntermittentlyFailingTests.class) // ACS-959
public void testFailedEncryptionWithCachedCiphers() throws Throwable
{
Pair<byte[], AlgorithmParameters> pair = null;

View File

@@ -31,18 +31,17 @@ import java.io.PrintWriter;
import java.io.Serializable;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import junit.framework.TestCase;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.dictionary.DictionaryDAO;
import org.alfresco.repo.dictionary.NamespaceDAO;
import org.alfresco.repo.i18n.MessageService;
import org.alfresco.repo.node.db.DbNodeServiceImpl;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -51,7 +50,6 @@ import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransacti
import org.alfresco.service.cmr.admin.RepoAdminService;
import org.alfresco.service.cmr.dictionary.ClassDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.ContentService;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.service.cmr.repository.NodeRef;
@@ -69,8 +67,6 @@ import org.apache.commons.logging.LogFactory;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
import junit.framework.TestCase;
/**
* @see RepoAdminServiceImpl
*
@@ -92,7 +88,6 @@ public class RepoAdminServiceImplTest extends TestCase
private NamespaceService namespaceService;
private BehaviourFilter behaviourFilter;
private DictionaryDAO dictionaryDAO;
private MessageService messageService;
final String modelPrefix = "model-";
final static String MKR = "{MKR}";
@@ -145,7 +140,6 @@ public class RepoAdminServiceImplTest extends TestCase
namespaceService = (NamespaceService) ctx.getBean("NamespaceService");
behaviourFilter = (BehaviourFilter)ctx.getBean("policyBehaviourFilter");
dictionaryDAO = (DictionaryDAO) ctx.getBean("dictionaryDAO");
messageService = (MessageService) ctx.getBean("MessageService");
DbNodeServiceImpl dbNodeService = (DbNodeServiceImpl)ctx.getBean("dbNodeService");
dbNodeService.setEnableTimestampPropagation(false);
@@ -871,182 +865,8 @@ public class RepoAdminServiceImplTest extends TestCase
}
}
}
// Test deploy bundle from classpath
public void testDeployMessageBundleFromClasspath() throws Exception
{
String bundleBaseName = "mycustommessages";
String resourceClasspath = "alfresco/extension/messages/" + bundleBaseName;
final String message_key = "mycustommessages.key1";
final String message_value_default = "This is a custom message";
final String message_value_fr = "Ceci est un message personnalis\\u00e9";
final String message_value_de = "Dies ist eine benutzerdefinierte Nachricht";
// Undeploy the bundle
if (repoAdminService.getMessageBundles().contains(bundleBaseName))
{
repoAdminService.undeployMessageBundle(bundleBaseName);
}
// Verify the custom bundle is registered
assertFalse("The custom bundle should not be deployed", repoAdminService.getMessageBundles().contains(bundleBaseName));
// Depoly the message bundle
repoAdminService.deployMessageBundle(resourceClasspath);
// Reload the messages
repoAdminService.reloadMessageBundle(bundleBaseName);
// Verify the custom bundle is registered
assertTrue("The custom bundle should be deployed", repoAdminService.getMessageBundles().contains(bundleBaseName));
// Verify we have the messages for each locale
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
assertMessageValue("Cannot retrieve default message value", message_value_default, message_key, Locale.getDefault());
assertMessageValue("Cannot retrieve french message value", message_value_fr, message_key, Locale.FRANCE);
assertMessageValue("Cannot retrieve german message value", message_value_de, message_key, Locale.GERMANY);
// Test deploy a non existent bundle
try
{
repoAdminService.deployMessageBundle("alfresco/extension/messages/inexistentbundle");
fail("Bundle was not supposed to be deployed");
}
catch (Exception e)
{
// Expected to fail
}
}
// Test deploy bundle from repo and reload bundles
public void testDeployMessageBundleFromRepo() throws Exception
{
final String bundleBaseName = "repoBundle";
final String message_key = "repoBundle.key1";
final String message_value = "Value 1";
final String message_value_fr = "Value FR";
final String message_value_de = "Value DE";
final String message_value_new = "New Value 1";
// Set location
NodeRef rootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
List<NodeRef> nodeRefs = searchService.selectNodes(rootNodeRef, "/app:company_home/app:dictionary/app:messages", null,
namespaceService, false);
assertEquals(1, nodeRefs.size());
NodeRef messagesNodeRef = nodeRefs.get(0);
// Clear messages of this bundle if they exist and are registered
clearRepoBundles(messagesNodeRef);
assertEquals(0, repoAdminService.getMessageBundles().size());
// Create and upload the message files
NodeRef messageNode_default = createMessagesNodeWithSingleKey(messagesNodeRef, bundleBaseName, message_key, null,
message_value);
createMessagesNodeWithSingleKey(messagesNodeRef, bundleBaseName, message_key, Locale.FRANCE.toString(), message_value_fr);
createMessagesNodeWithSingleKey(messagesNodeRef, bundleBaseName, message_key, Locale.GERMANY.toString(),
message_value_de);
// Reload the messages
repoAdminService.reloadMessageBundle(bundleBaseName);
// Verify we have the messages for each locale
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
assertMessageValue("Cannot retrieve default message value", message_value, message_key, Locale.getDefault());
assertMessageValue("Cannot retrieve french message value", message_value_fr, message_key, Locale.FRANCE);
assertMessageValue("Cannot retrieve german message value", message_value_de, message_key, Locale.GERMANY);
// Change the values
putContentInMessageNode(messageNode_default, message_key, message_value_new);
// Verify we still have the old value
assertMessageValue("Unexpected change of message value", message_value, message_key, Locale.getDefault());
// Reload the messages
repoAdminService.reloadMessageBundle(bundleBaseName);
// Verify new values
assertMessageValue("Change of message value not reflected", message_value_new, message_key, Locale.getDefault());
}
/**
* Create messages node
*/
private NodeRef createMessagesNodeWithSingleKey(NodeRef parentNode, String bundleName, String key, String locale,
String localeValue)
{
String msg_extension = ".properties";
String filename = bundleName + msg_extension;
String messageValue = localeValue;
if (locale != null)
{
filename = bundleName + "_" + locale + msg_extension;
}
// Create a model node
NodeRef messageNode = this.nodeService.createNode(
parentNode,
ContentModel.ASSOC_CONTAINS,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, filename),
ContentModel.TYPE_CONTENT,
Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, filename)
).getChildRef();
putContentInMessageNode(messageNode, key, messageValue);
return messageNode;
}
/**
* Write content of message node
*/
private void putContentInMessageNode(NodeRef nodeRef, String key, String value)
{
ContentWriter contentWriter = contentService.getWriter(nodeRef, ContentModel.PROP_CONTENT, true);
contentWriter.setEncoding("UTF-8");
contentWriter.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
String messagesString = key + "=" + value;
contentWriter.putContent(messagesString);
}
/**
* Clear Repo Bundle
*/
private void clearRepoBundles(NodeRef parentNode)
{
List<String> repoBundles = repoAdminService.getMessageBundles();
for (String repoBundle : repoBundles)
{
repoAdminService.undeployMessageBundle(repoBundle);
}
List<ChildAssociationRef> messageNodes = nodeService.getChildAssocs(parentNode);
for (ChildAssociationRef messageChildRef : messageNodes)
{
NodeRef messageNode = messageChildRef.getChildRef();
nodeService.deleteNode(messageNode);
}
}
/**
* Clear Repo Bundle
*/
private void assertMessageValue(String errorMessage, String expectedValue, String key, Locale locale)
{
transactionService.getRetryingTransactionHelper()
.doInTransaction(new RetryingTransactionHelper.RetryingTransactionCallback<Void>()
{
public Void execute() throws Throwable
{
assertEquals(errorMessage, expectedValue, messageService.getMessage(key, locale));
return null;
}
});
}
//
// TODO - Test custom message management
//
}

View File

@@ -72,14 +72,6 @@ public class MimetypeMapContentTest extends TestCase
);
}
public void testGuessAppleIconsMimetype() throws Exception
{
assertEquals(
"image/icns",
mimetypeService.guessMimetype("something.icns", openQuickTestFile("quick.icns"))
);
}
public void testGuessMimetypeForFile() throws Exception
{
// Correct ones

View File

@@ -1,68 +0,0 @@
/*
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 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.repo.content.transform;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import java.io.IOException;
import java.util.Properties;
import java.util.StringJoiner;
import static org.alfresco.repo.content.transform.LocalTransformServiceRegistry.LOCAL_TRANSFORMER;
import static org.alfresco.repo.content.transform.LocalTransformServiceRegistry.URL;
import static org.junit.Assert.assertEquals;
public class LocalTransformServiceRegistryTest
{
@Spy
private Properties properties = new Properties();
@InjectMocks
LocalTransformServiceRegistry registry = new LocalTransformServiceRegistry();
@Rule
public MockitoRule initRule = MockitoJUnit.rule();
@Test
public void testGetTEngineUrlsSortedByName() throws IOException
{
properties.put(LOCAL_TRANSFORMER+"aa"+URL, "aa");
properties.put(LOCAL_TRANSFORMER+"engine1"+URL, "http_xxxx1");
properties.put(LOCAL_TRANSFORMER+"engine3"+URL, "http3");
properties.put(LOCAL_TRANSFORMER+"engine2"+URL, "http_xx2");
properties.put(LOCAL_TRANSFORMER+"bb"+URL, "bb");
properties.put(LOCAL_TRANSFORMER+"b"+URL, "b");
StringJoiner orderEngineConfigRead = new StringJoiner(",");
registry.getTEngineUrlsSortedByName().forEach(name -> orderEngineConfigRead.add(name));
assertEquals("aa,b,bb,http_xxxx1,http_xx2,http3", orderEngineConfigRead.toString());
}
}

View File

@@ -44,15 +44,16 @@ import org.junit.runners.Suite.SuiteClasses;
TransformerLogTest.class,
TransformerDebugLogTest.class,
LocalTransformServiceRegistryTest.class,
TransformerConfigMBeanImplTest.class})
/**
* Test classes in the Transformers subsystem
*
* @author Alan Davis
*
* @deprecated The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.
*/
@Deprecated
public class TransformerConfigTestSuite
{
}

View File

@@ -25,14 +25,9 @@
*/
package org.alfresco.repo.dictionary;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Locale;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
@@ -58,6 +53,8 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import javax.transaction.UserTransaction;
import org.springframework.transaction.annotation.Transactional;
@Category(BaseSpringTestsCategory.class)
@@ -97,14 +94,6 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
"</model>";
public static final String MESSAGES_KEY = "my_bootstrap_test";
public static final String MESSAGES_VALUE = "My Message";
public static final String MESSAGES_VALUE_FR = "Mon message";
public static final String FOLDERNAME_MODELS = "models";
public static final String FOLDERNAME_MESSAGES = "messages";
public static final String BUNDLENAME_MESSAGES = "testBootstap";
public static final String FILENAME_MESSAGES_EXT = ".properties";
/** Behaviour filter */
private BehaviourFilter behaviourFilter;
@@ -134,8 +123,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
private UserTransaction txn;
private StoreRef storeRef;
private NodeRef rootModelsNodeRef;
private NodeRef rootMessagesNodeRef;
private NodeRef rootNodeRef;
@Before
public void before() throws Exception
@@ -163,17 +151,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
// Create the store and get the root node
this.storeRef = this.nodeService.createStore(StoreRef.PROTOCOL_WORKSPACE, "Test_" + System.currentTimeMillis());
NodeRef rootNodeRef = this.nodeService.getRootNode(this.storeRef);
this.rootModelsNodeRef = this.nodeService
.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, FOLDERNAME_MODELS), ContentModel.TYPE_FOLDER)
.getChildRef();
this.rootMessagesNodeRef = this.nodeService
.createNode(rootNodeRef, ContentModel.ASSOC_CHILDREN,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, FOLDERNAME_MESSAGES), ContentModel.TYPE_FOLDER)
.getChildRef();
this.rootNodeRef = this.nodeService.getRootNode(this.storeRef);
txn.commit();
@@ -189,20 +167,18 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
this.bootstrap.setNamespaceService(this.namespaceService);
this.bootstrap.setMessageService(this.messageService);
this.bootstrap.setPolicyComponent(this.policyComponent);
RepositoryLocation modelsLocation = new RepositoryLocation(this.storeRef,
this.nodeService.getPath(rootModelsNodeRef).toPrefixString(namespaceService), RepositoryLocation.LANGUAGE_PATH);
RepositoryLocation messagesLocation = new RepositoryLocation(this.storeRef,
this.nodeService.getPath(rootMessagesNodeRef).toPrefixString(namespaceService), RepositoryLocation.LANGUAGE_PATH);
List<RepositoryLocation> modelsLocations = new ArrayList<RepositoryLocation>();
modelsLocations.add(modelsLocation);
List<RepositoryLocation> messagesLocations = new ArrayList<RepositoryLocation>();
messagesLocations.add(messagesLocation);
this.bootstrap.setRepositoryModelsLocations(modelsLocations);
this.bootstrap.setRepositoryMessagesLocations(messagesLocations);
RepositoryLocation location = new RepositoryLocation();
location.setStoreProtocol(this.storeRef.getProtocol());
location.setStoreId(this.storeRef.getIdentifier());
location.setQueryLanguage(RepositoryLocation.LANGUAGE_PATH);
// NOTE: we are not setting the path for now .. in doing so we are searching the root node only
List<RepositoryLocation> locations = new ArrayList<RepositoryLocation>();
locations.add(location);
this.bootstrap.setRepositoryModelsLocations(locations);
// register with dictionary service
this.bootstrap.register();
txn.commit();
@@ -248,15 +224,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
"Test model one",
"base1",
"prop1");
// Create a message file for the default locale
NodeRef messageNodeDefaultLoc = createMessagesNode(null, null);
// Create a message file for the french locale
createMessagesNode(Locale.FRANCE.toString(), MESSAGES_VALUE_FR);
// Construct baseBundleName for validation
String baseBundleName = storeRef.toString()
+ messageService.getBaseBundleName(nodeService.getPath(messageNodeDefaultLoc).toPrefixString(namespaceService));
// Check that the model is not in the dictionary yet
try
{
@@ -283,12 +251,6 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
QName.createQName("http://www.alfresco.org/model/test3DictionaryBootstrapFromRepo/1.0", "testModel3"));
assertNotNull(modelDefinition3);
// Check if the messages were registered correctly
assertTrue("The message bundle should be registered", messageService.getRegisteredBundles().contains(baseBundleName));
assertEquals("The default message value is not as expected", MESSAGES_VALUE, messageService.getMessage(MESSAGES_KEY));
assertEquals("The message value in french is not as expected", MESSAGES_VALUE_FR,
messageService.getMessage(MESSAGES_KEY, Locale.FRANCE));
txn.commit();
}
@@ -315,7 +277,7 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
{
// Create a model node
NodeRef model = this.nodeService.createNode(
this.rootModelsNodeRef,
this.rootNodeRef,
ContentModel.ASSOC_CHILDREN,
QName.createQName("{test}models"),
ContentModel.TYPE_DICTIONARY_MODEL).getChildRef();
@@ -338,39 +300,6 @@ public class DictionaryRepositoryBootstrapTest extends BaseSpringTest
return model;
}
/**
* Create messages node
*
* @return NodeRef
*/
private NodeRef createMessagesNode(String locale, String localeValue)
{
String filename = BUNDLENAME_MESSAGES + FILENAME_MESSAGES_EXT;
String messageValue = MESSAGES_VALUE;
if (locale != null)
{
filename = BUNDLENAME_MESSAGES + "_" + locale + FILENAME_MESSAGES_EXT;
messageValue = localeValue;
}
// Create a model node
NodeRef messageNode = this.nodeService.createNode(
this.rootMessagesNodeRef,
ContentModel.ASSOC_CHILDREN,
QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, filename),
ContentModel.TYPE_CONTENT,
Collections.<QName, Serializable> singletonMap(ContentModel.PROP_NAME, filename)
).getChildRef();
ContentWriter contentWriter = this.contentService.getWriter(messageNode, ContentModel.PROP_CONTENT, true);
contentWriter.setEncoding("UTF-8");
contentWriter.setMimetype(MimetypeMap.MIMETYPE_TEXT_PLAIN);
String messagesString = MESSAGES_KEY + "=" + messageValue;
contentWriter.putContent(messagesString);
return messageNode;
}
/**
*
* Gets the model string

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -61,9 +61,7 @@ import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.Pair;
import org.alfresco.util.testing.category.FrequentlyFailingTests;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.context.ApplicationContext;
import org.springframework.dao.ConcurrencyFailureException;
@@ -953,7 +951,6 @@ public class FixedAclUpdaterTest extends TestCase
/*
* Lock node that has the aspect applied before job runs
*/
@Category(FrequentlyFailingTests.class) // ACS-2245
@Test
public void testAsyncWithNodeLock()
{

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -37,7 +37,6 @@ import org.alfresco.service.transaction.TransactionService;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.testing.category.DBTests;
import org.alfresco.util.testing.category.FrequentlyFailingTests;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.Level;
@@ -508,7 +507,6 @@ public class JobLockServiceTest extends TestCase
public void testGetLockWithCallbackNullCallback() { runGetLockWithCallback(1); }
public void testGetLockWithCallbackShortTTL() { runGetLockWithCallback(2); }
public void testGetLockWithCallbackLocked() { runGetLockWithCallback(3); }
@Category(FrequentlyFailingTests.class) // ACS-2243
public void testGetLockWithCallbackNormal() { runGetLockWithCallback(4); }
public void runGetLockWithCallback(int t)

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2018 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,16 +25,7 @@
*/
package org.alfresco.repo.rendition2;
import static java.lang.Thread.sleep;
import static org.alfresco.model.ContentModel.PROP_CONTENT;
import static org.alfresco.model.RenditionModel.PROP_RENDITION_CONTENT_HASH_CODE;
import static org.alfresco.repo.content.MimetypeMap.EXTENSION_BINARY;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.Serializable;
import java.util.Collections;
import junit.framework.AssertionFailedError;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.content.metadata.AsynchronousExtractor;
@@ -69,7 +60,15 @@ import org.quartz.CronExpression;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
import junit.framework.AssertionFailedError;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.Serializable;
import java.util.Collections;
import java.util.Map;
import static java.lang.Thread.sleep;
import static org.alfresco.model.ContentModel.PROP_CONTENT;
import static org.alfresco.repo.content.MimetypeMap.EXTENSION_BINARY;
/**
* Class unites common utility methods for {@link org.alfresco.repo.rendition2} package tests.
@@ -532,41 +531,4 @@ public abstract class AbstractRenditionIntegrationTest extends BaseSpringTest
RetryingTransactionHelper txnHelper = transactionService.getRetryingTransactionHelper();
txnHelper.doInTransaction(createUserCallback);
}
/**
* Helper method to check if the supplied content hash code is valid or not
*
* @param contentHashCode
* the hash code to verify
*
* @return true in case it is an actual hash code, false otherwise
*/
protected boolean isValidRenditionContentHashCode(int contentHashCode)
{
return contentHashCode != RenditionService2Impl.RENDITION2_DOES_NOT_EXIST
&& contentHashCode != RenditionService2Impl.SOURCE_HAS_NO_CONTENT;
}
/**
* Helper method which gets the content hash code from the supplied rendition node without specific validations (the
* equivalent method from {@link RenditionService2Impl} is not exposed)
*
* @param renditionNodeRef
* the rendition node
*
* @return -1 in case of there is no content, -2 in case rendition doesn't exist, the actual content hash code
* otherwise
*/
protected int getRenditionContentHashCode(NodeRef renditionNodeRef)
{
int renditionContentHashCode = RenditionService2Impl.RENDITION2_DOES_NOT_EXIST;
if (renditionNodeRef != null)
{
Serializable hashCode = nodeService.getProperty(renditionNodeRef, PROP_RENDITION_CONTENT_HASH_CODE);
renditionContentHashCode = hashCode == null ? RenditionService2Impl.SOURCE_HAS_NO_CONTENT : (int) hashCode;
}
return renditionContentHashCode;
}
}

View File

@@ -2,7 +2,7 @@
* #%L
* Alfresco Repository
* %%
* Copyright (C) 2005 - 2021 Alfresco Software Limited
* Copyright (C) 2005 - 2018 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
@@ -25,11 +25,6 @@
*/
package org.alfresco.repo.rendition2;
import static org.alfresco.model.ContentModel.PROP_CONTENT;
import static org.junit.Assert.assertNotEquals;
import java.util.List;
import org.alfresco.model.ContentModel;
import org.alfresco.model.RenditionModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
@@ -41,9 +36,16 @@ import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import java.util.List;
import static org.alfresco.model.ContentModel.PROP_CONTENT;
import static org.junit.Assert.assertNotEquals;
/**
* Integration tests for {@link RenditionService2}
*/
@@ -306,99 +308,6 @@ public class RenditionService2IntegrationTest extends AbstractRenditionIntegrati
assertTrue("The rendition should be generated by new Rendition Service", hasRenditionedAspect);
}
/**
* Tests new {@link RenditionService2Impl#clearRenditionContentData(NodeRef, String)} method.
* <p>
* This method cleans a rendition content and content hash code.
* </p>
*/
@Test
public void testClearRenditionContentData()
{
// Create a node
NodeRef sourceNodeRef = createSource(ADMIN, "quick.jpg");
// Trigger the rendition
render(ADMIN, sourceNodeRef, DOC_LIB);
NodeRef renditionNodeRef = waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, true);
assertNotNull("Rendition was not generated", renditionNodeRef);
assertNotNull("Rendition was not generated", nodeService.getProperty(renditionNodeRef, ContentModel.PROP_CONTENT));
// Check the rendition content hash code is valid
int contentHashCode = getRenditionContentHashCode(renditionNodeRef);
assertTrue("Rendition content hash code was not generated", isValidRenditionContentHashCode(contentHashCode));
// Disable renditionService2
renditionService2.setEnabled(false);
// Call 'clearRenditionContentData' method directly to prove rendition content will be cleaned
AuthenticationUtil.runAs((AuthenticationUtil.RunAsWork<Void>) () ->
transactionService.getRetryingTransactionHelper().doInTransaction(() ->
{
renditionService2.clearRenditionContentData(sourceNodeRef, DOC_LIB);
return null;
}), ADMIN);
// The rendition should not have content by now
assertNull("Rendition has content", nodeService.getProperty(renditionNodeRef, ContentModel.PROP_CONTENT));
// The rendition should not have a content hash code by now
contentHashCode = getRenditionContentHashCode(renditionNodeRef);
assertFalse("Rendition has content hash code", isValidRenditionContentHashCode(contentHashCode));
// Enable renditionService2
renditionService2.setEnabled(true);
}
/**
* Tests if a rendition without content (but with contentHashCode) can be generated again.
* <p>
* If the rendition consumption receives a null InputStream, the contentHashCode should be cleaned from the
* rendition node, allowing new requests to generate the rendition.
* </p>
*/
@Test
public void testRenditionWithoutContentButWithContentHashCode()
{
// Create a node with an actual rendition
NodeRef sourceNodeRef = createSource(ADMIN, "quick.jpg");
render(ADMIN, sourceNodeRef, DOC_LIB);
NodeRef renditionNodeRef = waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, true);
assertNotNull("Rendition was not generated", renditionNodeRef);
assertNotNull("Rendition was not generated", nodeService.getProperty(renditionNodeRef, ContentModel.PROP_CONTENT));
// Clear rendition content (at this point we're forcing a rendition without content but with hash code)
clearContent(ADMIN, renditionNodeRef);
assertNull("Rendition has content", nodeService.getProperty(renditionNodeRef, ContentModel.PROP_CONTENT));
// Check that rendition still has the content hash code
final int contentHashCode = getRenditionContentHashCode(renditionNodeRef);
assertTrue("Rendition content hash code was not generated", isValidRenditionContentHashCode(contentHashCode));
// Call the 'consume' method directly supplying a null InputStream
// 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);
return null;
}, ADMIN);
waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, false);
// The content hash code should have been cleaned from the rendition node
int contentHashCode2 = getRenditionContentHashCode(renditionNodeRef);
assertFalse("Rendition content hash code was not cleaned", isValidRenditionContentHashCode(contentHashCode2));
// Attempts to render the rendition again
render(ADMIN, sourceNodeRef, DOC_LIB);
NodeRef renditionNodeRef2 = waitForRendition(ADMIN, sourceNodeRef, DOC_LIB, true);
assertEquals("New rendition nodeRef is different", renditionNodeRef.toString(), renditionNodeRef2.toString());
assertNotNull("New rendition content was not generated", nodeService.getProperty(renditionNodeRef2, ContentModel.PROP_CONTENT));
// Check the new rendition content hash code
int contentHashCode3 = getRenditionContentHashCode(renditionNodeRef2);
assertTrue("New rendition content hash code was not generated", isValidRenditionContentHashCode(contentHashCode3));
}
/**
* @deprecated can be removed when we remove the original RenditionService
*/

View File

@@ -33,7 +33,6 @@ import org.alfresco.repo.content.transform.LocalTransformImpl;
import org.alfresco.repo.content.transform.LocalTransformServiceRegistry;
import org.alfresco.repo.content.transform.TransformerDebug;
import org.alfresco.transform.client.model.config.SupportedSourceAndTarget;
import org.alfresco.transform.client.model.config.TransformConfig;
import org.alfresco.transform.client.model.config.TransformOption;
import org.alfresco.transform.client.model.config.TransformOptionGroup;
import org.alfresco.transform.client.model.config.TransformOptionValue;
@@ -192,7 +191,7 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
private static final String URL = ".url";
private Map<String, Set<TransformOption>> mapOfTransformOptions;
private List<Transformer> transformerList;
private List<CombinedConfig.TransformAndItsOrigin> transformerList;
protected TestLocalTransformServiceRegistry registry;
@@ -263,13 +262,11 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
*/
private void retrieveLocalTransformList(String path)
{
CombinedConfig combinedConfig = new CombinedConfig(log, registry);
CombinedConfig combinedConfig = new CombinedConfig(log);
combinedConfig.addLocalConfig(path);
combinedConfig.register(registry);
TransformConfig transformConfig = combinedConfig.buildTransformConfig();
mapOfTransformOptions = transformConfig.getTransformOptions();
transformerList = transformConfig.getTransformers();
mapOfTransformOptions = combinedConfig.combinedTransformOptions;
transformerList = combinedConfig.combinedTransformers;
}
/**
@@ -373,6 +370,7 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
return LOCAL_TRANSFORM+transformer.getTransformerName()+".url";
}
private int countTopLevelOptions(Set<String> transformOptionNames)
{
int i = 0;
@@ -386,7 +384,7 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
private void register(String path) throws IOException
{
CombinedConfig combinedConfig = new CombinedConfig(log, registry);
CombinedConfig combinedConfig = new CombinedConfig(log);
combinedConfig.addLocalConfig(path);
combinedConfig.register((TransformServiceRegistryImpl)registry);
}
@@ -563,22 +561,22 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
listOfExpectedTransformersName.add("libreoffice");
listOfExpectedTransformersName.add("officeToImageViaPdf");
for (Transformer transformer : transformerList)
for (CombinedConfig.TransformAndItsOrigin t : transformerList)
{
assertTrue(transformer.getTransformerName() + " should be an expected local transformer.", listOfExpectedTransformersName.contains(transformer.getTransformerName()));
listOfExpectedTransformersName.remove(transformer.getTransformerName());
assertTrue(t.transformer.getTransformerName() + " should be an expected local transformer.", listOfExpectedTransformersName.contains(t.transformer.getTransformerName()));
listOfExpectedTransformersName.remove(t.transformer.getTransformerName());
switch (transformer.getTransformerName())
switch (t.transformer.getTransformerName())
{
case "imagemagick":
assertEquals(transformer.getTransformerName() + " incorrect number of supported transform", 18, transformer.getSupportedSourceAndTargetList().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform option names", 1, transformer.getTransformOptions().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform options", 6, countTopLevelOptions(transformer.getTransformOptions()));
assertEquals(transformer.getTransformerName() + " expected to not be a transformer pipeline", transformer.getTransformerPipeline().size(), 0);
assertEquals(transformer.getTransformerName() + " expected to not be a failover pipeline", transformer.getTransformerFailover().size(), 0);
assertEquals(t.transformer.getTransformerName() + " incorrect number of supported transform", 18, t.transformer.getSupportedSourceAndTargetList().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform option names", 1, t.transformer.getTransformOptions().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform options", 6, countTopLevelOptions(t.transformer.getTransformOptions()));
assertEquals(t.transformer.getTransformerName() + " expected to not be a transformer pipeline", t.transformer.getTransformerPipeline().size(), 0);
assertEquals(t.transformer.getTransformerName() + " expected to not be a failover pipeline", t.transformer.getTransformerFailover().size(), 0);
//Test supportedSourceAndTargetList
for ( SupportedSourceAndTarget ssat: transformer.getSupportedSourceAndTargetList())
for ( SupportedSourceAndTarget ssat: t.transformer.getSupportedSourceAndTargetList())
{
assertTrue(ssat.getSourceMediaType() + " not expected to be a supported transform source.", imagemagickSupportedTransformation.containsKey(ssat.getSourceMediaType()));
assertTrue(ssat.getTargetMediaType() + " not expected to be a supported transform target for " + ssat.getSourceMediaType(), imagemagickSupportedTransformation.get(ssat.getSourceMediaType()).contains(ssat.getTargetMediaType()));
@@ -586,14 +584,14 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
break;
case "tika":
assertEquals(transformer.getTransformerName() + " incorrect number of supported transform", 11, transformer.getSupportedSourceAndTargetList().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform option names", 1, transformer.getTransformOptions().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform options", 5, countTopLevelOptions(transformer.getTransformOptions()));
assertEquals(transformer.getTransformerName() + " expected to not be a transformer pipeline", transformer.getTransformerPipeline().size(), 0);
assertEquals(transformer.getTransformerName() + " expected to not be a failover pipeline", transformer.getTransformerFailover().size(), 0);
assertEquals(t.transformer.getTransformerName() + " incorrect number of supported transform", 11, t.transformer.getSupportedSourceAndTargetList().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform option names", 1, t.transformer.getTransformOptions().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform options", 5, countTopLevelOptions(t.transformer.getTransformOptions()));
assertEquals(t.transformer.getTransformerName() + " expected to not be a transformer pipeline", t.transformer.getTransformerPipeline().size(), 0);
assertEquals(t.transformer.getTransformerName() + " expected to not be a failover pipeline", t.transformer.getTransformerFailover().size(), 0);
//Test supportedSourceAndTargetList
for ( SupportedSourceAndTarget ssat: transformer.getSupportedSourceAndTargetList())
for ( SupportedSourceAndTarget ssat: t.transformer.getSupportedSourceAndTargetList())
{
assertTrue(ssat.getSourceMediaType() + " not expected to be a supported transform source.", tikaSupportedTransformation.containsKey(ssat.getSourceMediaType()));
assertTrue(ssat.getTargetMediaType() + " not expected to be a supported transform target for " + ssat.getSourceMediaType(), tikaSupportedTransformation.get(ssat.getSourceMediaType()).contains(ssat.getTargetMediaType()));
@@ -601,14 +599,14 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
break;
case "pdfrenderer":
assertEquals(transformer.getTransformerName() + " incorrect number of supported transform", 4, transformer.getSupportedSourceAndTargetList().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform option names", 1, transformer.getTransformOptions().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform options", 5, countTopLevelOptions(transformer.getTransformOptions()));
assertEquals(transformer.getTransformerName() + " expected to not be a transformer pipeline", transformer.getTransformerPipeline().size(), 0);
assertEquals(transformer.getTransformerName() + " expected to not be a failover pipeline", transformer.getTransformerFailover().size(), 0);
assertEquals(t.transformer.getTransformerName() + " incorrect number of supported transform", 4, t.transformer.getSupportedSourceAndTargetList().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform option names", 1, t.transformer.getTransformOptions().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform options", 5, countTopLevelOptions(t.transformer.getTransformOptions()));
assertEquals(t.transformer.getTransformerName() + " expected to not be a transformer pipeline", t.transformer.getTransformerPipeline().size(), 0);
assertEquals(t.transformer.getTransformerName() + " expected to not be a failover pipeline", t.transformer.getTransformerFailover().size(), 0);
//Test supportedSourceAndTargetList
for ( SupportedSourceAndTarget ssat: transformer.getSupportedSourceAndTargetList())
for ( SupportedSourceAndTarget ssat: t.transformer.getSupportedSourceAndTargetList())
{
assertTrue(ssat.getSourceMediaType() + " not expected to be a supported transform source.", pdfRendererSupportedTransformation.containsKey(ssat.getSourceMediaType()));
assertTrue(ssat.getTargetMediaType() + " not expected to be a supported transform target for " + ssat.getSourceMediaType(), pdfRendererSupportedTransformation.get(ssat.getSourceMediaType()).contains(ssat.getTargetMediaType()));
@@ -616,14 +614,14 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
break;
case "libreoffice":
assertEquals(transformer.getTransformerName() + " incorrect number of supported transform", 9, transformer.getSupportedSourceAndTargetList().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform option names", 0, transformer.getTransformOptions().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform options", 0, countTopLevelOptions(transformer.getTransformOptions()));
assertEquals(transformer.getTransformerName() + " expected to not be a transformer pipeline", transformer.getTransformerPipeline().size(), 0);
assertEquals(transformer.getTransformerName() + " expected to not be a failover pipeline", transformer.getTransformerFailover().size(), 0);
assertEquals(t.transformer.getTransformerName() + " incorrect number of supported transform", 9, t.transformer.getSupportedSourceAndTargetList().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform option names", 0, t.transformer.getTransformOptions().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform options", 0, countTopLevelOptions(t.transformer.getTransformOptions()));
assertEquals(t.transformer.getTransformerName() + " expected to not be a transformer pipeline", t.transformer.getTransformerPipeline().size(), 0);
assertEquals(t.transformer.getTransformerName() + " expected to not be a failover pipeline", t.transformer.getTransformerFailover().size(), 0);
//Test supportedSourceAndTargetList
for ( SupportedSourceAndTarget ssat: transformer.getSupportedSourceAndTargetList())
for ( SupportedSourceAndTarget ssat: t.transformer.getSupportedSourceAndTargetList())
{
assertTrue(ssat.getSourceMediaType() + " not expected to be a supported transform source.", libreofficeSupportedTransformation.containsKey(ssat.getSourceMediaType()));
assertTrue(ssat.getTargetMediaType() + " not expected to be a supported transform target for " + ssat.getSourceMediaType(), libreofficeSupportedTransformation.get(ssat.getSourceMediaType()).contains(ssat.getTargetMediaType()));
@@ -632,13 +630,13 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
case "officeToImageViaPdf":
// Note we will get 35 entries in getSupportedSourceAndTargetList() if the metadata transforms are not excluded
assertEquals(transformer.getTransformerName() + " incorrect number of supported transform", 28, transformer.getSupportedSourceAndTargetList().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform option names", 2, transformer.getTransformOptions().size());
assertEquals( transformer.getTransformerName() + "incorrect number of transform options", 11, countTopLevelOptions(transformer.getTransformOptions()));
assertEquals(transformer.getTransformerName() + " expected to be a transformer pipeline", transformer.getTransformerPipeline().size(), 3);
assertEquals(t.transformer.getTransformerName() + " incorrect number of supported transform", 28, t.transformer.getSupportedSourceAndTargetList().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform option names", 2, t.transformer.getTransformOptions().size());
assertEquals( t.transformer.getTransformerName() + "incorrect number of transform options", 11, countTopLevelOptions(t.transformer.getTransformOptions()));
assertEquals(t.transformer.getTransformerName() + " expected to be a transformer pipeline", t.transformer.getTransformerPipeline().size(), 3);
//Test supportedSourceAndTargetList
for ( SupportedSourceAndTarget ssat: transformer.getSupportedSourceAndTargetList())
for ( SupportedSourceAndTarget ssat: t.transformer.getSupportedSourceAndTargetList())
{
assertTrue(ssat.getSourceMediaType() + " not expected to be a supported transform source.", officeToImageViaPdfSupportedTransformation.containsKey(ssat.getSourceMediaType()));
assertTrue(ssat.getTargetMediaType() + " not expected to be a supported transform target for " + ssat.getSourceMediaType(), officeToImageViaPdfSupportedTransformation.get(ssat.getSourceMediaType()).contains(ssat.getTargetMediaType()));
@@ -655,11 +653,11 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
retrieveLocalTransformList(LOCAL_TRANSFORM_SERVICE_CONFIG);
assertNotNull("Transformer list is null.", transformerList);
for (Transformer transformer : transformerList)
for (CombinedConfig.TransformAndItsOrigin t : transformerList)
{
if (transformer.getTransformerPipeline() == null)
if(t.transformer.getTransformerPipeline() == null)
{
assertNotNull(transformer.getTransformerName()+ " JVM property not set.", System.getProperty(LOCAL_TRANSFORM + transformer.getTransformerName() + URL));
assertNotNull(t.transformer.getTransformerName()+ " JVM property not set.", System.getProperty(LOCAL_TRANSFORM + t.transformer.getTransformerName() + URL));
}
}
assertEquals("Unexpected pdfrenderer JVM property value", "http://localhost:8090/", System.getProperty(LOCAL_TRANSFORM + "pdfrenderer" + URL));
@@ -667,11 +665,11 @@ public class LocalTransformServiceRegistryConfigTest extends TransformRegistryTe
assertEquals("Unexpected libreoffice JVM property value", "http://localhost:8092/", System.getProperty(LOCAL_TRANSFORM + "libreoffice" + URL));
assertEquals("Unexpected tika JVM property value", "http://localhost:8093/", System.getProperty(LOCAL_TRANSFORM + "tika" + URL));
for (Transformer transformer : transformerList)
for (CombinedConfig.TransformAndItsOrigin t : transformerList)
{
if(transformer.getTransformerPipeline() == null)
if(t.transformer.getTransformerPipeline() == null)
{
assertNotNull(transformer.getTransformerName()+ " alfresco-global property not set.", properties.getProperty(LOCAL_TRANSFORM + transformer.getTransformerName() + URL));
assertNotNull(t.transformer.getTransformerName()+ " alfresco-global property not set.", properties.getProperty(LOCAL_TRANSFORM + t.transformer.getTransformerName() + URL));
}
}
assertEquals("Unexpected pdfrenderer alfresco-global property value", "http://localhost:8090/", properties.getProperty(LOCAL_TRANSFORM + "pdfrenderer" + URL));

View File

@@ -1 +0,0 @@
mycustommessages.key1=This is a custom message

View File

@@ -1 +0,0 @@
mycustommessages.key1=Dies ist eine benutzerdefinierte Nachricht

View File

@@ -1 +0,0 @@
mycustommessages.key1=Ceci est un message personnalis\u00e9