@ProviderType public class RenditionPatternPicker extends Object implements com.day.cq.dam.api.RenditionPicker
Constructor and Description |
---|
RenditionPatternPicker(Pattern pattern)
Create an Asset Rendition Picker that will pick a Rendition by matching
the supplied Regex pattern.
|
RenditionPatternPicker(String pattern)
Create an Asset Rendition Picker that will pick a Rendition by matching
the supplied Regex pattern (as String).
|
Modifier and Type | Method and Description |
---|---|
com.day.cq.dam.api.Rendition |
getRendition(com.day.cq.dam.api.Asset asset)
Gets the rendition which matches against the constructor's Regex pattern.
|
public RenditionPatternPicker(String pattern)
pattern
- Regex pattern to match against Rendition names.public RenditionPatternPicker(Pattern pattern)
pattern
- Pattern used to find the Asset renditionpublic final com.day.cq.dam.api.Rendition getRendition(com.day.cq.dam.api.Asset asset)
If no matches are made and an Original exists, returns the Original.
If no matches are made and an Original doesn't exist, return the first Rendition.
getRendition
in interface com.day.cq.dam.api.RenditionPicker
asset
- Asset whose Renditions will be selected.Copyright © 2013–2021 Adobe. All rights reserved.