A custom connector can be provided by implementing PromenaTransformationExecutor
and registering it as a bean.
The typical flow that a connector should implement:
- Validate
postTransformationExecutor
[PostTransformationExecutorValidator
,SerializationPostTransformationExecutorValidator
implementation,serializationPostTransformationExecutorValidator
bean name] - Check if the nodes from
nodeDescriptor
have been modified in the current transaction [NodeInCurrentTransactionVerifier
,DefaultNodeInCurrentTransactionVerifier
implementation,defaultNodeInCurrentTransactionVerifier
bean name] - Generate a checksum of
nodeDescriptor
[NodesChecksumGenerator
,RenditionContentNodesChecksumGenerator
implementation,renditionContentNodesChecksumGenerator
bean name] - Convert
nodeDescriptor
toDataDescriptor
[DataDescriptorGetter
,ContentPropertyDataDescriptorGetter
implementation,contentPropertyDataDescriptorGetter
bean name] - Start a new transformation execution [
PromenaMutableTransformationManager
,MemoryWithAlfrescoPersistencePromenaMutableTransformationManager
implementation,memoryWithAlfrescoPersistencePromenaMutableTransformationManager
bean name] - Add
PROPERTY_EXECUTION_IDS
to the nodes fromnodeDescriptor
- Perform the transaction asynchronously
- Return
TransformationExecution
from step 6
The flow of an asynchronous transaction execution:
- Perform the transformation on Promena depending on the connector - your task
- Verify if the nodes from
nodeDescriptor
still exist [NodesExistenceVerifier
,DefaultNodesExistenceVerifier
implementation,defaultNodesExistenceVerifier
bean name] - Check if the checksum of the nodes from
nodeDescriptor
haven't changed [NodesChecksumGenerator
,RenditionContentNodesChecksumGenerator
implementation,renditionContentNodesChecksumGenerator
bean name] - Save the results of the transformation execution [
TransformedDataDescriptorSaver
,MinimalRenditionTransformedDataDescriptorSaver
implementation,minimalRenditionTransformedDataDescriptorSaver
bean name] - Inject dependencies into
postTransformationExecutor
and run it if set [PostTransformationExecutorInjector
,ReflectionPostTransformationExecutorInjector
implementation,reflectionPostTransformationExecutorInjector
bean name] - Clean data [
DataCleaner
,DefaultDataCleaner
implementation,defaultDataCleaner
bean name] - Complete the transformation execution with the result [
PromenaMutableTransformationManager
,MemoryWithAlfrescoPersistencePromenaMutableTransformationManager
implementation,memoryWithAlfrescoPersistencePromenaMutableTransformationManager
bean name] - In case of an error, another execution is run until the number of
Retry.maxAttempts
is reached. If the number is reached, it completes the transformation execution with an exception [PromenaMutableTransformationManager
,MemoryWithAlfrescoPersistencePromenaMutableTransformationManager
implementation,memoryWithAlfrescoPersistencePromenaMutableTransformationManager
bean name]
HttpPromenaTransformationExecutor
ActiveMQPromenaTransformationExecutor
[TransformerSender
,TransformerResponseConsumer
,TransformerResponseErrorConsumer
]
A custom metadata saver can be provided by implementing PromenaTransformationMetadataSaver
and registering as a bean.
All registered metadata savers are executed after saving the results of a transformation execution.
A custom rendition definition can be provided by implementing PromenaRenditionDefinition
and registering it as a bean.
It is the equivalent of ThumbnailDefinition
in Promena environment.
Avatar32PromenaRenditionDefinition
AvatarPromenaRenditionDefinition
ImgPreviewPromenaRenditionDefinition
DocLibPromenaRenditionDefinition
MediumPromenaRenditionDefinition
PdfPromenaRenditionDefinition
A custom content transformer definition can be provided by implementing PromenaContentTransformerDefinition
and registering it as a bean.
It provides the equivalent to Alfresco Content Transformer in Promena environment and it is used by ContentTransformerRegistry to perform a transformation (visit Content Transformers (and Renditions) for more details).