mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
REPO-5079,ATS-707: Use all-in-one T-Engine and fix tests (#943)
This commit is contained in:
34
.travis.yml
34
.travis.yml
@@ -35,9 +35,7 @@ jobs:
|
||||
if: fork = false AND (branch = master OR branch =~ /support\/SP\/.*/) AND type != pull_request
|
||||
script:
|
||||
# Download the latest version of WhiteSource Unified Agent
|
||||
#- curl -LJO https://github.com/whitesource/unified-agent-distribution/raw/master/standAlone/wss-unified-agent.jar
|
||||
# Use the latest released version of the agent available in github (temporary solution)
|
||||
- curl -LJO https://github.com/whitesource/unified-agent-distribution/raw/v20.1.2/standAlone/wss-unified-agent-20.1.2.jar
|
||||
- curl -LJO https://github.com/whitesource/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar
|
||||
# Run WhiteSource Unified Agent
|
||||
- java -jar wss-unified-agent-20.1.2.jar -apiKey ${WHITESOURCE_API_KEY} -c .wss-unified-agent.config
|
||||
- name: "AppContext01TestSuite"
|
||||
@@ -54,21 +52,13 @@ jobs:
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.4 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-pdf-renderer:2.1.0-RC3
|
||||
- docker run -d -p 8091:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-imagemagick:2.1.0-RC3
|
||||
- docker run -d -p 8092:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-libreoffice:2.1.0-RC3
|
||||
- docker run -d -p 8093:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-tika:2.1.0-RC3
|
||||
- docker run -d -p 8094:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-misc:2.1.0-RC3
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8092/ -Dimg.url=http://localhost:8091/ -Dtika.url=http://localhost:8093/ -Dtransform.misc.url=http://localhost:8094/
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.2.0-A4
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext03TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
- name: "AppContext04TestSuite"
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.4 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-pdf-renderer:2.1.0-RC3
|
||||
- docker run -d -p 8091:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-imagemagick:2.1.0-RC3
|
||||
- docker run -d -p 8092:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-libreoffice:2.1.0-RC3
|
||||
- docker run -d -p 8093:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-tika:2.1.0-RC3
|
||||
- docker run -d -p 8094:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-misc:2.1.0-RC3
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.2.0-A4
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext04TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||
- name: "AppContext05TestSuite"
|
||||
before_install:
|
||||
@@ -79,12 +69,8 @@ jobs:
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.4 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-pdf-renderer:2.1.0-RC3
|
||||
- docker run -d -p 8091:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-imagemagick:2.1.0-RC3
|
||||
- docker run -d -p 8092:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-libreoffice:2.1.0-RC3
|
||||
- docker run -d -p 8093:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-tika:2.1.0-RC3
|
||||
- docker run -d -p 8094:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-misc:2.1.0-RC3
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8092/ -Dimg.url=http://localhost:8091/ -Dtika.url=http://localhost:8093/ -Dtransform.misc.url=http://localhost:8094/
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.2.0-A4
|
||||
script: travis_wait 20 mvn test -B -Dtest=AppContext06TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
- name: "AppContextExtraTestSuite"
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.4 postgres -c 'max_connections=300'
|
||||
@@ -94,12 +80,8 @@ jobs:
|
||||
before_install:
|
||||
- docker run -d -p 5433:5432 -e POSTGRES_PASSWORD=alfresco -e POSTGRES_USER=alfresco -e POSTGRES_DB=alfresco postgres:11.4 postgres -c 'max_connections=300'
|
||||
- docker run -d -p 61616:61616 -p 5672:5672 alfresco/alfresco-activemq:5.15.8
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-pdf-renderer:2.1.0-RC3
|
||||
- docker run -d -p 8091:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-imagemagick:2.1.0-RC3
|
||||
- docker run -d -p 8092:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-libreoffice:2.1.0-RC3
|
||||
- docker run -d -p 8093:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-tika:2.1.0-RC3
|
||||
- docker run -d -p 8094:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-misc:2.1.0-RC3
|
||||
script: travis_wait 20 mvn test -B -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8092/ -Dimg.url=http://localhost:8091/ -Dtika.url=http://localhost:8093/ -Dtransform.misc.url=http://localhost:8094/
|
||||
- docker run -d -p 8090:8090 -e JAVA_OPTS=" -Xms256m -Xmx256m" alfresco/alfresco-transform-core-aio:2.2.0-A4
|
||||
script: travis_wait 20 mvn test -B -Dtest=MiscContextTestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dalfresco-pdf-renderer.url=http://localhost:8090/ -Djodconverter.url=http://localhost:8090/ -Dimg.url=http://localhost:8090/ -Dtika.url=http://localhost:8090/ -Dtransform.misc.url=http://localhost:8090/
|
||||
- name: "MySQL tests"
|
||||
before_install:
|
||||
- docker run -d -p 3307:3306 -e MYSQL_ROOT_PASSWORD=alfresco -e MYSQL_USER=alfresco -e MYSQL_DATABASE=alfresco -e MYSQL_PASSWORD=alfresco mysql:5.7.23 --transaction-isolation='READ-COMMITTED'
|
||||
|
@@ -161,7 +161,9 @@ public class AppleIWorksContentTransformer extends AbstractRemoteContentTransfor
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "appleIWorks",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"sourceExtension", sourceExtension,
|
||||
"targetMimetype", targetMimetype);
|
||||
}
|
||||
}
|
||||
|
@@ -158,8 +158,10 @@ public class ArchiveContentTransformer extends TikaPoweredContentTransformer
|
||||
}
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "Archive",
|
||||
"includeContents", Boolean.toString(recurse),
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"sourceExtension", sourceExtension,
|
||||
"targetMimetype", targetMimetype,
|
||||
TARGET_ENCODING, targetEncoding);
|
||||
}
|
||||
|
@@ -81,4 +81,6 @@ public interface ContentTransformerWorker
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2016 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
|
||||
@@ -26,24 +26,26 @@
|
||||
|
||||
package org.alfresco.repo.content.transform;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Multipart;
|
||||
import javax.mail.Part;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.content.filestore.FileContentWriter;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.TransformationOptions;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import javax.mail.MessagingException;
|
||||
import javax.mail.Multipart;
|
||||
import javax.mail.Part;
|
||||
import javax.mail.Session;
|
||||
import javax.mail.internet.MimeMessage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import static org.alfresco.repo.rendition2.RenditionDefinition2.TARGET_ENCODING;
|
||||
|
||||
|
||||
/**
|
||||
@@ -57,9 +59,9 @@ import org.alfresco.util.TempFileProvider;
|
||||
* @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 EMLTransformer extends AbstractContentTransformer2
|
||||
|
||||
public class EMLTransformer extends AbstractRemoteContentTransformer
|
||||
{
|
||||
private static final Log logger = LogFactory.getLog(EMLTransformer.class);
|
||||
private static final String CHARSET = "charset";
|
||||
private static final String DEFAULT_ENCODING = "UTF-8";
|
||||
|
||||
@@ -85,7 +87,13 @@ public class EMLTransformer extends AbstractContentTransformer2
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void transformInternal(ContentReader reader, ContentWriter writer, TransformationOptions options) throws Exception
|
||||
protected Log getLogger()
|
||||
{
|
||||
return logger;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void transformLocal(ContentReader reader, ContentWriter writer, TransformationOptions options) throws Exception
|
||||
{
|
||||
InputStream contentInputStream = null;
|
||||
try{
|
||||
@@ -245,4 +253,20 @@ public class EMLTransformer extends AbstractContentTransformer2
|
||||
return encoding;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void transformRemote(RemoteTransformerClient remoteTransformerClient, ContentReader reader,
|
||||
ContentWriter writer, TransformationOptions options,
|
||||
String sourceMimetype, String targetMimetype,
|
||||
String sourceExtension, String targetExtension,
|
||||
String targetEncoding) throws Exception
|
||||
{
|
||||
long timeoutMs = options.getTimeoutMs();
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "rfc822",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension);
|
||||
}
|
||||
}
|
||||
|
@@ -138,7 +138,9 @@ public class HtmlParserContentTransformer extends AbstractRemoteContentTransform
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "html",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"sourceExtension", sourceExtension,
|
||||
"targetMimetype", targetMimetype,
|
||||
SOURCE_ENCODING, sourceEncoding);
|
||||
}
|
||||
|
@@ -45,6 +45,7 @@ public class MailContentTransformer extends TikaPoweredContentTransformer
|
||||
super(new String[] {
|
||||
MimetypeMap.MIMETYPE_OUTLOOK_MSG
|
||||
});
|
||||
setTransformerName("OutlookMsg");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -370,7 +370,7 @@ public abstract class OOoContentTransformerHelper extends ContentTransformerHelp
|
||||
{
|
||||
if (remoteTransformerClientConfigured())
|
||||
{
|
||||
transformRemote(reader, writer, options, sourceMimetype, sourceExtension, targetExtension);
|
||||
transformRemote(reader, writer, options, sourceMimetype, sourceExtension, targetMimetype, targetExtension);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -434,13 +434,17 @@ public abstract class OOoContentTransformerHelper extends ContentTransformerHelp
|
||||
}
|
||||
|
||||
protected void transformRemote(ContentReader reader, ContentWriter writer, TransformationOptions options,
|
||||
String sourceMimetype,
|
||||
String sourceExtension, String targetExtension) throws IllegalAccessException
|
||||
String sourceMimetype, String sourceExtension,
|
||||
String targetMimetype, String targetExtension) throws IllegalAccessException
|
||||
{
|
||||
long timeoutMs = options.getTimeoutMs();
|
||||
Log logger = getLogger();
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger);
|
||||
timeoutMs, logger,
|
||||
"transformName", "libreoffice",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"sourceExtension", sourceExtension,
|
||||
"targetMimetype", targetMimetype);
|
||||
}
|
||||
|
||||
private boolean temporaryMsFile(TransformationOptions options)
|
||||
|
@@ -116,10 +116,12 @@ public class PdfBoxContentTransformer extends TikaPoweredContentTransformer
|
||||
}
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
timeoutMs, logger,
|
||||
"transformName", "PdfBox",
|
||||
"notExtractBookmarksText", notExtractBookmarksText,
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension,
|
||||
TARGET_ENCODING, targetEncoding);
|
||||
}
|
||||
}
|
||||
|
@@ -70,6 +70,7 @@ public class PoiContentTransformer extends TikaPoweredContentTransformer
|
||||
|
||||
public PoiContentTransformer() {
|
||||
super(SUPPORTED_MIMETYPES);
|
||||
setTransformerName("Office");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -69,6 +69,7 @@ public class PoiHssfContentTransformer extends TikaPoweredContentTransformer
|
||||
MimetypeMap.MIMETYPE_EXCEL,
|
||||
MimetypeMap.MIMETYPE_OPENXML_SPREADSHEET
|
||||
});
|
||||
setTransformerName("Poi");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -59,6 +59,7 @@ public class PoiOOXMLContentTransformer extends TikaPoweredContentTransformer
|
||||
public PoiOOXMLContentTransformer() {
|
||||
super(SUPPORTED_MIMETYPES);
|
||||
setUseTimeoutThread(true);
|
||||
setTransformerName("OOXML");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -298,4 +298,7 @@ public class RuntimeExecutableContentTransformerWorker extends ContentTransforme
|
||||
" result: \n" + result);
|
||||
}
|
||||
}
|
||||
public void setRemoteTransformerClient(RemoteTransformerClient remoteTransformerClient)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -185,8 +185,10 @@ public class StringExtractingContentTransformer extends AbstractRemoteContentTra
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "string",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension,
|
||||
SOURCE_ENCODING, sourceEncoding,
|
||||
TARGET_ENCODING, targetEncoding);
|
||||
|
||||
|
@@ -45,6 +45,7 @@ public class TextMiningContentTransformer extends TikaPoweredContentTransformer
|
||||
super(new String[] {
|
||||
MimetypeMap.MIMETYPE_WORD
|
||||
});
|
||||
setTransformerName("TextMining");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -193,8 +193,10 @@ public class TextToPdfContentTransformer extends AbstractRemoteContentTransforme
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", "textToPdf",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension,
|
||||
SOURCE_ENCODING, sourceEncoding,
|
||||
"pageLimit", String.valueOf(pageLimit));
|
||||
}
|
||||
|
@@ -119,6 +119,7 @@ public class TikaAutoContentTransformer extends TikaPoweredContentTransformer
|
||||
{
|
||||
super( buildMimeTypes(tikaConfig) );
|
||||
setUseTimeoutThread(true);
|
||||
setTransformerName("TikaAuto");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -88,6 +88,7 @@ public abstract class TikaPoweredContentTransformer extends AbstractRemoteConten
|
||||
" Time Spent: %d ms";
|
||||
|
||||
protected List<String> sourceMimeTypes;
|
||||
private String transformerName;
|
||||
protected DocumentSelector documentSelector;
|
||||
|
||||
/**
|
||||
@@ -106,6 +107,11 @@ public abstract class TikaPoweredContentTransformer extends AbstractRemoteConten
|
||||
this(Arrays.asList(sourceMimeTypes));
|
||||
}
|
||||
|
||||
public void setTransformerName(String transformerName)
|
||||
{
|
||||
this.transformerName = transformerName;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Log getLogger()
|
||||
{
|
||||
@@ -298,8 +304,10 @@ public abstract class TikaPoweredContentTransformer extends AbstractRemoteConten
|
||||
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
"transformName", transformerName,
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension,
|
||||
TARGET_ENCODING, targetEncoding);
|
||||
}
|
||||
|
||||
|
@@ -1,110 +0,0 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* 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
|
||||
* 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 java.util.ArrayList;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.apache.tika.mime.MediaType;
|
||||
import org.apache.tika.parser.ParseContext;
|
||||
import org.apache.tika.parser.Parser;
|
||||
|
||||
/**
|
||||
* A Content Extractor for XML, HTML and Text, which makes
|
||||
* use of Apache Tika, and allows the selection of the
|
||||
* Tika parser to be sprung-in.
|
||||
* Using spring, you list the Tika parser to use, which
|
||||
* may well not be a standard Tika one. You should specify
|
||||
* either a spring created bean, or a parser class name.
|
||||
*
|
||||
* @author Nick Burch
|
||||
*
|
||||
* @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 TikaSpringConfiguredContentTransformer extends TikaPoweredContentTransformer
|
||||
{
|
||||
private Parser tikaParser;
|
||||
private String tikaParserClassName;
|
||||
private Class<? extends Parser> tikaParserClass;
|
||||
|
||||
/**
|
||||
* Injects the name of the Tika parser to use
|
||||
* @param className String
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setTikaParserName(String className)
|
||||
{
|
||||
tikaParserClassName = className;
|
||||
|
||||
// Load the class
|
||||
try {
|
||||
tikaParserClass = (Class<? extends Parser>)Class.forName(tikaParserClassName);
|
||||
setTikaParser(getParser());
|
||||
} catch(ClassNotFoundException e) {
|
||||
throw new AlfrescoRuntimeException("Specified Tika Parser '" + tikaParserClassName + "' not found");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Injects the Tika parser to use
|
||||
* @param tikaParser Parser
|
||||
*/
|
||||
public void setTikaParser(Parser tikaParser)
|
||||
{
|
||||
this.tikaParser = tikaParser;
|
||||
|
||||
// Build the mime types, updating the copy our parent
|
||||
// holds for us as we go along
|
||||
for(MediaType mt : tikaParser.getSupportedTypes(new ParseContext()))
|
||||
{
|
||||
super.sourceMimeTypes.add( mt.toString() );
|
||||
}
|
||||
}
|
||||
|
||||
public TikaSpringConfiguredContentTransformer() {
|
||||
super(new ArrayList<String>());
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Tika parser
|
||||
*/
|
||||
protected Parser getParser()
|
||||
{
|
||||
// If we were given a whole parser, return it
|
||||
if(tikaParser != null)
|
||||
return tikaParser;
|
||||
|
||||
// Otherwise create a new one
|
||||
try {
|
||||
return tikaParserClass.newInstance();
|
||||
} catch (InstantiationException e) {
|
||||
throw new AlfrescoRuntimeException("Unable to create specified Parser", e);
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new AlfrescoRuntimeException("Unable to create specified Parser", e);
|
||||
}
|
||||
}
|
||||
}
|
@@ -270,15 +270,15 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
|
||||
String sourceMimetype, String targetMimetype,
|
||||
String sourceExtension, String targetExtension) throws IllegalAccessException
|
||||
{
|
||||
String[] args = getTEngineArgs(options, sourceMimetype, targetMimetype, versionString);
|
||||
String[] args = getTEngineArgs(options, sourceMimetype, sourceExtension, targetMimetype, versionString);
|
||||
long timeoutMs = options.getTimeoutMs();
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger, args);
|
||||
}
|
||||
|
||||
// Not to be called directly. Refactored to make it easier to test TransformationOptionsConverter.
|
||||
public static String[] getTEngineArgs(TransformationOptions options, String sourceMimetype, String targetMimetype,
|
||||
String versionString)
|
||||
public static String[] getTEngineArgs(TransformationOptions options, String sourceMimetype, String sourceExtension,
|
||||
String targetMimetype, String versionString)
|
||||
{
|
||||
String startPage = null;
|
||||
String endPage = null;
|
||||
@@ -302,7 +302,6 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
|
||||
|
||||
String commandOptions = null;
|
||||
|
||||
|
||||
if (options instanceof ImageTransformationOptions)
|
||||
{
|
||||
ImageTransformationOptions imageOptions = (ImageTransformationOptions)options;
|
||||
@@ -360,13 +359,13 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
|
||||
{
|
||||
resizePercentage = Boolean.TRUE.toString();
|
||||
}
|
||||
if (resizeOptions.getAllowEnlargement())
|
||||
if (!resizeOptions.getAllowEnlargement())
|
||||
{
|
||||
allowEnlargement = Boolean.TRUE.toString();
|
||||
allowEnlargement = Boolean.FALSE.toString();
|
||||
}
|
||||
if (resizeOptions.isMaintainAspectRatio())
|
||||
if (!resizeOptions.isMaintainAspectRatio())
|
||||
{
|
||||
maintainAspectRatio = Boolean.TRUE.toString();
|
||||
maintainAspectRatio = Boolean.FALSE.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -397,6 +396,11 @@ public class ImageMagickContentTransformerWorker extends AbstractImageMagickCont
|
||||
}
|
||||
|
||||
return new String[] {
|
||||
"transformName", "imagemagick",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"sourceExtension", sourceExtension,
|
||||
"targetMimetype", targetMimetype,
|
||||
|
||||
START_PAGE, startPage,
|
||||
END_PAGE, endPage,
|
||||
|
||||
|
@@ -391,7 +391,10 @@ public class AlfrescoPdfRendererContentTransformerWorker extends ContentTransfor
|
||||
long timeoutMs = options.getTimeoutMs();
|
||||
remoteTransformerClient.request(reader, writer, sourceMimetype, sourceExtension, targetExtension,
|
||||
timeoutMs, logger,
|
||||
|
||||
"transformName", "pdfrenderer",
|
||||
"sourceMimetype", sourceMimetype,
|
||||
"targetMimetype", targetMimetype,
|
||||
"targetExtension", targetExtension,
|
||||
PAGE, page,
|
||||
WIDTH, width,
|
||||
HEIGHT, height,
|
||||
|
@@ -160,7 +160,10 @@ public class CombinedConfig
|
||||
try
|
||||
{
|
||||
String content = getContent(resEntity);
|
||||
|
||||
if (log.isTraceEnabled())
|
||||
{
|
||||
log.trace(remoteType+" config on "+baseUrl+" "+content);
|
||||
}
|
||||
try (StringReader reader = new StringReader(content))
|
||||
{
|
||||
int transformCount = combinedTransformers.size();
|
||||
|
@@ -649,7 +649,12 @@
|
||||
|
||||
<bean id="transformer.RFC822"
|
||||
class="org.alfresco.repo.content.transform.EMLTransformer"
|
||||
parent="baseContentTransformer" />
|
||||
parent="baseContentTransformer">
|
||||
<property name="enabled" value="${legacy.transform.service.enabled}" />
|
||||
<property name="remoteTransformerClient">
|
||||
<ref bean="miscRemoteTransformerClient" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Import the ImageMagick transformer from the third party subsystem -->
|
||||
<bean id="transformer.worker.ImageMagick" class="org.alfresco.repo.management.subsystems.SubsystemProxyFactory">
|
||||
|
@@ -621,19 +621,11 @@ tika.startupRetryPeriodSeconds=60
|
||||
transform.misc.startupRetryPeriodSeconds=60
|
||||
|
||||
# Local transformer urls to T-engines to service transform requests via http. Enabled by default.
|
||||
localTransform.pdfrenderer.url=http://localhost:8090/
|
||||
localTransform.imagemagick.url=http://localhost:8091/
|
||||
localTransform.libreoffice.url=http://localhost:8092/
|
||||
localTransform.tika.url=http://localhost:8093/
|
||||
localTransform.misc.url=http://localhost:8094/
|
||||
localTransform.core-aio.url=http://localhost:8090/
|
||||
|
||||
# When a local transformer .url is set, this value indicates the amount of time to wait after a connection failure
|
||||
# before retrying the connection to allow a docker container to (re)start.
|
||||
localTransform.pdfrenderer.startupRetryPeriodSeconds=60
|
||||
localTransform.imagemagick.startupRetryPeriodSeconds=60
|
||||
localTransform.libreoffice.startupRetryPeriodSeconds=60
|
||||
localTransform.tika.startupRetryPeriodSeconds=60
|
||||
localTransform.misc.startupRetryPeriodSeconds=60
|
||||
localTransform.core-aio.startupRetryPeriodSeconds=60
|
||||
|
||||
#
|
||||
content.metadataExtracter.pdf.maxDocumentSizeMB=10
|
||||
|
@@ -78,7 +78,9 @@ public class EMLTransformerTest extends AbstractContentTransformerTest
|
||||
transformer.setMimetypeService(mimetypeService);
|
||||
transformer.setTransformerDebug(transformerDebug);
|
||||
transformer.setTransformerConfig(transformerConfig);
|
||||
|
||||
RemoteTransformerClient remoteTransformerClient = new RemoteTransformerClient("miscRemoteTransformerClient", "http://localhost:8090/");
|
||||
transformer.setRemoteTransformerClient(remoteTransformerClient);
|
||||
|
||||
registry = (ContentTransformerRegistry) ctx.getBean("contentTransformerRegistry");
|
||||
synchronousTransformClient = (SynchronousTransformClient) ctx.getBean("synchronousTransformClient");
|
||||
}
|
||||
|
@@ -59,6 +59,8 @@ public class OpenOfficeContentTransformerTest extends AbstractContentTransformer
|
||||
super.setUp();
|
||||
|
||||
this.worker = (ContentTransformerWorker) ctx.getBean("transformer.worker.JodConverter");
|
||||
RemoteTransformerClient remoteTransformerClient = new RemoteTransformerClient("miscRemoteTransformerClient", "http://localhost:8090/");
|
||||
worker.setRemoteTransformerClient(remoteTransformerClient);
|
||||
transformer = new ProxyContentTransformer();
|
||||
transformer.setMimetypeService(mimetypeService);
|
||||
transformer.setTransformerDebug(transformerDebug);
|
||||
@@ -99,7 +101,7 @@ public class OpenOfficeContentTransformerTest extends AbstractContentTransformer
|
||||
reliability = transformer.isTransformable(MimetypeMap.MIMETYPE_WORD, -1, MimetypeMap.MIMETYPE_TEXT_PLAIN, new TransformationOptions());
|
||||
assertEquals("Mimetype should be supported", true, reliability);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test what is up with HTML to PDF
|
||||
*/
|
||||
@@ -117,10 +119,10 @@ public class OpenOfficeContentTransformerTest extends AbstractContentTransformer
|
||||
reader.setMimetype(MimetypeMap.MIMETYPE_HTML);
|
||||
ContentWriter writer = new FileContentWriter(pdfTargetFile);
|
||||
writer.setMimetype(MimetypeMap.MIMETYPE_PDF);
|
||||
|
||||
|
||||
transformer.transform(reader, writer);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ALF-219. Transforamtion from .html to .pdf for empty file.
|
||||
* @throws Exception
|
||||
|
@@ -36,12 +36,15 @@ import org.alfresco.repo.content.filestore.FileContentWriter;
|
||||
import org.alfresco.repo.content.transform.AbstractContentTransformerTest;
|
||||
import org.alfresco.repo.content.transform.ContentTransformer;
|
||||
import org.alfresco.repo.content.transform.ProxyContentTransformer;
|
||||
import org.alfresco.repo.content.transform.RemoteTransformerClient;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.PagedSourceOptions;
|
||||
import org.alfresco.service.cmr.repository.TransformationOptions;
|
||||
import org.alfresco.service.cmr.repository.TransformationSourceOptions;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.repo.content.transform.magick.ImageMagickContentTransformerWorker
|
||||
@@ -54,7 +57,28 @@ import org.alfresco.util.TempFileProvider;
|
||||
public class ImageMagickContentTransformerTest extends AbstractContentTransformerTest
|
||||
{
|
||||
private ProxyContentTransformer transformer;
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public static void before()
|
||||
{
|
||||
// Use the docker images for transforms (legacy)
|
||||
System.setProperty("alfresco-pdf-renderer.url", "http://localhost:8090/");
|
||||
System.setProperty("img.url", "http://localhost:8090/");
|
||||
System.setProperty("jodconverter.url", "http://localhost:8090/");
|
||||
System.setProperty("tika.url", "http://localhost:8090/");
|
||||
System.setProperty("transform.misc.url", "http://localhost:8090/");
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public static void after()
|
||||
{
|
||||
System.clearProperty("alfresco-pdf-renderer.url");
|
||||
System.clearProperty("img.url");
|
||||
System.clearProperty("jodconverter.url");
|
||||
System.clearProperty("tika.url");
|
||||
System.clearProperty("transform.misc.url");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
@@ -68,6 +92,8 @@ public class ImageMagickContentTransformerTest extends AbstractContentTransforme
|
||||
this.mimetypeService = testMimetypeService;
|
||||
|
||||
transformer = (ProxyContentTransformer) ctx.getBean("transformer.ImageMagick");
|
||||
RemoteTransformerClient remoteTransformerClient = new RemoteTransformerClient("miscRemoteTransformerClient", "http://localhost:8090/");
|
||||
transformer.getWorker().setRemoteTransformerClient(remoteTransformerClient);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1033,11 +1033,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
parameterValues.put(ImageRenderingEngine.PARAM_RESIZE_WIDTH, imageNewXSize);
|
||||
parameterValues.put(ImageRenderingEngine.PARAM_RESIZE_HEIGHT, imageNewYSize);
|
||||
|
||||
// PARAM_MAINTAIN_ASPECT_RATIO needs to be set to true in ACS 6.2.1 as ImageRenderingEngine sets it to false by
|
||||
// default and having corrected errors in TransformationOptionsConverter, this is now being picked up, resulting
|
||||
// a test failure. In 5.2 the the check had been for false rather than true.
|
||||
parameterValues.put(ImageRenderingEngine.PARAM_MAINTAIN_ASPECT_RATIO, true);
|
||||
|
||||
final NodeRef newRenditionNode = performImageRendition(parameterValues, nodeWithImageContent);
|
||||
|
||||
// Assert that the rendition is of the correct size and has reasonable
|
||||
@@ -2497,10 +2492,6 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest
|
||||
rescaleImageDefinition.setParameterValue(ImageRenderingEngine.PARAM_RESIZE_WIDTH, newX);
|
||||
rescaleImageDefinition.setParameterValue(ImageRenderingEngine.PARAM_RESIZE_HEIGHT, newY);
|
||||
|
||||
// PARAM_MAINTAIN_ASPECT_RATIO needs to be set to true in ACS 6.2.1 as ImageRenderingEngine sets it to false by
|
||||
// default and having corrected errors in TransformationOptionsConverter, this is now being picked up, resulting
|
||||
// a test failure. In 5.2 the the check had been for false rather than true.
|
||||
rescaleImageDefinition.setParameterValue(ImageRenderingEngine.PARAM_MAINTAIN_ASPECT_RATIO, true);
|
||||
compositeDefinition.addAction(reformatDefinition);
|
||||
compositeDefinition.addAction(rescaleImageDefinition);
|
||||
return compositeDefinition;
|
||||
|
@@ -131,17 +131,13 @@ public abstract class AbstractRenditionIntegrationTest extends BaseSpringTest
|
||||
{
|
||||
// Use the docker images for transforms (legacy)
|
||||
System.setProperty("alfresco-pdf-renderer.url", "http://localhost:8090/");
|
||||
System.setProperty("img.url", "http://localhost:8091/");
|
||||
System.setProperty("jodconverter.url", "http://localhost:8092/");
|
||||
System.setProperty("tika.url", "http://localhost:8093/");
|
||||
System.setProperty("transform.misc.url", "http://localhost:8094/");
|
||||
System.setProperty("img.url", "http://localhost:8090/");
|
||||
System.setProperty("jodconverter.url", "http://localhost:8090/");
|
||||
System.setProperty("tika.url", "http://localhost:8090/");
|
||||
System.setProperty("transform.misc.url", "http://localhost:8090/");
|
||||
|
||||
// Use the docker images for transforms (local)
|
||||
System.setProperty("localTransform.pdfrenderer.url", "http://localhost:8090/");
|
||||
System.setProperty("localTransform.imagemagick.url", "http://localhost:8091/");
|
||||
System.setProperty("localTransform.libreoffice.url", "http://localhost:8092/");
|
||||
System.setProperty("localTransform.tika.url", "http://localhost:8093/");
|
||||
System.setProperty("localTransform.misc.url", "http://localhost:8094/");
|
||||
System.setProperty("localTransform.core-aio.url", "http://localhost:8090/");
|
||||
}
|
||||
|
||||
protected static void none()
|
||||
@@ -232,11 +228,7 @@ public abstract class AbstractRenditionIntegrationTest extends BaseSpringTest
|
||||
System.clearProperty("tika.url");
|
||||
System.clearProperty("transform.misc.url");
|
||||
|
||||
System.clearProperty("localTransform.pdfrenderer.url");
|
||||
System.clearProperty("localTransform.imagemagick.url");
|
||||
System.clearProperty("localTransform.libreoffice.url");
|
||||
System.clearProperty("localTransform.tika.url");
|
||||
System.clearProperty("localTransform.misc.url");
|
||||
System.clearProperty("localTransform.core-aio.url");
|
||||
|
||||
System.clearProperty("transform.service.enabled");
|
||||
System.clearProperty("local.transform.service.enabled");
|
||||
|
@@ -38,6 +38,7 @@ import org.junit.runner.RunWith;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -63,8 +64,8 @@ public class TransformationOptionsConverterTest
|
||||
private static final String[] DISCARD_OPTIONS = new String[]
|
||||
{
|
||||
"autoOrient", "false",
|
||||
"maintainAspectRatio", "false",
|
||||
"allowEnlargement", "false"
|
||||
"maintainAspectRatio", "true",
|
||||
"allowEnlargement", "true"
|
||||
};
|
||||
|
||||
@Before
|
||||
@@ -90,8 +91,7 @@ public class TransformationOptionsConverterTest
|
||||
// It is really checking that the supplied expectedArgs (just used to check the sortedNewOptions) are correct.
|
||||
if (checkImageMagickContentTransformerWorkerResult)
|
||||
{
|
||||
String[] tEngineArgs = ImageMagickContentTransformerWorker.getTEngineArgs(oldOptions, sourceMimetype, targetMimetype,
|
||||
"Version: ImageMagick 6.7.5");
|
||||
String[] tEngineArgs = getOptionalTEngineArgs(oldOptions, sourceMimetype, targetMimetype);
|
||||
String sortedTEngineOptions = getSortedOptions(tEngineArgs)+"timeout=-1 ";
|
||||
assertEquals("Test error: expectedArgs are not what is generated by ImageMagickContentTransformerWorker",
|
||||
expectedArgs, sortedTEngineOptions);
|
||||
@@ -109,6 +109,14 @@ public class TransformationOptionsConverterTest
|
||||
assertEquals("Having converted twice the map is different", sortedOldOptions, sortedBackToOldOptions);
|
||||
}
|
||||
|
||||
// Discards the transformerName, sourceMimetype, sourceExtension and targetMimetype elements which are always in the first 3 elements.
|
||||
private String[] getOptionalTEngineArgs(TransformationOptions oldOptions, String sourceMimetype, String targetMimetype)
|
||||
{
|
||||
String[] args = ImageMagickContentTransformerWorker.getTEngineArgs(oldOptions, sourceMimetype, null, targetMimetype,
|
||||
"Version: ImageMagick 6.7.5");
|
||||
return Arrays.copyOfRange(args, 4*2, args.length);
|
||||
}
|
||||
|
||||
private String getSortedOptions(TransformationOptions options, String sourceMimetype, String targetMimetype)
|
||||
{
|
||||
Map<String, String> map = converter.getOptions(options, sourceMimetype, targetMimetype);
|
||||
@@ -178,11 +186,9 @@ public class TransformationOptionsConverterTest
|
||||
"ImageResizeOptions [width=20, height=30, maintainAspectRatio=true, percentResize=false, " +
|
||||
"resizeToThumbnail=false, allowEnlargement=true], autoOrient=true], " +
|
||||
"sourceOptions={ PagedSourceOptionsPagedSourceOptions {1, 1}} ]",
|
||||
"allowEnlargement=true " +
|
||||
"alphaRemove=true " +
|
||||
"alphaRemove=true " +
|
||||
"autoOrient=true " +
|
||||
"endPage=0 " +
|
||||
"maintainAspectRatio=true " +
|
||||
"resizeHeight=30 " +
|
||||
"resizeWidth=20 " +
|
||||
"startPage=0 " +
|
||||
@@ -349,9 +355,7 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=true, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=true], autoOrient=false]]",
|
||||
"allowEnlargement=true " +
|
||||
"maintainAspectRatio=true " +
|
||||
"timeout=-1 ",
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
|
||||
@@ -369,7 +373,7 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=true, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=false], autoOrient=false]]",
|
||||
"maintainAspectRatio=true " +
|
||||
"allowEnlargement=false " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
@@ -388,7 +392,7 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=true], autoOrient=false]]",
|
||||
"allowEnlargement=true " +
|
||||
"maintainAspectRatio=false " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
@@ -408,7 +412,9 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=false], autoOrient=false]]",
|
||||
"timeout=-1 ",
|
||||
"allowEnlargement=false " +
|
||||
"maintainAspectRatio=false " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
|
||||
@@ -428,7 +434,9 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " +
|
||||
"percentResize=false, resizeToThumbnail=true, allowEnlargement=false], autoOrient=false]]",
|
||||
"thumbnail=true " +
|
||||
"allowEnlargement=false " +
|
||||
"maintainAspectRatio=false " +
|
||||
"thumbnail=true " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
@@ -450,7 +458,9 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=18, height=15, maintainAspectRatio=false, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=false], autoOrient=false]]",
|
||||
"resizeHeight=15 " +
|
||||
"allowEnlargement=false " +
|
||||
"maintainAspectRatio=false " +
|
||||
"resizeHeight=15 " +
|
||||
"resizeWidth=18 " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
@@ -472,7 +482,9 @@ public class TransformationOptionsConverterTest
|
||||
"ImageTransformationOptions [commandOptions=, " +
|
||||
"resizeOptions=ImageResizeOptions [width=-1, height=-1, maintainAspectRatio=false, " +
|
||||
"percentResize=true, resizeToThumbnail=false, allowEnlargement=false], autoOrient=false]]",
|
||||
"resizePercentage=true " +
|
||||
"allowEnlargement=false " +
|
||||
"maintainAspectRatio=false " +
|
||||
"resizePercentage=true " +
|
||||
"timeout=-1 ",
|
||||
true);
|
||||
}
|
||||
@@ -564,9 +576,9 @@ public class TransformationOptionsConverterTest
|
||||
"resizeOptions=ImageResizeOptions [width=20, height=30, maintainAspectRatio=true, " +
|
||||
"percentResize=false, resizeToThumbnail=false, allowEnlargement=false], autoOrient=true], " +
|
||||
"sourceOptions={ PagedSourceOptionsPagedSourceOptions {1, 1}} ]",
|
||||
"autoOrient=true " +
|
||||
"allowEnlargement=false " +
|
||||
"autoOrient=true " +
|
||||
"endPage=0 " +
|
||||
"maintainAspectRatio=true " +
|
||||
"resizeHeight=30 " +
|
||||
"resizeWidth=20 " +
|
||||
"startPage=0 " +
|
||||
|
@@ -263,6 +263,6 @@ log4j.logger.org.alfresco.repo.content.transform.TransformerDebug=debug
|
||||
#log4j.logger.org.alfresco.enterprise.repo.rendition2.RemoteTransformServiceRegistry=debug
|
||||
#log4j.logger.org.alfresco.repo.rendition2.RenditionDefinitionRegistry2Impl=debug
|
||||
#log4j.logger.org.alfresco.repo.content.MimetypeMap=debug
|
||||
#log4j.logger.org.alfresco.repo.content.transform.LocalTransform=debug
|
||||
#log4j.logger.org.alfresco.repo.content.transform.LocalTransform=trace
|
||||
|
||||
#log4j.logger.org.alfresco.repo.rawevents=debug
|
Reference in New Issue
Block a user