|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.melati.template.AbstractTemplateEngine
org.melati.template.webmacro.WebmacroTemplateEngine
public class WebmacroTemplateEngine
Wrapper for the WebMacro Template Engine for use with Melati.
| Field Summary | |
|---|---|
static java.lang.String |
NAME
The name of the engine. |
org.webmacro.WM |
wm
The WebMacro. |
| Fields inherited from class org.melati.template.AbstractTemplateEngine |
|---|
roots |
| Constructor Summary | |
|---|---|
WebmacroTemplateEngine()
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
expandedTemplate(Template template,
TemplateContext templateContext)
Expand the Template against the context and return the expansion as a string. |
void |
expandTemplate(MelatiWriter out,
java.lang.String templateName,
TemplateContext templateContext)
Expand the Template against the context. |
void |
expandTemplate(MelatiWriter out,
Template template,
TemplateContext templateContext)
Expand the Template against the context. |
java.lang.Object |
getEngine()
Get the underlying engine. |
java.lang.String |
getName()
The name of the template engine (used to find the templets). |
MelatiStringWriter |
getStringWriter()
Return a MelatiWebmacroStringWriter. |
TemplateContext |
getTemplateContext(Melati melati)
Create a new, empty, Context for WebMacro. |
void |
init(MelatiConfig melatiConfig)
Construct a new Engine. |
Template |
template(java.lang.String templateName)
Get a template given it's name. |
java.lang.String |
templateExtension()
|
| Methods inherited from class org.melati.template.AbstractTemplateEngine |
|---|
addRoot, getRoots, getTemplateName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.melati.template.TemplateEngine |
|---|
addRoot, getRoots, getTemplateName |
| Field Detail |
|---|
public static final java.lang.String NAME
public org.webmacro.WM wm
| Constructor Detail |
|---|
public WebmacroTemplateEngine()
| Method Detail |
|---|
public void init(MelatiConfig melatiConfig)
throws TemplateEngineException
init in interface TemplateEnginemelatiConfig - a MelatiConfig
TemplateEngineException - if any problem occurs with the enginepublic TemplateContext getTemplateContext(Melati melati)
getTemplateContext in interface TemplateEnginemelati - the Melati
TemplateContextpublic java.lang.String getName()
getName in interface TemplateEnginepublic java.lang.String templateExtension()
templateExtension in interface TemplateEngine
public Template template(java.lang.String templateName)
throws java.io.IOException,
NotFoundException
template in interface TemplateEnginetemplateName - the name of the template to find
java.io.IOException - if the engine does
NotFoundException - if template not found
public void expandTemplate(MelatiWriter out,
java.lang.String templateName,
TemplateContext templateContext)
throws java.io.IOException,
NotFoundException
expandTemplate in interface TemplateEngineout - a MelatiWriter to output ontemplateName - the name of the template to expandtemplateContext - the TemplateContext to expand
the template against
java.io.IOException - if the engine does
NotFoundException - if template not found
public void expandTemplate(MelatiWriter out,
Template template,
TemplateContext templateContext)
throws java.io.IOException
expandTemplate in interface TemplateEngineout - a MelatiWriter to output ontemplate - the Template to expandtemplateContext - the TemplateContext to expand
the template against
java.io.IOException - if the engine does
public java.lang.String expandedTemplate(Template template,
TemplateContext templateContext)
throws java.io.IOException
expandedTemplate in interface TemplateEnginetemplate - the Template to expandtemplateContext - the ServletTemplateContext to expand
the template against
java.io.IOException - if TemplateEngine doesTemplateEngine.expandedTemplate(org.melati.template.Template, org.melati.template.TemplateContext)public MelatiStringWriter getStringWriter()
MelatiWebmacroStringWriter.
getStringWriter in interface TemplateEngineMelatiStringWriter.Melati.getStringWriter(),
TemplateEngine.getStringWriter()public java.lang.Object getEngine()
getEngine in interface TemplateEngine
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||