mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-14 17:58:27 +00:00
[release] 0.0.2-HXP-SNAPSHOT
Make it simpler for t-engines based on the deprecated base * Move TransformException back to its original location * Provide an ExtensionService in its original location * Provide a Mimetype class in its original location * Fix the build failure in CombinedTransformConfigTest
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Model
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 General Lesser Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Lesser Public
|
||||
* License along with this program. If not, see
|
||||
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.client.model;
|
||||
|
||||
/**
|
||||
* @deprecated will be removed in a future release. Replaced by alfresco-base-t-engine.
|
||||
*
|
||||
* This interface previously existed in the alfresco-transform-model. It now exists in the deprecated
|
||||
* alfresco-transform-base and extends the new class. This should to make it easier to use the deprecated module
|
||||
* by custom transformers that have not been converted to the new base.
|
||||
*/
|
||||
public interface Mimetype extends org.alfresco.transform.common.Mimetype
|
||||
{
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* #%L
|
||||
* Alfresco Transform Model
|
||||
* %%
|
||||
* Copyright (C) 2005 - 2022 Alfresco Software Limited
|
||||
* %%
|
||||
* This program 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.
|
||||
*
|
||||
* This program 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 General Lesser Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Lesser Public
|
||||
* License along with this program. If not, see
|
||||
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.router;
|
||||
|
||||
/**
|
||||
* @deprecated will be removed in a future release. Replaced by alfresco-base-t-engine.
|
||||
*
|
||||
* This class previously existed in the alfresco-transform-model. It now exists in the deprecated
|
||||
* alfresco-transform-base and extends the new class. This should to make it easier to use the deprecated module
|
||||
* by custom transformers that have not been converted to the new base.
|
||||
*/
|
||||
public class ExtensionService extends org.alfresco.transform.common.ExtensionService
|
||||
{
|
||||
private ExtensionService()
|
||||
{
|
||||
}
|
||||
}
|
@@ -33,7 +33,7 @@ import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.messages.TransformRequestValidator;
|
||||
import org.alfresco.transform.config.TransformConfig;
|
||||
import org.alfresco.transform.registry.TransformServiceRegistry;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.clients.AlfrescoSharedFileStoreClient;
|
||||
import org.alfresco.transformer.logging.LogEntry;
|
||||
import org.alfresco.transformer.model.FileRefResponse;
|
||||
|
@@ -37,7 +37,7 @@ import javax.jms.Message;
|
||||
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.messaging.TransformMessageConverter;
|
||||
import org.alfresco.transformer.messaging.TransformReplySender;
|
||||
import org.slf4j.Logger;
|
||||
|
@@ -39,7 +39,7 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.logging.LogEntry;
|
||||
import org.alfresco.transformer.probes.ProbeTestTransform;
|
||||
import org.slf4j.Logger;
|
||||
|
@@ -39,7 +39,7 @@ import org.alfresco.transform.config.TransformConfig;
|
||||
import org.alfresco.transform.registry.AbstractTransformRegistry;
|
||||
import org.alfresco.transform.registry.CombinedTransformConfig;
|
||||
import org.alfresco.transform.registry.TransformCache;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@@ -31,7 +31,7 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.model.FileRefResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@@ -33,7 +33,7 @@ import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
/**
|
||||
* @deprecated will be removed in a future release. Replaced by alfresco-base-t-engine.
|
||||
|
@@ -27,7 +27,7 @@ package org.alfresco.transformer.executors;
|
||||
* #L%
|
||||
*/
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
@@ -42,7 +42,7 @@ import java.util.Arrays;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.logging.LogEntry;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
|
@@ -44,7 +44,7 @@ import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transformer.AbstractTransformerController;
|
||||
import org.alfresco.transformer.logging.LogEntry;
|
||||
import org.slf4j.Logger;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -32,7 +32,7 @@ import org.alfresco.transform.base.registry.TransformRegistry;
|
||||
import org.alfresco.transform.base.transform.TransformHandler;
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.config.TransformConfig;
|
||||
import org.alfresco.transform.registry.TransformServiceRegistry;
|
||||
import org.slf4j.Logger;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
package org.alfresco.transform.base;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@@ -33,7 +33,7 @@ import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
public abstract class AbstractCommandExecutor implements CommandExecutor
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ package org.alfresco.transform.base.fs;
|
||||
|
||||
import org.alfresco.transform.base.logging.LogEntry;
|
||||
import org.alfresco.transform.common.ExtensionService;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.core.io.UrlResource;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
|
@@ -29,7 +29,7 @@ package org.alfresco.transform.base.messaging;
|
||||
import org.alfresco.transform.base.TransformController;
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@@ -28,7 +28,7 @@ package org.alfresco.transform.base.probes;
|
||||
|
||||
import org.alfresco.transform.base.transform.TransformHandler;
|
||||
import org.alfresco.transform.base.logging.LogEntry;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ import static org.springframework.http.MediaType.MULTIPART_FORM_DATA;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.base.model.FileRefResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
package org.alfresco.transform.base.transform;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
@@ -32,10 +32,9 @@ import org.alfresco.transform.base.logging.LogEntry;
|
||||
import org.alfresco.transform.base.probes.ProbeTransform;
|
||||
import org.alfresco.transform.base.registry.CustomTransformers;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.common.TransformerDebug;
|
||||
import org.alfresco.transform.registry.TransformServiceRegistry;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.jms.Destination;
|
||||
|
@@ -26,7 +26,6 @@
|
||||
*/
|
||||
package org.alfresco.transform.base.transform;
|
||||
|
||||
import org.alfresco.transform.base.TransformEngine;
|
||||
import org.alfresco.transform.base.sfs.SharedFileStoreClient;
|
||||
import org.alfresco.transform.base.messaging.TransformReplySender;
|
||||
import org.alfresco.transform.base.model.FileRefResponse;
|
||||
@@ -36,7 +35,7 @@ import org.alfresco.transform.client.model.InternalContext;
|
||||
import org.alfresco.transform.client.model.TransformReply;
|
||||
import org.alfresco.transform.client.model.TransformRequest;
|
||||
import org.alfresco.transform.common.ExtensionService;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.common.TransformerDebug;
|
||||
import org.alfresco.transform.messages.TransformRequestValidator;
|
||||
import org.alfresco.transform.messages.TransformStack;
|
||||
@@ -64,7 +63,6 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -27,7 +27,7 @@
|
||||
package org.alfresco.transform.imagemagick;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.StringJoiner;
|
||||
|
@@ -30,7 +30,7 @@ import org.alfresco.transform.base.TransformManager;
|
||||
import org.alfresco.transform.base.executors.AbstractCommandExecutor;
|
||||
import org.alfresco.transform.base.executors.RuntimeExec;
|
||||
import org.alfresco.transform.base.util.CustomTransformerFileAdaptor;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.imagemagick.ImageMagickOptionsBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -31,7 +31,7 @@ import com.sun.star.task.ErrorCodeIOException;
|
||||
import org.alfresco.transform.base.TransformManager;
|
||||
import org.alfresco.transform.base.executors.JavaExecutor;
|
||||
import org.alfresco.transform.base.util.CustomTransformerFileAdaptor;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.pdmodel.PDDocument;
|
||||
import org.apache.pdfbox.pdmodel.PDPage;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -30,7 +30,7 @@ import org.alfresco.transform.base.TransformManager;
|
||||
import org.alfresco.transform.base.executors.AbstractCommandExecutor;
|
||||
import org.alfresco.transform.base.executors.RuntimeExec;
|
||||
import org.alfresco.transform.base.util.CustomTransformerFileAdaptor;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.pdfrenderer.PdfRendererOptionsBuilder;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<parent>
|
||||
<groupId>org.alfresco</groupId>
|
||||
<artifactId>alfresco-transform-core</artifactId>
|
||||
<version>3.0.0-HXP-A8-SNAPSHOT</version>
|
||||
<version>0.0.2-HXP-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
@@ -123,6 +123,10 @@ public class ExtensionService
|
||||
Map.entry(MIMETYPE_IMAGE_XWD, "xwd")
|
||||
);
|
||||
|
||||
protected ExtensionService()
|
||||
{
|
||||
}
|
||||
|
||||
public static String getExtensionForTargetMimetype(String targetMimetype, String sourceMimetype)
|
||||
{
|
||||
if (targetMimetype == null)
|
||||
|
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
package org.alfresco.transform.config.reader;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.config.TransformConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
@@ -19,7 +19,7 @@
|
||||
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
|
||||
* #L%
|
||||
*/
|
||||
package org.alfresco.transform.common;
|
||||
package org.alfresco.transform.exceptions;
|
||||
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
package org.alfresco.transform.registry;
|
||||
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.alfresco.transform.config.TransformOption;
|
||||
import org.alfresco.transform.config.TransformOptionGroup;
|
||||
import org.alfresco.transform.config.TransformOptionValue;
|
||||
|
@@ -654,10 +654,11 @@ public class CombinedTransformConfigTest
|
||||
config.addTransformConfig(transformConfig, READ_FROM_B, BASE_URL_B, registry);
|
||||
config.combineTransformerConfig(registry);
|
||||
|
||||
String expected = "No supported source and target mimetypes could be added to the transformer \"5\" as " +
|
||||
"intermediate steps should have a target mimetype. Read from readFromB";
|
||||
assertEquals(1, registry.errorMessages.size());
|
||||
assertEquals(expected, registry.errorMessages.get(0));
|
||||
assertEquals(2, registry.errorMessages.size());
|
||||
assertEquals("No supported source and target mimetypes could be added to the transformer \"5\" as " +
|
||||
"intermediate steps should have a target mimetype. Read from readFromB", registry.errorMessages.get(0));
|
||||
assertEquals("Transformer \"5\" has no supported source and target mimetypes, so will be ignored. "
|
||||
+ "Read from readFromB", registry.errorMessages.get(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -27,7 +27,7 @@
|
||||
package org.alfresco.transform.registry;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import org.alfresco.transform.common.TransformException;
|
||||
import org.alfresco.transform.exceptions.TransformException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
Reference in New Issue
Block a user