public interface RenderingManager extends RenderApi, WikiEventListener, InternalModule, Initializable
This class also manages a rendering cache, i.e. documents are stored between calls. You may control the cache by tweaking the ehcache-jspwiki.xml file.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PROP_BEAUTIFYTITLE |
static java.lang.String |
PROP_PARSER
markup parser property.
|
static java.lang.String |
PROP_RENDERER
default renderer property.
|
static java.lang.String |
PROP_WYSIWYG_RENDERER
default wysiwyg renderer property.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
beautifyTitle(java.lang.String title)
Beautifies the title of the page by appending spaces in suitable places, if the user has so decreed in the properties when
constructing this Engine.
|
java.lang.String |
beautifyTitleNoBreak(java.lang.String title)
Beautifies the title of the page by appending non-breaking spaces in suitable places.
|
java.lang.String |
getHTML(Context context,
Page page)
Returns the converted HTML of the page using a different context than the default context.
|
default java.lang.String |
getHTML(Context context,
java.lang.String pagedata)
Convenience method for rendering, using the default parser and renderer.
|
java.lang.String |
getHTML(Context context,
WikiDocument doc)
Simply renders a WikiDocument to a String.
|
default java.lang.String |
getHTML(java.lang.String page)
Returns the converted HTML of the page.
|
java.lang.String |
getHTML(java.lang.String pagename,
int version)
Returns the converted HTML of the page's specific version.
|
MarkupParser |
getParser(Context context,
java.lang.String pagedata)
Returns the wiki Parser
|
WikiDocument |
getRenderedDocument(Context context,
java.lang.String pagedata)
Returns a cached document, if one is found.
|
WikiRenderer |
getRenderer(Context context,
WikiDocument doc)
Returns a WikiRenderer instance, initialized with the given context and doc.
|
WikiRenderer |
getWysiwygRenderer(Context context,
WikiDocument doc)
Returns a WikiRenderer instance meant for WYSIWYG editing, initialized with the given
context and doc.
|
default java.lang.String |
textToHTML(Context context,
java.lang.String pagedata,
StringTransmutator localLinkHook,
StringTransmutator extLinkHook)
Just convert WikiText to HTML.
|
default java.lang.String |
textToHTML(Context context,
java.lang.String pagedata,
StringTransmutator localLinkHook,
StringTransmutator extLinkHook,
StringTransmutator attLinkHook)
Just convert WikiText to HTML.
|
java.lang.String |
textToHTML(Context context,
java.lang.String pagedata,
StringTransmutator localLinkHook,
StringTransmutator extLinkHook,
StringTransmutator attLinkHook,
boolean parseAccessRules,
boolean justParse)
Helper method for doing the HTML translation.
|
textToHTMLactionPerformedinitializestatic final java.lang.String PROP_PARSER
static final java.lang.String PROP_RENDERER
static final java.lang.String PROP_WYSIWYG_RENDERER
static final java.lang.String PROP_BEAUTIFYTITLE
java.lang.String beautifyTitle(java.lang.String title)
title - The title to beautifyjava.lang.String beautifyTitleNoBreak(java.lang.String title)
title - The title to beautifyMarkupParser getParser(Context context, java.lang.String pagedata)
pagedata - the page dataWikiDocument getRenderedDocument(Context context, java.lang.String pagedata)
context - the wiki contextpagedata - the page dataWikiRenderer getRenderer(Context context, WikiDocument doc)
context - The WikiContextdoc - The document to renderWikiRenderer getWysiwygRenderer(Context context, WikiDocument doc)
context - The WikiContextdoc - The document to renderjava.lang.String getHTML(Context context, WikiDocument doc) throws java.io.IOException
context - The WikiContext to render indoc - A proper WikiDocumentjava.io.IOException - If the WikiDocument is poorly formed.java.lang.String getHTML(Context context, Page page)
context - A WikiContext in which you wish to render this page in.page - WikiPage reference.java.lang.String getHTML(java.lang.String pagename, int version)
pagename - WikiName of the page to convert.version - Version number to fetchdefault java.lang.String getHTML(Context context, java.lang.String pagedata)
context - the wiki contextpagedata - the page datadefault java.lang.String getHTML(java.lang.String page)
page - WikiName of the page to convert.java.lang.String textToHTML(Context context, java.lang.String pagedata, StringTransmutator localLinkHook, StringTransmutator extLinkHook, StringTransmutator attLinkHook, boolean parseAccessRules, boolean justParse)
context - The WikiContext in which to do the conversionpagedata - The data to renderlocalLinkHook - Is called whenever a wiki link is foundextLinkHook - Is called whenever an external link is foundparseAccessRules - Parse the access rules if we encounter themjustParse - Just parses the pagedata, does not actually render. In this case, this methods an empty string.default java.lang.String textToHTML(Context context, java.lang.String pagedata, StringTransmutator localLinkHook, StringTransmutator extLinkHook)
context - The WikiContext in which to do the conversionpagedata - The data to renderlocalLinkHook - Is called whenever a wiki link is foundextLinkHook - Is called whenever an external link is founddefault java.lang.String textToHTML(Context context, java.lang.String pagedata, StringTransmutator localLinkHook, StringTransmutator extLinkHook, StringTransmutator attLinkHook)
context - The WikiContext in which to do the conversionpagedata - The data to renderlocalLinkHook - Is called whenever a wiki link is foundextLinkHook - Is called whenever an external link is foundattLinkHook - Is called whenever an attachment link is foundCopyright (c) 2001-2022 The Apache Software Foundation. All rights reserved.