Package io.wcm.handler.richtext
Class DefaultRewriteContentHandler
- java.lang.Object
-
- io.wcm.handler.richtext.DefaultRewriteContentHandler
-
- All Implemented Interfaces:
RewriteContentHandler
@Model(adaptables={org.apache.sling.api.SlingHttpServletRequest.class,org.apache.sling.api.resource.Resource.class}) public final class DefaultRewriteContentHandler extends java.lang.Object implements RewriteContentHandlerDefault implementation ofRewriteContentHandler.
-
-
Constructor Summary
Constructors Constructor Description DefaultRewriteContentHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<org.jdom2.Content>rewriteElement(@NotNull org.jdom2.Element element)Checks if the given element has to be rewritten.java.util.List<org.jdom2.Content>rewriteText(@NotNull org.jdom2.Text text)Checks if the given text node has to be rewritten.
-
-
-
Method Detail
-
rewriteElement
public java.util.List<org.jdom2.Content> rewriteElement(@NotNull @NotNull org.jdom2.Element element)Checks if the given element has to be rewritten. Is called for every child single element of the parent given to rewriteContent method.- Specified by:
rewriteElementin interfaceRewriteContentHandler- Parameters:
element- Element to check- Returns:
- null if nothing is to do with this element. Return empty list to remove this element. Return list with other content to replace element with new content.
-
rewriteText
public java.util.List<org.jdom2.Content> rewriteText(@NotNull @NotNull org.jdom2.Text text)Description copied from interface:RewriteContentHandlerChecks if the given text node has to be rewritten. Is called for every text node found as parent of given to rewriteContent method.- Specified by:
rewriteTextin interfaceRewriteContentHandler- Parameters:
text- Text node- Returns:
- null if nothing is to do with this element. Return empty list to remove the element. Return list with other content to replace element with new content.
-
-