Commit Graph

11 Commits

Author SHA1 Message Date
Alan Davis
d8b12e24ec REPO-5079,ATS-707: Use all-in-one T-Engine and fix tests (#943)
(cherry picked from commit 23690187cc)
2020-04-20 23:48:40 +01:00
alandavis
2af1a96211 REPO-4791 If possible, use Local transforms where Legacy transforms are called.
The objective of this PR is to replace all the ContentService calls related to transforms with calls to the SynchronousTransformClient that switches between Local and Legacy transforms. This will allow us to remove the Legacy transforms at some point and also take advantage of the T-Engines which can be scaled.

- Introduced a ContentTransformService interface to hold all the ContentService calls related to transforms and an implementation class ContentTransformServiceAdaptor as a super class of ContentServiceImpl. The Adaptor provides code to allow the SynchronousTransformClient to be called. As a result any external custom code that uses these methods will be able to take advantage of Local or Legacy transforms.
- The transform code originally in ContentServiceImpl has been moved to ContentTransformServiceImpl, which is a super class of the LegacySynchronousTransformClient.
- All calls in the repository have been replaced with calls to SynchronousTransformClient. There are still a few calls to these methods in ContentServiceImplTest and ArchiveContentTransformerTest that have not been changes as they test Legacy transform code.
- The asynchronous LocalTransformClient now uses the SynchronousTransformClient.
- Bug fix to the TransformationOptionsConverter as it was found that the page number being used for images was wrong. Legacy transformers start at page 1, where as Local and ImageMagick itself start at 0.
- Added a conversion to the new transform option (Map<String,String) in TransformationOptionsConverter, as some of the ContentTransformServiceAdaptor methods need to wrap a Local transformer in a Legacy transformer, so that it may be returned.
- A number of existing tests were passing because the wrong exception was being thrown. When the Local  transformer was used this became more obvious as the tests would fail.
- To avoid other test failing the Local Transform registry is loaded on start up rather than waiting for it to be scheduled, as a few milliseconds needed to read the config was till too large for the test to run and fail. A similar approach had been taken before with tests.
2019-11-29 22:13:43 +00:00
CezarLeahu
3225f63f94 REPO-4639 Content conversion failed using Tika (#587)
The Tika T-Engine was not being called by the Transform Service or Local transforms, because the sub-transform name was required.

Moved common classes (with repo) to alfresco-transform-model so that it can be used by the T-Engines to work out which sub transformer to use. InT also performed a refactor on these classes (alfresco-transform-model 1.0.2.7). Also includes changes to legacy transformers so that they don't pass the sub transformer name any more.
2019-09-12 21:49:17 +01:00
alandavis
bebd04f49e REPO-4329 Configure Custom Renditions (#537)
Break done of changes:
-    Removed rendition definition spring beans and created 0100-baseRenditions.json. Changes are picked up periodically by the running system.
-    Refactored TransformServiceRegistryImpl to extract ConfigFileFinder to reads json from resources, files or directories.
 -   Refactored TransformServiceRegistryImpl to extract ConfigScheduler to periodically reads config data.
 -   Used ConfigFileFinder and ConfigScheduler in RenditionDefinition2Impl to read rendition defs.
 -   Removed the need for a current 'Data' parameter to be passed to register methods when adding transforms or renditions.
 -   Changes in test classes of AbstractRenditionIntegrationTests to force the config to be read once before each test, as tests were sometimes not getting the correct config due to scheduling.
2019-08-02 17:46:33 +01:00
Alexandru-Eusebiu Epure
c25de05760 Feature/local transform (#495) 2019-06-26 16:01:09 +01:00
Alan Davis
e7549e5906 Reverting LocalTransformer work for the moment
Revert "Feature/repo 4331 encoding (#472)"
This reverts commit 0e5de8e774.
Revert "REPO-4319 Local Transformers (#313)"
This reverts commit 436ba847f6.
2019-06-06 06:57:38 +01:00
alandavis
436ba847f6 REPO-4319 Local Transformers (#313)
Creation of local transformers that don't depend on any of the legacy transformer code deprecated in ACS 6.1.  The previous local transformers are now referred to as legacy transformers.

The localTransformClient and localTransformServiceRegistry now are switches between these two classes of transform.
2019-05-31 22:06:47 +01:00
Alex Mukha
24db520ff5 Add Travis config (#302)
The tests were refactored to run Spring annotations instead of ApplicationContextHelper to mitigate the problems of Camel Context loading. The refactored tests are all part of AppContext06TestSuite.

Disabled PdfBoxContentTransformerTest as it requires installation of additional software on the build agent. The test is deprecated already.
2018-12-17 17:09:48 +00:00
alandavis
544e40ec54 REPO-4099 Change of mimetype to unsupported rendition hangs Share (#298)
An exception was being thrown if there was no supported rendition. In the case where a rendition already existed, RenditionService2 should have removed the content and hashcode on the rendition node and updated the source nodes thumbnailLastModified value. This is what happens if there is a transform failure when there is a rendition available. Also found that changing the mimetype nut not the content was not resulting in a new rendition as the hashcode did not include the mimetype.
2018-12-13 16:34:31 +00:00
alandavis
2b6c77b4c3 REPO-3944 Renditions: Disabling the local transform switch should not disable the transform server (#236)
Problems found in caches in the ThumbnailService caused this to take place. TransformerDebug has also been improved to include Transform Service requests and responses.
2018-10-26 11:57:23 +01:00
alandavis
e62aaa7165 REPO-3766 Renditions: Simplified Async Rendition Service 2018-09-25 17:59:57 +01:00