|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.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 size of the cache by using the "jspwiki.renderingManager.cacheSize" parameter in jspwiki.properties. The property value is the number of items that are stored in the cache. By default, the value of this parameter is taken from the "jspwiki.cachingProvider.cacheSize" parameter (i.e. the rendering cache is the same size as the page cache), but you may control them separately.
You can turn caching completely off by stating a cacheSize of zero.
Field Summary | |
---|---|
static String |
DEFAULT_RENDERER
The name of the default renderer. |
static String |
PROP_CACHESIZE
Parameter value for setting the cache size. |
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)
Convinience 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 PROP_CACHESIZE
public static final String DEFAULT_RENDERER
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 accomplishedpublic 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 WikiEventListener
event
- a WikiEvent objectWikiEventListener.actionPerformed(com.ecyrd.jspwiki.event.WikiEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |