|
||||||||||
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 |
PROP_CACHESIZE
|
Constructor Summary | |
---|---|
RenderingManager()
|
Method Summary | |
---|---|
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. |
void |
initialize(Properties properties)
Is called whenever the a new PageFilter is instantiated and reset. |
void |
initialize(WikiEngine engine,
Properties properties)
Initializes the RenderinManager. |
void |
postSave(WikiContext wikiContext,
String content)
Flushes the cache objects that refer to this page. |
String |
postTranslate(WikiContext wikiContext,
String htmlContent)
This method is called after a page has been fed through the TranslatorReader, so anything you are seeing here is translated content. |
String |
preSave(WikiContext wikiContext,
String content)
This method is called before the page has been saved to the PageProvider. |
String |
preTranslate(WikiContext wikiContext,
String content)
This method is called whenever a page has been loaded from the provider, but not yet been sent through the TranslatorReader. |
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
Constructor Detail |
---|
public RenderingManager()
Method Detail |
---|
public void initialize(WikiEngine engine, Properties properties)
engine
- A WikiEngine instance.properties
- A list of properties to get parameters from.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
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 String getHTML(WikiContext context, String pagedata)
context
- the wiki contextpagedata
- the page data
public void initialize(Properties properties) throws FilterException
PageFilter
initialize
in interface PageFilter
FilterException
public void postSave(WikiContext wikiContext, String content) throws FilterException
postSave
in interface PageFilter
FilterException
public String postTranslate(WikiContext wikiContext, String htmlContent) throws FilterException
PageFilter
postTranslate
in interface PageFilter
FilterException
public String preSave(WikiContext wikiContext, String content) throws FilterException
PageFilter
preSave
in interface PageFilter
FilterException
public String preTranslate(WikiContext wikiContext, String content) throws FilterException
PageFilter
preTranslate
in interface PageFilter
wikiContext
- The current wikicontext.content
- WikiMarkup.
FilterException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |