info.magnolia.dam.api
Interface AssetRenderer


public interface AssetRenderer

An AssetRenderer provides AssetRenditions by bridging an Asset's data and some type of converter. AssetRenderers can be provided by AssetProviders when the conversion/translation can be managed by the AssetProvider itself (or its underlying system), or via a "global" registry. AssetProviderRegistry.getRendererFor(info.magnolia.dam.api.Asset, com.google.common.net.MediaType), provides the entry point (looks up in provider then in its own registry) bridges to other possible conversion mechanisms, independent of the Magnolia DAM.


Method Summary
 boolean canRender(Asset asset, com.google.common.net.MediaType to)
           
 AssetRendition render(Asset asset, com.google.common.net.MediaType to, String renditionName)
          Returns a AssetRendition of the given Asset in the given MediaType.
 boolean supports(com.google.common.net.MediaType from, com.google.common.net.MediaType to)
           
 

Method Detail

supports

boolean supports(com.google.common.net.MediaType from,
                 com.google.common.net.MediaType to)

canRender

boolean canRender(Asset asset,
                  com.google.common.net.MediaType to)

render

AssetRendition render(Asset asset,
                      com.google.common.net.MediaType to,
                      String renditionName)
Returns a AssetRendition of the given Asset in the given MediaType. The renditionName parameter should be used a hint for the renderer, but is up to the implementation to validate or ignore that name.



Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.