[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:
alandavis
2022-09-12 17:09:11 +01:00
parent 7ca8a483ad
commit 7f2e76e33c
42 changed files with 116 additions and 45 deletions

View File

@@ -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>

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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;