mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
Merge commit '0c939761299358bec8084ab7675d0a4798d09b16' into ATS-812_PoC_FFmpeg_skeleton
* commit '0c939761299358bec8084ab7675d0a4798d09b16': (97 commits) [maven-release-plugin][skip ci] prepare release 2.5.4 ACS-1998 Enhance the transform config (#484) Bump guava from 30.1.1-jre to 31.0.1-jre (#473) Bump jsoup from 1.14.2 to 1.14.3 (#475) Bump dependency.jackson.version from 2.12.5 to 2.13.0 (#476) Bump dependency.cxf.version from 3.4.4 to 3.4.5 (#477) Bump spring-boot-starter-parent from 2.5.4 to 2.5.6 (#479) ATS-970: Fix build after Travis secrets rotation (#469) Bump maven-javadoc-plugin from 3.3.0 to 3.3.1 (#466) Bump dependency.jackson.version from 2.12.4 to 2.12.5 (#464) [maven-release-plugin][skip ci] prepare for next development iteration [maven-release-plugin][skip ci] prepare release 2.5.3 ATS-956: Release Alfresco Transform Core 2.5.3 [trigger release] (#463) Bump docker-maven-plugin from 0.36.1 to 0.37.0 (#450) Bump jsoup from 1.14.1 to 1.14.2 (#451) Bump activemq-client from 5.16.2 to 5.16.3 (#452) Bump spring-boot-starter-parent from 2.5.3 to 2.5.4 (#454) Bump alfresco/alfresco-base-java (#458) Bump alfresco/alfresco-base-java (#456) Bump alfresco/alfresco-base-java (#457) ... # Conflicts: # .travis.yml
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>2.3.11-SNAPSHOT</version>
|
||||
<version>2.5.4</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<artifactId>alfresco-transformer-base</artifactId>
|
||||
<version>2.3.11-SNAPSHOT</version>
|
||||
<version>2.5.4</version>
|
||||
|
||||
<properties>
|
||||
<transformer.base.deploy.skip>false</transformer.base.deploy.skip>
|
||||
|
@@ -230,7 +230,7 @@ public abstract class AbstractTransformerController implements TransformControll
|
||||
File sourceFile;
|
||||
try
|
||||
{
|
||||
sourceFile = loadSourceFile(request.getSourceReference());
|
||||
sourceFile = loadSourceFile(request.getSourceReference(), request.getSourceExtension());
|
||||
}
|
||||
catch (TransformException e)
|
||||
{
|
||||
@@ -358,9 +358,10 @@ public abstract class AbstractTransformerController implements TransformControll
|
||||
* Loads the file with the specified sourceReference from Alfresco Shared File Store
|
||||
*
|
||||
* @param sourceReference reference to the file in Alfresco Shared File Store
|
||||
* @param sourceExtension default extension if the file in Alfresco Shared File Store has none
|
||||
* @return the file containing the source content for the transformation
|
||||
*/
|
||||
private File loadSourceFile(final String sourceReference)
|
||||
private File loadSourceFile(final String sourceReference, final String sourceExtension)
|
||||
{
|
||||
ResponseEntity<Resource> responseEntity = alfrescoSharedFileStoreClient
|
||||
.retrieveFile(sourceReference);
|
||||
@@ -369,7 +370,7 @@ public abstract class AbstractTransformerController implements TransformControll
|
||||
HttpHeaders headers = responseEntity.getHeaders();
|
||||
String filename = getFilenameFromContentDisposition(headers);
|
||||
|
||||
String extension = getFilenameExtension(filename);
|
||||
String extension = getFilenameExtension(filename) != null ? getFilenameExtension(filename) : sourceExtension;
|
||||
MediaType contentType = headers.getContentType();
|
||||
long size = headers.getContentLength();
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
* #%L
|
||||
* Alfresco Repository
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2018 Alfresco Software Limited
|
||||
* 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
|
||||
@@ -36,6 +36,7 @@ import javax.annotation.PostConstruct;
|
||||
|
||||
import org.alfresco.transform.client.model.config.TransformConfig;
|
||||
import org.alfresco.transform.client.registry.AbstractTransformRegistry;
|
||||
import org.alfresco.transform.client.registry.CombinedTransformConfig;
|
||||
import org.alfresco.transform.client.registry.TransformCache;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.slf4j.Logger;
|
||||
@@ -67,7 +68,8 @@ public class TransformRegistryImpl extends AbstractTransformRegistry
|
||||
{
|
||||
engineConfig = resourceLoader.getResource(locationFromProperty);
|
||||
TransformConfig transformConfig = getTransformConfig();
|
||||
registerAll(transformConfig, null, locationFromProperty);
|
||||
// There is only one TransformConfig in a T-Engine so the following call is fine
|
||||
CombinedTransformConfig.combineAndRegister(transformConfig, locationFromProperty, "---", this);
|
||||
}
|
||||
|
||||
// Holds the structures used by AbstractTransformRegistry to look up what is supported.
|
||||
@@ -100,4 +102,10 @@ public class TransformRegistryImpl extends AbstractTransformRegistry
|
||||
{
|
||||
log.error(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void logWarn(String msg)
|
||||
{
|
||||
log.warn(msg);
|
||||
}
|
||||
}
|
||||
|
@@ -46,6 +46,7 @@ import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.TreeMap;
|
||||
|
||||
/**
|
||||
* Helper methods for metadata extract and embed.
|
||||
@@ -577,7 +578,7 @@ public abstract class AbstractMetadataExtractor
|
||||
systemProperties.put(systemQName, documentValue);
|
||||
}
|
||||
}
|
||||
return systemProperties;
|
||||
return new TreeMap<String, Serializable>(systemProperties);
|
||||
}
|
||||
|
||||
private void writeMetadata(File targetFile, Map<String, Serializable> results)
|
||||
|
@@ -70,7 +70,7 @@ public interface RequestParamMap
|
||||
String COMMAND_OPTIONS = "commandOptions";
|
||||
String TIMEOUT = "timeout";
|
||||
String INCLUDE_CONTENTS = "includeContents";
|
||||
String NOT_EXTRACT_BOOKMARK_TEXT = "notExtractBookmarksText";
|
||||
String NOT_EXTRACT_BOOKMARKS_TEXT = "notExtractBookmarksText";
|
||||
String PAGE_LIMIT = "pageLimit";
|
||||
|
||||
// TODO PoC for FFmpeg
|
||||
|
@@ -503,7 +503,10 @@ public abstract class AbstractTransformerControllerTest
|
||||
private Transformer buildTransformer(String sourceMediaType, String targetMediaType)
|
||||
{
|
||||
Set<SupportedSourceAndTarget> supportedSourceAndTargetList = ImmutableSet.of(
|
||||
new SupportedSourceAndTarget(sourceMediaType, targetMediaType, -1));
|
||||
SupportedSourceAndTarget.builder()
|
||||
.withSourceMediaType(sourceMediaType)
|
||||
.withTargetMediaType(targetMediaType)
|
||||
.build());
|
||||
|
||||
Transformer transformer = new Transformer();
|
||||
transformer.setSupportedSourceAndTargetList(supportedSourceAndTargetList);
|
||||
|
Reference in New Issue
Block a user