org.melati.template.webmacro
Class WebmacroServletTemplateEngine

Package class diagram package WebmacroServletTemplateEngine
java.lang.Object
  extended by org.melati.template.AbstractTemplateEngine
      extended by org.melati.template.webmacro.WebmacroTemplateEngine
          extended by org.melati.template.webmacro.WebmacroServletTemplateEngine
All Implemented Interfaces:
ServletTemplateEngine, TemplateEngine

public class WebmacroServletTemplateEngine
extends WebmacroTemplateEngine
implements ServletTemplateEngine

Wrapper for the WebMacro Template Engine for use in a Servlet context.


Field Summary
 
Fields inherited from class org.melati.template.webmacro.WebmacroTemplateEngine
NAME, wm
 
Fields inherited from class org.melati.template.AbstractTemplateEngine
roots
 
Constructor Summary
WebmacroServletTemplateEngine()
          Constructor.
 
Method Summary
 ServletTemplateContext getServletTemplateContext(Melati melati)
          Get the generic parameters for WebMacro, with servlet objects in the Context.
 MelatiWriter getServletWriter(javax.servlet.http.HttpServletResponse response, boolean buffered)
          Get a Writer which can write to Servlet output.
 void init(MelatiConfig melatiConfig, javax.servlet.http.HttpServlet servlet)
          Construct a new Engine for use in a servlet environment.
 
Methods inherited from class org.melati.template.webmacro.WebmacroTemplateEngine
expandedTemplate, expandTemplate, expandTemplate, getEngine, getName, getStringWriter, getTemplateContext, init, template, 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, expandedTemplate, expandTemplate, expandTemplate, getEngine, getName, getRoots, getStringWriter, getTemplateContext, getTemplateName, init, template, templateExtension
 

Constructor Detail

WebmacroServletTemplateEngine

public WebmacroServletTemplateEngine()
Constructor.

Method Detail

init

public void init(MelatiConfig melatiConfig,
                 javax.servlet.http.HttpServlet servlet)
          throws TemplateEngineException
Construct a new Engine for use in a servlet environment.

Specified by:
init in interface ServletTemplateEngine
Parameters:
melatiConfig - a MelatiConfig
servlet - the servlet we are within
Throws:
TemplateEngineException - if any problem occurs with the engine
See Also:
TemplateServlet

getServletTemplateContext

public ServletTemplateContext getServletTemplateContext(Melati melati)
Get the generic parameters for WebMacro, with servlet objects in the Context.

Specified by:
getServletTemplateContext in interface ServletTemplateEngine
Parameters:
melati - the Melati
Returns:
a ServletTemplateContext

getServletWriter

public MelatiWriter getServletWriter(javax.servlet.http.HttpServletResponse response,
                                     boolean buffered)
Description copied from interface: ServletTemplateEngine
Get a Writer which can write to Servlet output.

Specified by:
getServletWriter in interface ServletTemplateEngine
Parameters:
response - the HttpServletResponse that this writer will be part of
buffered - whether the writer should be buffered
Returns:
a MelatiWriter appropriate for this engine.
Throws:
IOException - if there is a problem with the filesystem.


Copyright © 2000-2010 PanEris. All Rights Reserved.