HXENG-64 refactor ATS (#657)

Refactor to clean up packages in the t-model and to introduce a simpler to implement t-engine base.

The new t-engines (tika, imagemagick, libreoffice, pdfrenderer, misc, aio, aspose) and t-router may be used in combination with older components as the API between the content Repo and between components has not changed. As far as possible the same artifacts are created (the -boot projects no longer exist). They may be used with older ACS repo versions.

The main changes to look for are:
* The introduction of TransformEngine and CustomTransformer interfaces to be implemented.
* The removal in t-engines and t-router of the Controller, Application, test template page, Controller tests and application config, as this is all now done by the t-engine base package.
* The t-router now extends the t-engine base, which also reduced the amount of duplicate code.
* The t-engine base provides the test page, which includes drop downs of known transform options. The t-router is able to use pipeline and failover transformers. This was not possible to do previously as the router had no test UI.
* Resources including licenses are automatically included in the all-in-one t-engine, from the individual t-engines. They just need to be added as dependencies in the pom. 
* The ugly code in the all-in-one t-engine and misc t-engine to pick transformers has gone, as they are now just selected by the transformRegistry.
* The way t-engines respond to http or message queue transform requests has been combined (eliminates the similar but different code that existed before).
* The t-engine base now uses InputStream and OutputStream rather than Files by default. As a result it will be simpler to avoid writing content to a temporary location.
* A number of the Tika and Misc CustomTransforms no longer use Files.
* The original t-engine base still exists so customers can continue to create custom t-engines the way they have done previously. the project has just been moved into a folder called deprecated.
* The folder structure has changed. The long "alfresco-transform-..." names have given way to shorter easier to read and type names.
* The t-engine project structure now has a single project rather than two. 
* The previous config values still exist, but there are now a new set for config values for in files with names that don't misleadingly imply they only contain pipeline of routing information. 
* The concept of 'routing' has much less emphasis in class names as the code just uses the transformRegistry. 
* TransformerConfig may now be read as json or yaml. The restrictions about what could be specified in yaml has gone.
* T-engines and t-router may use transform config from files. Previously it was just the t-router.
* The POC code to do with graphs of possible routes has been removed.
* All master branch changes have been merged in.
* The concept of a single transform request which results in multiple responses (e.g. images from a video) has been added to the core processing of requests in the t-engine base.
* Many SonarCloud linter fixes.
This commit is contained in:
Alan Davis
2022-09-14 13:40:19 +01:00
committed by GitHub
parent ea83ef9ebc
commit babe26b0ba
652 changed files with 19479 additions and 18195 deletions

View File

@@ -3,28 +3,27 @@
Contains the common transformer (T-Engine) code, plus a few implementations.
> When upgrading to 3.0.0, you will find that a number of classes in the alfresco-transform-model
have moved. See the [alfresco-transform-model README](https://github.com/Alfresco/alfresco-transform-core/blob/master/model/README.md)
### Sub-projects
* `alfresco-transform-model` - library packaged as a jar file which contains the data model of json
* `model` - library packaged as a jar file which contains the data model of json
configuration files and messages sent between clients, T-Engines and T-Router. Also contains code to
work out which transform should be used for a combination of configuration files; see the sub-project's
[README](https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transform-model/README.md)
* `alfresco-transformer-base` - library packaged as a jar file which contains code that is common
to all the transformers; see the sub-project's
[README](https://github.com/Alfresco/alfresco-transform-core/blob/master/alfresco-transformer-base/README.md)
* `alfresco-transform-<name>` - multiple T-Engines; each one of them builds both a SpringBoot fat jar
and a [Docker image](https://github.com/Alfresco/alfresco-transform-core#docker)
to combine and then work out which transform to use for a combination of source and target mimetypes
and transform options.
* `engines/base` - contains code common to t-engines, packaged as a jar.
[README](https://github.com/Alfresco/alfresco-transform-core/blob/master/engines/base/README.md)
* `engines/<name>` - multiple T-Engines, which extend the `engines/base`; each one builds a SpringBoot jar
and a [Docker image](https://github.com/Alfresco/alfresco-transform-core#docker)
* `deprecated/alfresco-base-t-engine` - The original t-engine base, which may still be used,
but has been replaced by the simpler `engines/base`.
### Documentation
In addition to the subprojects (such as `alfresco-transformer-base` README above) some additional documentation can be found in:
* [this project's docs](docs) folder
* `docs` - provides additional documentation.
* [ACS Packaging docs](https://github.com/Alfresco/acs-packaging/tree/master/docs) folder
Note: if you're interested in the Alfresco Transform Service (ATS) that is part of the enterprise Alfresco Content Services (ACS) please see:
* https://docs.alfresco.com/transform/concepts/transformservice-overview.html
* If you're interested in the Alfresco Transform Service (ATS) see https://docs.alfresco.com/transform/concepts/transformservice-overview.html
### Building and testing
@@ -49,7 +48,7 @@ The artifacts can be obtained by:
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-transformer-base</artifactId>
<artifactId>alfresco-base-t-engine</artifactId>
<version>version</version>
</dependency>
```
@@ -67,7 +66,7 @@ The core T-Engine images are available on Docker Hub.
Either as a single Core AIO (All-In-One) T-Engine:
* [alfresco/alfresco-transform-core-aio](https://hub.docker.com/r/alfresco/alfresco-transform-core-aio)
Or as set of individual T-Engines:
Or as a set of individual T-Engines:
* [alfresco/alfresco-imagemagick](https://hub.docker.com/r/alfresco/alfresco-imagemagick)
* [alfresco/alfresco-pdf-renderer](https://hub.docker.com/r/alfresco/alfresco-pdf-renderer)
* [alfresco/alfresco-libreoffice](https://hub.docker.com/r/alfresco/alfresco-libreoffice)