org.melati.template.velocity
Class VelocityTemplate

Package class diagram package VelocityTemplate
java.lang.Object
  extended by org.melati.template.velocity.VelocityTemplate
All Implemented Interfaces:
Template

public class VelocityTemplate
extends Object
implements Template

A Velocity Template for use with Melati.


Constructor Summary
VelocityTemplate(String templateName)
          Constructor.
 
Method Summary
 void write(MelatiWriter out, TemplateContext templateContext, TemplateEngine engine)
          Write the interpolated Template to a Writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTemplate

public VelocityTemplate(String templateName)
                 throws org.apache.velocity.exception.ParseErrorException,
                        org.apache.velocity.exception.ResourceNotFoundException
Constructor.

Parameters:
templateName - name or Template
Throws:
org.apache.velocity.exception.ParseErrorException - if there is a problem paring the template
org.apache.velocity.exception.ResourceNotFoundException - if the template is not found
Method Detail

write

public void write(MelatiWriter out,
                  TemplateContext templateContext,
                  TemplateEngine engine)
           throws TemplateEngineException
Write the interpolated Template to a Writer.

Specified by:
write in interface Template
Parameters:
out - the MelatiWroter to write to
templateContext - the Context to interpolate the Template with regard to
engine - the engine to interpolate the template with
Throws:
TemplateEngineException - if thrown by TemplateEngine
See Also:
(org.melati.util.MelatiWriter, org.melati.template.TemplateContext, org.melati.template.TemplateEngine)


Copyright © 2000-2010 PanEris. All Rights Reserved.