A relatively unknown capability of CMIS 1.0 is Renditions. In the content management world, the term 'renditions' typically means a facility to generate and retrieve alternative representations of content or a document. CMIS formalizes only the retrieval of such alternative representations. Although this may seem limiting, it does standardize common use cases such as the preview of reduced fidelity representations (e.g a thumbnail), the discovery and retrieval of processed images and videos from a Digital Asset Management system, and the publishing of web compliant content from a Web Content Management system.
Alfresco has provided Renditions support since its inception, although it wasn't until the recently released v3.3 that we actually called them Renditions. More on that later. In fact, anyone who has used Alfresco Share has used the Rendition capabilities of Alfresco. It powers the Thumbnail and Web Preview features of the Document Library.
[caption id='attachment_177' align='alignnone' width='300' caption='Share Document Library Web Preview'][/caption]
Alfresco v3.3 also implements the CMIS 1.0 specification including support for CMIS Renditions. This means that all Renditions generated by Alfresco are accessible through the CMIS bindings in a standardized way.
Lets take a look at how to retrieve an Alfresco Share Document Library thumbnail through the CMIS AtomPub binding.
The response to the above HTTP GET request, which is the equivalent of issuing CMIS getObject(), includes additional information describing the 'cmis:thumbnail' rendition, the only rendition kind standardized by CMIS. A Repository may provide any number of other rendition kinds.
Each rendition is described as a link and additional meta data such as its mime type, size and dimensions. You may have noticed the 'renditionFilter' argument on the GET request. This controls which renditions, if any, are to be included in the response and is expressed as a rendition kind or mime type, or list of either.
It's good to know the nuts and bolts of the CMIS bindings, but it's not really ideal to work with them directly. They are protocols after all. Developers need APIs. Lets take a look at how to retrieve the same rendition via the Apache Chemistry OpenCMIS Java client API.
[caption id='attachment_182' align='alignnone' width='300' caption='Spring Surf and OpenCMIS view of Renditions'][/caption]
Now we've seen how to retrieve renditions in a standardized way, lets dig deeper into Alfresco's rendition capabilities. Alfresco v3.3 introduces a new Rendition service that combines the best of the existing Thumbnail and Transformation services with the existing WCM forms rendering capability, providing a consistent way to generate renditions from any content in the Alfresco repository. Of course, extensions may be plugged into the Rendition service to create any kind of rendition. Used in conjunction with Alfresco Rules, the rendition service provides the basis for many types of content management application including DAM and WCM.
Lets set up a rule to transform all images that are added to a folder in an Alfresco Share Document Library...
Each rendition definition that's exposed or created through the Rendition service is mapped to a CMIS rendition kind. Therefore, retrieving a rendition generated through the Alfresco Rendition Service is exactly the same as retrieving a Share document library thumbnail or web preview. Here's the CMIS AtomPub HTTP GET request:
Renditions were introduced into CMIS v1.0 quite late into its development where other features were postponed, but as you can see, the standardization of this capability allows for all kinds of use cases, in particular where a system requires integration with a DAM or WCM repository.