cancel
Showing results for 
Search instead for 
Did you mean: 

When and how AddFailedThumbnailActionExecuter is executed?

alejandrogarcia
Champ in-the-making
Champ in-the-making
Hi all,

I'm trying to implement a customization such allows to identify whether the PDF thumbnail
cm:pdf
has been properly transformed and saved as child of a specific node.

Alfresco does something similar with the image thumbnails used in the document library, it is a child called 'cm:doclib'. If the transformation to generate such thumbnail fails, the
AddFailedThumbnailActionExecuter
flags the node with the
cm:failedThumbnailSource
aspect and the corresponding
cm:doclib
child with 'cm:failedThumbnail' type and association type.

To achieve what I need, I'd like to emulate this behaviour so in the moment that the transformation to PDF fails, automatically flag the
cm:pdf
node child with type
cm:failedThumbnail
. The problem is that I really cannot figure out when and under what circumstances the
AddFailedThumbnailActionExecuter
action kicks in and that's what I'd like to know.

I wonder if I'm trying to follow the right approach or rather try a different one.

By the way, also mention that I'm using the Media Viewers plugin in case this made any difference, but I don't so.

Thanks.
1 REPLY 1

mlagneaux
Champ on-the-rise
Champ on-the-rise
Hi,

cm:doclib node is the thumbnail that appears on documentlibrary and repository page. This node is created thanks to different transformation (for example, a .doc is transformed to PDF via OpenOffice and this PDF is transformed in image (by ImageMagick).
The cm:failedThumbnailSource is created when one of those convertions fails.

You can get Alfresco sources in alfresco-community-sdk-4.2.f.zip available on this page http://wiki.alfresco.com/wiki/Community_file_list_4.2.f.
You should search "add-failed-thumbnail" in Java files. That's the name of the action relying on AddFailedThumbnailActionExecuter class.

Hope this help.