org.hippoecm.hst.content.rewriter
Interface ContentRewriter<T>

All Known Implementing Classes:
AbstractContentRewriter, SimpleContentRewriter

public interface ContentRewriter<T>

ContentRewriter to rewrite document content such as links.

Version:
$Id: ContentRewriter.java 34793 2012-06-25 18:48:37Z aschrijvers $

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.
 

Method Detail

rewrite

T rewrite(T content,
          javax.jcr.Node contentNode,
          HstRequestContext requestContext)
Rewrites the content of the content node.

Parameters:
content - content object. It can be type of String or whatever, depending on the implementation and the context.
contentNode - content node
requestContext -
Returns:

rewrite

T rewrite(T content,
          javax.jcr.Node contentNode,
          HstRequestContext requestContext,
          String targetMountAlias)
Rewrites the content of the content node.

Parameters:
content -
contentNode -
requestContext -
targetMountAlias -
Returns:

rewrite

T rewrite(T content,
          javax.jcr.Node contentNode,
          HstRequestContext requestContext,
          Mount targetMount)
Rewrites the content of the content node.

Parameters:
content -
contentNode -
requestContext -
targetMount -
Returns:

setFullyQualifiedLinks

void setFullyQualifiedLinks(boolean fullyQualifiedLinks)
Sets whether this ContentRewriter should create fully qualified links (URLs) for internal links.

Parameters:
fullyQualifiedLinks -

isFullyQualifiedLinks

boolean isFullyQualifiedLinks()
Returns:
true when fully qualified links (URLs) should be created

setImageVariant

void setImageVariant(ImageVariant imageVariant)
Sets whether this ContentRewriter should use an imageVariant.

Parameters:
imageVariant -

getImageVariant

ImageVariant getImageVariant()
Returns:
an ImageVariant when there was set one through setImageVariant(ImageVariant) or null when no image variant was set


Copyright © 2008-2012 Hippo. All Rights Reserved.