|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wiki.render.RenderingManager
public class RenderingManager

This class provides a facade towards the differing rendering routines. You should use the routines in this manager instead of the ones in WikiEngine, if you don't want the different side effects to occur - such as WikiFilters.
This class also manages a rendering cache, i.e. documents are stored between calls. You may control the cache by tweaking the ehcache.xml file.
| Field Summary | |
|---|---|
static String |
DEFAULT_RENDERER
The name of the default renderer. |
static String |
DOCUMENTCACHE_NAME
Name of the regular page cache. |
static String |
VAR_EXECUTE_PLUGINS
Variable name which tells whether plugins should be executed or not. |
static String |
WYSIWYG_EDITOR_MODE
Name of the WikiContext variable which is set to Boolean.TRUE or Boolean.FALSE depending on whether WYSIWYG is currently in effect. |
| Constructor Summary | |
|---|---|
RenderingManager()
|
|
| Method Summary | |
|---|---|
void |
actionPerformed(WikiEvent event)
Flushes the document cache in response to a POST_SAVE_BEGIN event. |
String |
getHTML(WikiContext context,
String pagedata)
Convenience method for rendering, using the default parser and renderer. |
String |
getHTML(WikiContext context,
WikiDocument doc)
Simply renders a WikiDocument to a String. |
MarkupParser |
getParser(WikiContext context,
String pagedata)
Returns the default Parser for this context. |
protected WikiDocument |
getRenderedDocument(WikiContext context,
String pagedata)
Returns a cached document, if one is found. |
WikiRenderer |
getRenderer(WikiContext context,
WikiDocument doc)
Returns a WikiRenderer instance, initialized with the given context and doc. |
void |
initialize(WikiEngine engine,
Properties properties)
Initializes the RenderingManager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_RENDERER
public static final String DOCUMENTCACHE_NAME
public static final String WYSIWYG_EDITOR_MODE
public static final String VAR_EXECUTE_PLUGINS
| Constructor Detail |
|---|
public RenderingManager()
| Method Detail |
|---|
public void initialize(WikiEngine engine,
Properties properties)
throws WikiException
engine - A WikiEngine instance.properties - A list of properties to get parameters from.
WikiException - If the manager could not be initialized.
public MarkupParser getParser(WikiContext context,
String pagedata)
context - the wiki contextpagedata - the page data
protected WikiDocument getRenderedDocument(WikiContext context,
String pagedata)
throws IOException
context - the wiki contextpagedata - the page data
IOException - If rendering cannot be accomplished
public String getHTML(WikiContext context,
WikiDocument doc)
throws IOException
context - The WikiContext to render indoc - A proper WikiDocument
IOException - If the WikiDocument is poorly formed.
public WikiRenderer getRenderer(WikiContext context,
WikiDocument doc)
context - The WikiContextdoc - The document to render
public String getHTML(WikiContext context,
String pagedata)
context - the wiki contextpagedata - the page data
public void actionPerformed(WikiEvent event)
actionPerformed in interface WikiEventListenerevent - a WikiEvent objectWikiEventListener.actionPerformed(org.apache.wiki.event.WikiEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||