| 
||||||||||
| 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 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 | |
|---|---|
 String | 
expandedTemplate(Template template,
                 TemplateContext templateContext)
Expand the Template against the context and return the expansion as a string.  | 
 void | 
expandTemplate(MelatiWriter out,
               String templateName,
               TemplateContext templateContext)
Expand the Template against the context.  | 
 void | 
expandTemplate(MelatiWriter out,
               Template template,
               TemplateContext templateContext)
Expand the Template against the context.  | 
 Object | 
getEngine()
Get the underlying engine.  | 
 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(String templateName)
Get a template given it's name.  | 
 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 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 String getName()
getName in interface TemplateEnginepublic String templateExtension()
templateExtension in interface TemplateEngine
public Template template(String templateName)
                  throws NotFoundException
template in interface TemplateEnginetemplateName - the name of the template to find
NotFoundException - if template not found
public void expandTemplate(MelatiWriter out,
                           String templateName,
                           TemplateContext templateContext)
                    throws NotFoundException
expandTemplate in interface TemplateEngineout - a MelatiWriter to output ontemplateName - the name of the template to expandtemplateContext - the TemplateContext to expand 
                        the template against
NotFoundException - if template not found
public void expandTemplate(MelatiWriter out,
                           Template template,
                           TemplateContext templateContext)
expandTemplate in interface TemplateEngineout - a MelatiWriter to output ontemplate - the Template to expandtemplateContext - the TemplateContext to expand 
                        the template against
public String expandedTemplate(Template template,
                               TemplateContext templateContext)
expandedTemplate in interface TemplateEnginetemplate - the Template to expandtemplateContext - the ServletTemplateContext to expand 
                        the template against
TemplateEngine.expandedTemplate(org.melati.template.Template, org.melati.template.TemplateContext)public MelatiStringWriter getStringWriter()
MelatiWebmacroStringWriter.
 
getStringWriter in interface TemplateEngineMelatiStringWriter.Melati.getStringWriter(), 
TemplateEngine.getStringWriter()public Object getEngine()
getEngine in interface TemplateEngine
  | 
 | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||