[ALF-13254] TransformationOptions Should Have Separate Source Options Created: 14-May-09  Updated: 29-Oct-13  Resolved: 31-Jan-13

Status: Closed
Project: Alfresco
Component/s: Repository, Transformations
Affects Version/s: None
Fix Version/s: 4.2.d Community
Security Level: external (External user)

Type: Improvement Priority: Major
Reporter: Ray Gauss II (Inactive) Assignee: Closed Issues
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 1 day
Time Spent: Not Specified
Original Estimate: 1 day

Attachments: Zip Archive alfresco-transform-additions.zip    
Issue Links:
Depends on ALF-16201 TransformationOptions Should Be More ... Closed
is related to by ALF-19101 Typo in TransformationSourceOptions m... Closed
is related to by ALF-17766 ImageCropOptions Should be Refactored... Closed
Date of First Response:


TransformationOptions should have separate options which apply to the source and target of the transformation.

For example, suppose a user needs to grab 1 frame of video 35 seconds into a clip and transform that into a 100x75 png image for a thumbnail.

The final size of 100x75 only applies to the target of the transformation and would probably correspond to an already defined TransformationOptions in use for other types of source content, like the 'doclib' ThumbnailDefinition.

The timecode offset of 35 seconds only applies to the source of the transformation and may need to be specified by the user differently for each source content node, certainly 35 seconds wouldn't work for all videos.

Separating the source and target portions of the TransformationOptions would have several advantages.

Options like the target 'doclib' definition could be reused in other beans which would make tasks like changing the output size of the 'doclib' definition much easier for admins as it would only need to be changed in one spot.

Likewise options that only applied to the source of the transformation could be reused. For instance an admin could setup TransformationOptions that always pulled the 2nd page of a PDF document with multiple target output sizes and only have to specify the 'page' value of 2 in a single spot. This also allows for easier creation of things like actions that allow the user to specify a value for the page parameter.

The suggested and implementation extends the TransformationOptions class to contain a TransformationTargetOptions object and a collection of TransformationSourceOptions objects. This allows transformation options to accommodate multiple source mimetypes in a single object, for example:


_ List< TransformationSourceOptions>
_ TransformationSourceOptions (grab the 2nd page of PDFs)
_ TransformationSourceOptions (grab 5 seconds into video clips)
_ TransformationTargetOptions (output 100px png)

Classes implementing the TransformationSourceOptions interface can define the relevant options: offset for video, page number for paged documents, etc.

Some of the attached code is only necessary to be compatible with the current implementation and could be removed with a few changes to the existing Alfresco code it extends, which should be explained in the javadoc.

I hope I've explained this sufficiently. If there are any questions please don't hesitate to contact me.


Comment by Ray Gauss [X] (Inactive) [ 31-Jan-13 ]

A collection of TransformationSourceOptions was added to TransformationOptions.

PagedSourceOptions and TemporalSourceOptions implementations of TransformationSourceOptions were added.

The ImageMagick content transformer, ThumbnailRenditionConverter, and AbstractTransformationRenderingEngine were updated to use source options and their serializers.

TransformationTargetOptions as described in the description were not implemented at this time. The target options are still defined directly on the TransformationOptions object.

Generated at Sat Aug 15 21:44:23 BST 2020 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.