public class DefaultImageVariant extends Object implements ImageVariant
An image variant can hold information for a ContentRewriter
which image variant to use instead of the image variant
in the html content that the ContentRewriter
will rewrite.
Constructor and Description |
---|
DefaultImageVariant(String name,
List<String> replaces,
boolean fallback) |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
List<String> |
getReplaces()
Returns the List of variants that should be replaced with
ImageVariant.getName() and an EMPTY List if no explicit items for replaces are configured. |
boolean |
isFallback() |
public String getName()
getName
in interface ImageVariant
null
or blank (empty)public List<String> getReplaces()
ImageVariant
ImageVariant.getName()
and an EMPTY List if no explicit items for replaces are configured.
When all variants need to be replaced by default, this List can return EMPTY listgetReplaces
in interface ImageVariant
ImageVariant.getName()
and an EMPTY List if no explicit items for replaces are configuredpublic boolean isFallback()
isFallback
in interface ImageVariant
true
when the original variant should be shown when the variant for name
does not existCopyright © 2008–2016 Hippo B.V. (http://www.onehippo.com). All rights reserved.