Interface ContentRewriter<T>


  • public interface ContentRewriter<T>
    ContentRewriter to rewrite document content such as links.
    Version:
    $Id$
    • Method Detail

      • rewrite

        T rewrite​(T content,
                  javax.jcr.Node contentNode,
                  HstRequestContext requestContext)
        Rewrites the content for Node contentNode.
        Parameters:
        content - content object. It can be type of String or whatever, depending on the implementation and the context.
        contentNode - the Node that contains the content
        requestContext - the HstRequestContext
        Returns:
        the rewritten content T
      • 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 -
      • 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 -
      • 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
      • setCanonicalLinks

        void setCanonicalLinks​(boolean canonicalLinks)
        Parameters:
        canonicalLinks - when true this ContentRewriter will return canonical links for internal links
      • isCanonicalLinks

        boolean isCanonicalLinks()
        Returns:
        true when canonical links should be created for internal links
      • setImageVariant

        void setImageVariant​(ImageVariant imageVariant)
        Sets whether this ContentRewriter should use an imageVariant.
        Parameters:
        imageVariant -