Renditions are a representation of source content in another form. A Rendition Definition (JSON) defines the transform option (parameter) values that will be passed to a transformer and the target Media Type.
{ "renditions": [ { "renditionName": "helloWorld", "targetMediaType": "text/html", "options": [ {"name": "language", "value": "German"} ] } ] }
- renditionName - A unique rendition name.
- targetMediaType - The target Media Type for the rendition.
- options - The list of transform option names and values corresponding to the transform options defined in T-Engine configuration. If you specify sourceNodeRef without a value, the system will automatically add the values at run time.
Just like Pipeline Definitions, custom Rendition Definitions need to be placed in a directory of the Repository. There are similar properties that control where and when these definitions are read and the same approach may be taken to get them into Docker Compose and Kubernetes environments.
rendition.config.dir=shared/classes/alfresco/extension/transform/renditions/
rendition.config.cronExpression=2 30 0/1 * * ? rendition.config.initialAndOnError.cronExpression=0 * * * * ?
In a Kubernetes environment:
kubectl create configmap custom-rendition-config --from-file=name_of_a_file.json
The necessary volumes are already provided out of the box and the files in ConfigMap custom-rendition-config will be mounted to /usr/local/tomcat/shared/classes/alfresco/extension/transform/renditions/. Again, the files will be picked up the next time the location is read, or when the repository pods are restarted.