info.magnolia.dam.api
Interface AssetRendition


public interface AssetRendition

An AssetRendition is a "view" on a asset, for a specific MimeType. It can be a simple resize of an image, or a document conversion.

See Also:
AssetRenderer.render(Asset, com.google.common.net.MediaType, String), AssetProvider.getRendererFor(Asset, com.google.common.net.MediaType), AssetProviderRegistry.getRendererFor(Asset, com.google.common.net.MediaType)

Method Summary
 Asset getAsset()
          The Asset this rendition was created from.
 String getLink()
          Returns a link to the binary of this rendition; that is, a (partial) URL usable by client code to download the rendition.
 String getMimeType()
          The specific mime type of this rendition.
 String getRenditionName()
          The name of this specific rendition, if any, as passed to AssetRenderer.render(Asset, com.google.common.net.MediaType, String).
 InputStream getStream()
           
 

Method Detail

getLink

String getLink()
Returns a link to the binary of this rendition; that is, a (partial) URL usable by client code to download the rendition. Depending on the renderer, this could return a URL that is relative to the webapp (i.e no protocol, no hostname, but starts with a / and the context path), or an external URL including the protocol and host name. For some, this may mean generating a link to the imaging module, the DownloadServlet, or for some it might mean something else entirely. Note: some provider may decide (based on configuration, perhaps), to *not* include the context path.


getRenditionName

String getRenditionName()
The name of this specific rendition, if any, as passed to AssetRenderer.render(Asset, com.google.common.net.MediaType, String).


getMimeType

String getMimeType()
The specific mime type of this rendition.


getStream

InputStream getStream()

getAsset

Asset getAsset()
The Asset this rendition was created from.



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