| java.lang.Object com.ecyrd.jspwiki.render.RenderingManager
RenderingManager | public class RenderingManager implements WikiEventListener,InternalModule(Code) | | 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.
author: jalkanen since: 2.4 |
DEFAULT_RENDERER | final public static String DEFAULT_RENDERER(Code) | | |
PROP_CACHESIZE | final public static String PROP_CACHESIZE(Code) | | |
VAR_EXECUTE_PLUGINS | final public static String VAR_EXECUTE_PLUGINS(Code) | | |
WYSIWYG_EDITOR_MODE | final public static String WYSIWYG_EDITOR_MODE(Code) | | |
getHTML | public String getHTML(WikiContext context, WikiDocument doc) throws IOException(Code) | | Simply renders a WikiDocument to a String. This version does not get the document
from the cache - in fact, it does not cache the document at all. This is
very useful, if you have something that you want to render outside the caching
routines. Because the cache is based on full pages, and the cache keys are
based on names, use this routine if you're rendering anything for yourself.
Parameters: context - The WikiContext to render in Parameters: doc - A proper WikiDocument Rendered HTML. throws: IOException - If the WikiDocument is poorly formed. |
getHTML | public String getHTML(WikiContext context, String pagedata)(Code) | | Convinience method for rendering, using the default parser and renderer. Note that
you can't use this method to do any arbitrary rendering, as the pagedata MUST
be the data from the that the WikiContext refers to - this method caches the HTML
internally, and will return the cached version. If the pagedata is different
from what was cached, will re-render and store the pagedata into the internal cache.
Parameters: context - the wiki context Parameters: pagedata - the page data XHTML data. |
getParser | public MarkupParser getParser(WikiContext context, String pagedata)(Code) | | Returns the default Parser for this context.
Parameters: context - the wiki context Parameters: pagedata - the page data A MarkupParser instance. |
getRenderedDocument | protected WikiDocument getRenderedDocument(WikiContext context, String pagedata) throws IOException(Code) | | Returns a cached document, if one is found.
Parameters: context - the wiki context Parameters: pagedata - the page data the rendered wiki document throws: IOException - |
getRenderer | public WikiRenderer getRenderer(WikiContext context, WikiDocument doc)(Code) | | Returns a WikiRenderer instance, initialized with the given
context and doc. The object is an XHTMLRenderer, unless overridden
in jspwiki.properties with PROP_RENDERER.
|
initialize | public void initialize(WikiEngine engine, Properties properties) throws WikiException(Code) | | Initializes the RenderingManager.
Checks for cache size settings, initializes the document cache.
Looks for alternative WikiRenderers, initializes one, or the default
XHTMLRenderer, for use.
Parameters: engine - A WikiEngine instance. Parameters: properties - A list of properties to get parameters from. |
|
|