public interface ContentRewriter<T>
Modifier and Type | Method and Description |
---|---|
ImageVariant |
getImageVariant() |
boolean |
isCanonicalLinks() |
boolean |
isFullyQualifiedLinks() |
T |
rewrite(T content,
HstRequestContext requestContext)
Rewrites the
content with HstRequestContext . |
T |
rewrite(T content,
javax.jcr.Node contentNode,
HstRequestContext requestContext)
Rewrites the
content for Node contentNode . |
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 |
setCanonicalLinks(boolean canonicalLinks) |
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. |
T rewrite(T content, HstRequestContext requestContext)
content
with HstRequestContext
. Since there is no contentNode
param as is for rewrite(Object, javax.jcr.Node, org.hippoecm.hst.core.request.HstRequestContext)
this
method typically cannot translate internal links in the content
T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext)
content
for Node
contentNode
.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
T
T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext, String targetMountAlias)
content
- contentNode
- requestContext
- targetMountAlias
- T rewrite(T content, javax.jcr.Node contentNode, HstRequestContext requestContext, Mount targetMount)
content
- contentNode
- requestContext
- targetMount
- void setFullyQualifiedLinks(boolean fullyQualifiedLinks)
ContentRewriter
should create fully qualified links (URLs) for internal links.fullyQualifiedLinks
- boolean isFullyQualifiedLinks()
true
when fully qualified links (URLs) should be createdvoid setCanonicalLinks(boolean canonicalLinks)
canonicalLinks
- when true
this ContentRewriter
will return canonical links for internal linksboolean isCanonicalLinks()
true
when canonical links should be created for internal linksvoid setImageVariant(ImageVariant imageVariant)
ContentRewriter
should use an imageVariant.imageVariant
- ImageVariant getImageVariant()
setImageVariant(ImageVariant)
or null
when
no image variant was setCopyright © 2008–2017 Hippo B.V. (http://www.onehippo.com). All rights reserved.