org.melati.template
Interface ServletTemplateEngine

Package class diagram package ServletTemplateEngine
All Superinterfaces:
TemplateEngine
All Known Implementing Classes:
NoTemplateEngine, VelocityServletTemplateEngine, WebmacroServletTemplateEngine

public interface ServletTemplateEngine
extends TemplateEngine

Interface for a Template engine for use with Melati and Servlets.


Method Summary
 ServletTemplateContext getServletTemplateContext(Melati melati)
          Get the generic parameters for this engine.
 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 interface org.melati.template.TemplateEngine
addRoot, expandedTemplate, expandTemplate, expandTemplate, getEngine, getName, getRoots, getStringWriter, getTemplateContext, getTemplateName, init, template, templateExtension
 

Method Detail

init

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

Parameters:
melatiConfig - a MelatiConfig
servlet - the servlet we are within
Throws:
TemplateEngineException - if any problem occurs with the engine
See Also:
TemplateServlet

getServletWriter

MelatiWriter getServletWriter(javax.servlet.http.HttpServletResponse response,
                              boolean buffered)
Get a Writer which can write to Servlet output.

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.

getServletTemplateContext

ServletTemplateContext getServletTemplateContext(Melati melati)
                                                 throws TemplateEngineException
Get the generic parameters for this engine.

Parameters:
melati - the Melati
Returns:
a ServletTemplateContext
Throws:
TemplateEngineException - if any problem occurs with the engine


Copyright © 2000-2010 PanEris. All Rights Reserved.