public class Scene7PresetRenditionPicker extends Object implements RenditionPicker
Constructor and Description |
---|
Scene7PresetRenditionPicker(String presetHandle) |
public Scene7PresetRenditionPicker(String presetHandle)
public Rendition getRendition(Asset asset)
RenditionPicker
Rendition
if existing, otherwise null
.
Implementations are free to decide which rendition is chosen when this method is called.
The rendition shall be searched for within the given Asset
.
Example implementation:
... public Resource getRendition(Asset asset) { // 1. try to get a web enabled rendition Listrenditions = asset.getRenditions(); for (Resource rendition: renditions) { if (Text.getName(rendition.getPath()).startsWith("cq5dam.web.")) { return rendition; } } // 2. return current rendition return asset.getCurrentOriginal(); } ...
getRendition
in interface RenditionPicker
asset
- The Asset
within which to search the rendition.null
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"