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

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

public class SimpleContentRewriter
extends AbstractContentRewriter<String>

SimpleContentRewriter

Version:
$Id: SimpleContentRewriter.java 24267 2010-10-11 09:09:56Z aschrijvers $

Field Summary
protected static String ATTR_END
           
protected static Pattern BODY_TAG_PATTERN
           
protected static String END_TAG
           
protected static String[] EXTERNALS
           
protected static String HREF_ATTR_NAME
           
protected static Pattern HTML_TAG_PATTERN
           
protected static String IMG_TAG
           
protected static String LINK_TAG
           
protected static String SRC_ATTR_NAME
           
 
Constructor Summary
SimpleContentRewriter()
           
 
Method Summary
protected  HstLink getBinaryLink(String path, javax.jcr.Node node, HstRequestContext requestContext, Mount targetMount)
           
protected  HstLink getDocumentLink(String path, javax.jcr.Node node, HstRequestContext requestContext, Mount targetMount)
           
protected  HstLink getLink(String path, javax.jcr.Node node, HstRequestContext reqContext, Mount targetMount)
           
protected  boolean isExternal(String path)
           
 String rewrite(String html, javax.jcr.Node node, HstRequestContext requestContext)
          Rewrites the content of the content node.
 String rewrite(String html, javax.jcr.Node node, HstRequestContext requestContext, Mount targetMount)
          Rewrites the content of the content node.
 String rewrite(String html, javax.jcr.Node node, HstRequestContext requestContext, String targetSiteAlias)
          Rewrites the content of the content node.
 
Methods inherited from class org.hippoecm.hst.content.rewriter.impl.AbstractContentRewriter
getImageVariant, isFullyQualifiedLinks, setFullyQualifiedLinks, setImageVariant
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTERNALS

protected static final String[] EXTERNALS

LINK_TAG

protected static final String LINK_TAG
See Also:
Constant Field Values

IMG_TAG

protected static final String IMG_TAG
See Also:
Constant Field Values

END_TAG

protected static final String END_TAG
See Also:
Constant Field Values

HREF_ATTR_NAME

protected static final String HREF_ATTR_NAME
See Also:
Constant Field Values

SRC_ATTR_NAME

protected static final String SRC_ATTR_NAME
See Also:
Constant Field Values

ATTR_END

protected static final String ATTR_END
See Also:
Constant Field Values

HTML_TAG_PATTERN

protected static final Pattern HTML_TAG_PATTERN

BODY_TAG_PATTERN

protected static final Pattern BODY_TAG_PATTERN
Constructor Detail

SimpleContentRewriter

public SimpleContentRewriter()
Method Detail

rewrite

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

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

rewrite

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

Specified by:
rewrite in interface ContentRewriter<String>
Overrides:
rewrite in class AbstractContentRewriter<String>
Returns:

rewrite

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

Specified by:
rewrite in interface ContentRewriter<String>
Overrides:
rewrite in class AbstractContentRewriter<String>
Returns:

getDocumentLink

protected HstLink getDocumentLink(String path,
                                  javax.jcr.Node node,
                                  HstRequestContext requestContext,
                                  Mount targetMount)

getBinaryLink

protected HstLink getBinaryLink(String path,
                                javax.jcr.Node node,
                                HstRequestContext requestContext,
                                Mount targetMount)

getLink

protected HstLink getLink(String path,
                          javax.jcr.Node node,
                          HstRequestContext reqContext,
                          Mount targetMount)

isExternal

protected boolean isExternal(String path)


Copyright © 2008-2012 Hippo. All Rights Reserved.