org.hippoecm.hst.content.rewriter.impl
Class DefaultImageVariant

java.lang.Object
  extended by org.hippoecm.hst.content.rewriter.impl.DefaultImageVariant
All Implemented Interfaces:
ImageVariant

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 Summary
DefaultImageVariant(String name, List<String> replaces, boolean fallback)
           
 
Method Summary
 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultImageVariant

public DefaultImageVariant(String name,
                           List<String> replaces,
                           boolean fallback)
Method Detail

getName

public String getName()
Specified by:
getName in interface ImageVariant
Returns:
the variant name to use. This value is never null or blank (empty)

getReplaces

public List<String> getReplaces()
Description copied from interface: ImageVariant
Returns the List of variants that should be replaced with 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 list

Specified by:
getReplaces in interface ImageVariant
Returns:
the List of variants that should be replaced with ImageVariant.getName() and an EMPTY List if no explicit items for replaces are configured

isFallback

public boolean isFallback()
Specified by:
isFallback in interface ImageVariant
Returns:
true when the original variant should be shown when the variant for name does not exist


Copyright © 2008-2012 Hippo. All Rights Reserved.