|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jlayercheck.out.html.VelocityGenerator
public class VelocityGenerator
Prepares velocity and an initial context for a template.
Field Summary | |
---|---|
protected org.apache.velocity.VelocityContext |
context
The VelocityContext for the template. |
static String |
DEFAULT_ENCODING
Use UTF-8 as default encoding for templates. |
protected String |
template
The name of the template |
Constructor Summary | |
---|---|
VelocityGenerator()
Create a new generator. |
|
VelocityGenerator(String template,
Map<String,Object> addCtx)
Create a new generator for the given template |
Method Summary | |
---|---|
void |
addToContext(Map<String,Object> addCtx)
Add all entries to the context . |
void |
generate(Writer writer)
Start generation and write output. |
org.apache.velocity.VelocityContext |
getContext()
Get the current context or create a new empty one. |
String |
getTemplate()
|
void |
setContext(org.apache.velocity.VelocityContext context)
Set the context . |
void |
setTemplate(String template)
|
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_ENCODING
protected String template
protected org.apache.velocity.VelocityContext context
VelocityContext
for the template.
Constructor Detail |
---|
public VelocityGenerator()
public VelocityGenerator(String template, Map<String,Object> addCtx)
template
- The name of the template to use.context
- A Map withMethod Detail |
---|
public String getTemplate()
public void setTemplate(String template)
public org.apache.velocity.VelocityContext getContext()
context
or create a new empty one.
public void setContext(org.apache.velocity.VelocityContext context)
context
.
context
- the new contextpublic void addToContext(Map<String,Object> addCtx)
context
.
addCtx
- The map containing the entriespublic void generate(Writer writer)
writer
- write output into this writer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |