Package io.wcm.handler.richtext
Interface RichTextBuilder
-
@ProviderType public interface RichTextBuilder
Define rich text handling request using builder pattern.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull RichText
build()
Build formatted markup and return metadata object containing results.@NotNull java.util.Collection<org.jdom2.Content>
buildContent()
Build formatted markup as DOM elements.@Nullable java.lang.String
buildMarkup()
Build formatted markup string.@NotNull RichTextBuilder
mediaArgs(@Nullable io.wcm.handler.media.MediaArgs mediaArgs)
Set media arguments to be applied when resolving inline images.@NotNull RichTextBuilder
textMode(@Nullable TextMode textMode)
Set in which text mode the raw text should be interpreded.@NotNull RichTextBuilder
urlMode(@Nullable io.wcm.handler.url.UrlMode urlMode)
Set URL mode to be applied for building URLs for inline links and inline images.
-
-
-
Method Detail
-
textMode
@NotNull @NotNull RichTextBuilder textMode(@Nullable @Nullable TextMode textMode)
Set in which text mode the raw text should be interpreded.- Parameters:
textMode
- Text mode- Returns:
- Rich text builder
-
mediaArgs
@NotNull @NotNull RichTextBuilder mediaArgs(@Nullable @Nullable io.wcm.handler.media.MediaArgs mediaArgs)
Set media arguments to be applied when resolving inline images.- Parameters:
mediaArgs
- Media arguments- Returns:
- Rich text builder
-
urlMode
@NotNull @NotNull RichTextBuilder urlMode(@Nullable @Nullable io.wcm.handler.url.UrlMode urlMode)
Set URL mode to be applied for building URLs for inline links and inline images.- Parameters:
urlMode
- URL mode- Returns:
- Rich text builder
-
build
@NotNull @NotNull RichText build()
Build formatted markup and return metadata object containing results.- Returns:
- Rich text metadata. Never null, if the resolving failed the isValid() method returns false.
-
buildMarkup
@Nullable @Nullable java.lang.String buildMarkup()
Build formatted markup string.- Returns:
- Formatted markup string or null if invalid or empty.
-
buildContent
@NotNull @NotNull java.util.Collection<org.jdom2.Content> buildContent()
Build formatted markup as DOM elements.- Returns:
- DOM elements or empty collection if invalid or empty.
-
-