com.rshtech.jspwiki
Class HtmlRenderer

java.lang.Object
  extended by com.rshtech.jspwiki.HtmlRenderer

public class HtmlRenderer
extends java.lang.Object

TODO Class summary sentence. Class documentation.

Version:
$Revision: 3175 $
Author:
$Author: kostya $

Field Summary
static java.lang.String TMP_DIR_NAME
           
static java.lang.String WIKI_APP_NAME_PROP
           
static java.lang.String WIKI_ATTACH_DIR_PROP
           
static java.lang.String WIKI_AUTHORIZER
           
static java.lang.String WIKI_SRC_DIR_PROP
           
 
Constructor Summary
HtmlRenderer()
          Default constructor which sets up the rendering engine with the default engine properties.
HtmlRenderer(java.util.Properties jspwikiProps)
          Constructor that sets up a rendering engine with the specified engine properties.
HtmlRenderer(java.util.Properties jspwikiProps, java.util.Properties additional)
          Constructor that sets up a rendering engine with the specified engine properties and with the additional properties (non-jspwiki properties).
 
Method Summary
 boolean render(java.lang.String name, java.io.File srcDir, java.io.File templateDir, java.lang.String templateName, java.io.File destDir)
          Render an HTML page for the given wiki name, drawing the wiki source from the specified source directory using the specified template.
 boolean render(java.lang.String name, java.io.File srcDir, java.io.File templateDir, java.lang.String templateName, java.io.Writer writer)
          Render an HTML page for the given wiki name, drawing the wiki source from the specified source directory using the specified template.
 void setVariable(java.lang.String name, java.lang.String value)
          Interface for changing jspwiki.* variables without reinstantiating the engine.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TMP_DIR_NAME

public static final java.lang.String TMP_DIR_NAME
See Also:
Constant Field Values

WIKI_APP_NAME_PROP

public static final java.lang.String WIKI_APP_NAME_PROP
See Also:
Constant Field Values

WIKI_SRC_DIR_PROP

public static final java.lang.String WIKI_SRC_DIR_PROP
See Also:
Constant Field Values

WIKI_AUTHORIZER

public static final java.lang.String WIKI_AUTHORIZER
See Also:
Constant Field Values

WIKI_ATTACH_DIR_PROP

public static final java.lang.String WIKI_ATTACH_DIR_PROP
See Also:
Constant Field Values
Constructor Detail

HtmlRenderer

public HtmlRenderer()
             throws com.ecyrd.jspwiki.WikiException
Default constructor which sets up the rendering engine with the default engine properties.

Throws:
com.ecyrd.jspwiki.WikiException

HtmlRenderer

public HtmlRenderer(java.util.Properties jspwikiProps)
             throws com.ecyrd.jspwiki.WikiException
Constructor that sets up a rendering engine with the specified engine properties.

Throws:
com.ecyrd.jspwiki.WikiException

HtmlRenderer

public HtmlRenderer(java.util.Properties jspwikiProps,
                    java.util.Properties additional)
             throws com.ecyrd.jspwiki.WikiException
Constructor that sets up a rendering engine with the specified engine properties and with the additional properties (non-jspwiki properties).

Throws:
com.ecyrd.jspwiki.WikiException
Method Detail

render

public boolean render(java.lang.String name,
                      java.io.File srcDir,
                      java.io.File templateDir,
                      java.lang.String templateName,
                      java.io.File destDir)
               throws com.ecyrd.jspwiki.WikiException
Render an HTML page for the given wiki name, drawing the wiki source from the specified source directory using the specified template.

Parameters:
name - the wiki name
srcDir - the directory the wiki source files live in
templateDir - the directory the templates and template resource live in
templateName - the name of the template file (which lives in the templateDir)
destDir - where to store the generated html, as ${wikiName}.html.
Returns:
true if the HTML is generated successfully, false otherwise.
Throws:
com.ecyrd.jspwiki.WikiException

render

public boolean render(java.lang.String name,
                      java.io.File srcDir,
                      java.io.File templateDir,
                      java.lang.String templateName,
                      java.io.Writer writer)
               throws com.ecyrd.jspwiki.WikiException
Render an HTML page for the given wiki name, drawing the wiki source from the specified source directory using the specified template.

Parameters:
name - the wiki name
srcDir - the directory the wiki source files live in
templateDir - the directory the templates and template resource live in
templateName - the name of the template file (which lives in the templateDir)
write - Writer to render HTML to.
Returns:
true if the HTML is generated successfully, false otherwise.
Throws:
com.ecyrd.jspwiki.WikiException

setVariable

public void setVariable(java.lang.String name,
                        java.lang.String value)
Interface for changing jspwiki.* variables without reinstantiating the engine.

Parameters:
name -
value -