- SourceEncoding should not be used to select transforms.
- Removed the targetEncoding too as it is just the default value in the LocalTransform case and never supplied in the ATS call.
- Use T-Engine 2.2.2 which is compatible with this change
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.
* REPO-4698 Add asynchronous transform method to RenditionService2
* remove extra method transformXX
* Remove extra tmp code
* comment update
* Added tests to RenditionService2Test for transform
* sync client for Solr api (#646)
* Added SynchronousTransformClient so both local and legacy transforms can be used in deprecated code like the V0 Solr rest api
* Refactor TransformClients so they look similar
* Added SynchronousTransformClient so both local and legacy transforms can be used in deprecated code like the V0 Solr rest api
* Refactor TransformClients so they look similar
* Undo trial removal of disable transform registry in a test class
transform method needs to access the selected transform in the same Thread.
* Switching should check return value rather than for an exception.
* remove extra code that does nothing from test.
* Use contentService.transform(reader, writer, options) to allow for failover to a lower priority legacy transform
* Add tests for SynchronousTransformClients
* Added TransformRequest model, TransformRequestConsumer, TransformRequestProcessor
* Added StubTransformReplyProvider to implement TransformReplyProvider.
* Admin Console 'Support' Transform Test operations broken
* Switched over to using synchronousTransformClient as the error was on the reply from the ATS as it did not know what to do with the rendition as the test source node was deleted by that time. Not really that much of a bug after all. Fixed anyway.
* Admin Console 'Support' Transform Test operations broken
Consistent use of synchronousTransformClient rather than transformClient sometimes
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.