- Re factored TransformerDebug so the Legacy transform code has been extracted into
LegacyTransformerDebug and code used by the Admin console's Test Transform that is
not being deprecated has been extracted into AdminUiTransformerDebug
- Removed a few tests for a method that no longer supports specifying a transform name.
- All other changes are to handle the fact that the transformerDebug bean is now a
LegacyTransformerDebug class and methods have been moved to sub classes.
Although TransformerDebug appears to have had major changes in this PR, these are limited to just splitting the class into three. In doing so some of the methods are no longer private but now protected. The idea is that at some point we will be able to simply remove LegacyTransformerDebug which has references to Legacy transformer classes.
- The addition of support for reactive transactions in TransactionInterceptor in Spring 5.2 changed the return type of some methods in TransactionAspectSupport
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.