|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.melati.template.AbstractTemplateEngine org.melati.template.NoTemplateEngine
public class NoTemplateEngine
The null
ServletTemplateEngine
.
Field Summary |
---|
Fields inherited from class org.melati.template.AbstractTemplateEngine |
---|
roots |
Constructor Summary | |
---|---|
NoTemplateEngine()
Constructor. |
Method Summary | |
---|---|
String |
expandedTemplate(Template melatiTemplate,
TemplateContext templateContext)
Expand the Template against the context. |
void |
expandTemplate(MelatiWriter out,
String templateName,
TemplateContext templateContext)
Expand the Template against the context. |
void |
expandTemplate(MelatiWriter out,
Template melatiTemplate,
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). |
ServletTemplateContext |
getServletTemplateContext(Melati melati)
Throw exception. |
MelatiWriter |
getServletWriter(javax.servlet.http.HttpServletResponse response,
boolean buffered)
Get a Writer which can write to Servlet output. |
MelatiStringWriter |
getStringWriter()
Return a MelatiStringWriter . |
TemplateContext |
getTemplateContext(Melati melati)
Throw exception. |
void |
init(MelatiConfig config)
Construct a null Engine. |
void |
init(MelatiConfig melatiConfig,
javax.servlet.http.HttpServlet servlet)
Construct a new Engine for use in a servlet environment. |
Template |
template(String templateName)
Get a template given its 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 |
Constructor Detail |
---|
public NoTemplateEngine()
Method Detail |
---|
public void init(MelatiConfig config)
init
in interface TemplateEngine
config
- a MelatiConfig
public void init(MelatiConfig melatiConfig, javax.servlet.http.HttpServlet servlet) throws TemplateEngineException
init
in interface ServletTemplateEngine
melatiConfig
- a MelatiConfig
servlet
- the servlet we are within
TemplateEngineException
- if any problem occurs with the engineTemplateServlet
public TemplateContext getTemplateContext(Melati melati) throws TemplateEngineException
getTemplateContext
in interface TemplateEngine
melati
- the Melati
TemplateContext
TemplateEngineException
- if any problem occurs with the enginepublic ServletTemplateContext getServletTemplateContext(Melati melati) throws TemplateEngineException
getServletTemplateContext
in interface ServletTemplateEngine
melati
- the Melati
TemplateEngineException
- alwayspublic String getName()
getName
in interface TemplateEngine
public String templateExtension()
templateExtension
in interface TemplateEngine
public Template template(String templateName)
template
in interface TemplateEngine
templateName
- the name of the template to find
public void expandTemplate(MelatiWriter out, String templateName, TemplateContext templateContext) throws TemplateEngineException
expandTemplate
in interface TemplateEngine
out
- a MelatiWriter
to output ontemplateName
- the name of the template to expandtemplateContext
- the ServletTemplateContext
to expand
the template against
TemplateEngineException
- if invokedpublic void expandTemplate(MelatiWriter out, Template melatiTemplate, TemplateContext templateContext) throws TemplateEngineException
expandTemplate
in interface TemplateEngine
out
- a MelatiWriter
to output onmelatiTemplate
- the Template
to expandtemplateContext
- the ServletTemplateContext
to expand
the template against
TemplateEngineException
- if invokedpublic String expandedTemplate(Template melatiTemplate, TemplateContext templateContext) throws TemplateEngineException
expandedTemplate
in interface TemplateEngine
melatiTemplate
- the Template
to expandtemplateContext
- the ServletTemplateContext
to expand
the template against
TemplateEngineException
- if invoked
(org.melati.template.Template, org.melati.template.TemplateContext)
public MelatiWriter getServletWriter(javax.servlet.http.HttpServletResponse response, boolean buffered)
ServletTemplateEngine
getServletWriter
in interface ServletTemplateEngine
response
- the HttpServletResponse
that this
writer will be part ofbuffered
- whether the writer should be buffered
MelatiWriter
appropriate for this engine.public MelatiStringWriter getStringWriter()
MelatiStringWriter
.
getStringWriter
in interface TemplateEngine
MelatiStringWriter
.TemplateEngine.getStringWriter()
,
Melati.getStringWriter()
public Object getEngine()
getEngine
in interface TemplateEngine
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |