org.hippoecm.hst.content.rewriter.impl
Class AbstractContentRewriter<T>

java.lang.Object
  extended by org.hippoecm.hst.content.rewriter.impl.AbstractContentRewriter<T>
All Implemented Interfaces:
ContentRewriter<T>
Direct Known Subclasses:
SimpleContentRewriter

public abstract class AbstractContentRewriter<T>
extends Object
implements ContentRewriter<T>

AbstractContentRewriter

An abstract adapter class for ContentRewriter. The methods in this class are empty. This class exists as convenience for creating ContentRewriter objects.

Version:
$Id$

Constructor Summary
AbstractContentRewriter()
           
 
Method Summary
 ImageVariant getImageVariant()
           
 boolean isFullyQualifiedLinks()
           
 T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext)
          Rewrites the content of the content node.
 T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext, Mount targetMount)
          Rewrites the content of the content node.
 T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext, String targetMountAlias)
          Rewrites the content of the content node.
 void setFullyQualifiedLinks(boolean fullyQualifiedLinks)
          Sets whether this ContentRewriter should create fully qualified links (URLs) for internal links.
 void setImageVariant(ImageVariant imageVariant)
          Sets whether this ContentRewriter should use an imageVariant.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractContentRewriter

public AbstractContentRewriter()
Method Detail

rewrite

public T rewrite(T content,
                 javax.jcr.Node contentNode,
                 HstRequestContext requestContext)
Description copied from interface: ContentRewriter
Rewrites the content of the content node.

Specified by:
rewrite in interface ContentRewriter<T>
Parameters:
content - content object. It can be type of String or whatever, depending on the implementation and the context.
contentNode - content node
Returns:

rewrite

public T rewrite(T content,
                 javax.jcr.Node contentNode,
                 HstRequestContext requestContext,
                 String targetMountAlias)
Description copied from interface: ContentRewriter
Rewrites the content of the content node.

Specified by:
rewrite in interface ContentRewriter<T>
Returns:

rewrite

public T rewrite(T content,
                 javax.jcr.Node contentNode,
                 HstRequestContext requestContext,
                 Mount targetMount)
Description copied from interface: ContentRewriter
Rewrites the content of the content node.

Specified by:
rewrite in interface ContentRewriter<T>
Returns:

isFullyQualifiedLinks

public boolean isFullyQualifiedLinks()
Specified by:
isFullyQualifiedLinks in interface ContentRewriter<T>
Returns:
true when fully qualified links (URLs) should be created

setFullyQualifiedLinks

public void setFullyQualifiedLinks(boolean fullyQualifiedLinks)
Description copied from interface: ContentRewriter
Sets whether this ContentRewriter should create fully qualified links (URLs) for internal links.

Specified by:
setFullyQualifiedLinks in interface ContentRewriter<T>

setImageVariant

public void setImageVariant(ImageVariant imageVariant)
Description copied from interface: ContentRewriter
Sets whether this ContentRewriter should use an imageVariant.

Specified by:
setImageVariant in interface ContentRewriter<T>

getImageVariant

public ImageVariant getImageVariant()
Specified by:
getImageVariant in interface ContentRewriter<T>
Returns:
an ImageVariant when there was set one through ContentRewriter.setImageVariant(ImageVariant) or null when no image variant was set


Copyright © 2008-2012 Hippo. All Rights Reserved.