mirror of
https://github.com/Alfresco/alfresco-transform-core.git
synced 2025-08-07 17:48:35 +00:00
ATS-675:Add All-In-One transformer (#200)
* ATS-695/ATS-675 Add aio boot project
- Added the bare bones of a spring boot project to be used by aio. Currently based loosely on transform-misc.
* ATS-674/ATS-695 Add forms for each transformer.
* ATS-675/ATS-695 add empty test to pass build during dev
* ATS-695 remove maven profile to fix build
* ATS-675 Define interface and the aio transformer
* Fix formatting and rename the module as per review comments
* ATS-675/ATS-695 Add ProbeTestTransformation
Currenly uses MiscController implementation.
* ATS-675/ATS-695 Add logger method,
This will be code repeated in the local transform method and the processTransform method
* ATS-675/ATS-695 Implement local transform method
Minimum implementation for transform method.
* ATS-675/ATS-695 Implement processTransform
* ATS-675/ATS-695 Rename project to alfresco-transform-core-aio-boot
Add alfresco-transform-core-aio dependencies
* ATS-675/ATS-695 Fix build
Update project location
Update imports and variable declarations in TODOs
Add error handling.
Formatting.
* ATS-693: Update transform-misc Dockerfile with newly reserved uid
* Revert "ATS-691: Combine the win/linux pathToFile logic"
This reverts commit 61fe4820
* ATS-693: Update transform-misc Dockerfile with newly reserved uid
* "ATS-693: Add Dockerfile to aio-boot module"
* ATS-675/ATS-695 Add resource required for ProbeTestTrasform
* ATS-675/ATS-695 Remove test resources, to be added in test implementation
* ATS-693: Fix path to jar resources
* ATS-675/ATS-703 Moved Options builder to non boot jar.
* ATS-675/ATS-703 Rename OptionsBuilder to PdfRendererOptionsBuilder
This is to avoid confilct with OptionsBuilders in other T-engines.
* ATS-675/ATS-695 Added PdfRendererApadpter.java
Added dependency to pom.xml
Required transformation of String to Long, method added to Util.java
* ATS-675/ ATS-704
Implemented LibreOfficeAdapter
* ATS-675 Parity with base aio naming convention
* ATS-675/ATS-705 Implemented ImageMagickAdapter
Moved and renamed OptionsBuilder. Moved to alfresco-transform-imagemagick, renamed ImageMagickOptionsBuilder.
Added dependencies to pom.xml
* ATS-693: Implement maven docker build
* Initial tests
* Add initial tests for config aggregation
* Update AbstractTransformerControllerTest to use the new engine config names
* Fix up controller
* Fix travis tests (#205)
* Fix engine specific properties for engine config location
* Temporarily add engine configs to test resources for the boot modules. Will need to fix this properly
* Resolve some review comments
* ATS-675 - Move static strings to util class
* Refactor classes for simpler design (#210)
* ATS-702 Fix error handling
(cherry picked from commit e30cb5fda6
)
* ATS-675 Rename test class (fixes typo)
* ATS-675: Add aio transformer to static scan
This commit is contained in:
@@ -9,7 +9,7 @@ ENV JAVA_OPTS=""
|
||||
ARG GROUPNAME=Alfresco
|
||||
ARG GROUPID=1000
|
||||
ARG MISCUSERNAME=transform-misc
|
||||
ARG USERID=33004
|
||||
ARG USERID=33006
|
||||
|
||||
COPY target/${env.project_artifactId}-${env.project_version}.jar /usr/bin
|
||||
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-transform-misc-boot</artifactId>
|
||||
<name>Alfresco Docker Miscellaneous Transformers</name>
|
||||
<name>Alfresco Miscellaneous Transformer Spring Boot</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
|
@@ -1,2 +1,5 @@
|
||||
queue:
|
||||
engineRequestQueue: ${TRANSFORM_ENGINE_REQUEST_QUEUE:org.alfresco.transform.engine.misc.acs}
|
||||
engineRequestQueue: ${TRANSFORM_ENGINE_REQUEST_QUEUE:org.alfresco.transform.engine.misc.acs}
|
||||
transform:
|
||||
config:
|
||||
location: classpath:misc_engine_config.json
|
@@ -71,6 +71,8 @@ public class MiscControllerTest extends AbstractTransformerControllerTest
|
||||
private final String targetEncoding = "UTF-8";
|
||||
private final String targetMimetype = MIMETYPE_TEXT_PLAIN;
|
||||
|
||||
private static final String ENGINE_CONFIG_NAME = "misc_engine_config.json";
|
||||
|
||||
@Before
|
||||
public void before() throws Exception
|
||||
{
|
||||
@@ -86,6 +88,12 @@ public class MiscControllerTest extends AbstractTransformerControllerTest
|
||||
expectedSourceFileBytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEngineConfigName()
|
||||
{
|
||||
return ENGINE_CONFIG_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mockTransformCommand(String sourceExtension, String targetExtension,
|
||||
String sourceMimetype, boolean readTargetFileBytes)
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>alfresco-transform-misc</artifactId>
|
||||
<name>Alfresco Miscellaneous Transformers</name>
|
||||
<name>Alfresco Miscellaneous Transformer</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
|
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"transformOptions": {
|
||||
"textToPdfOptions": [
|
||||
{"value": {"name": "pageLimit"}},
|
||||
{"value": {"name": "sourceEncoding"}}
|
||||
],
|
||||
"stringOptions": [
|
||||
{"value": {"name": "sourceEncoding"}},
|
||||
{"value": {"name": "targetEncoding"}}
|
||||
],
|
||||
"htmlOptions": [
|
||||
{"value": {"name": "sourceEncoding"}}
|
||||
]
|
||||
},
|
||||
"transformers": [
|
||||
{
|
||||
"transformerName": "html",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "text/html", "targetMediaType": "text/plain"}
|
||||
],
|
||||
"transformOptions": [
|
||||
"htmlOptions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"transformerName": "string",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "text/plain", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/mediawiki", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/css", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/csv", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/xml", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/html", "priority": 55, "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/richtext", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/sgml", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/tab-separated-values", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/x-setext", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/x-java-source", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/x-jsp", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/x-markdown", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "text/calendar", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "application/x-javascript", "targetMediaType": "text/plain"},
|
||||
{"sourceMediaType": "application/dita+xml", "targetMediaType": "text/plain"}
|
||||
],
|
||||
"transformOptions": [
|
||||
"stringOptions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"transformerName": "appleIWorks",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "application/vnd.apple.keynote", "targetMediaType": "image/jpeg"},
|
||||
{"sourceMediaType": "application/vnd.apple.numbers", "targetMediaType": "image/jpeg"},
|
||||
{"sourceMediaType": "application/vnd.apple.pages", "targetMediaType": "image/jpeg"}
|
||||
],
|
||||
"transformOptions": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"transformerName": "textToPdf",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "text/plain", "priority": 55, "targetMediaType": "application/pdf"},
|
||||
{"sourceMediaType": "text/csv", "targetMediaType": "application/pdf"},
|
||||
{"sourceMediaType": "application/dita+xml", "targetMediaType": "application/pdf"},
|
||||
{"sourceMediaType": "text/xml", "targetMediaType": "application/pdf"}
|
||||
],
|
||||
"transformOptions": [
|
||||
"textToPdfOptions"
|
||||
]
|
||||
},
|
||||
{
|
||||
"transformerName": "rfc822",
|
||||
"supportedSourceAndTargetList": [
|
||||
{"sourceMediaType": "message/rfc822", "targetMediaType": "text/plain"}
|
||||
],
|
||||
"transformOptions": [
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user