org.velocityweb.template
Class VelocityTemplateWrapper

java.lang.Object
  extended byorg.velocityweb.template.VelocityTemplateWrapper
All Implemented Interfaces:
TemplateWrapper

public class VelocityTemplateWrapper
extends java.lang.Object
implements TemplateWrapper


Constructor Summary
VelocityTemplateWrapper()
           
 
Method Summary
 void destroy()
          destroy templte engine
 void init(javax.servlet.ServletConfig config, java.lang.String templateRootFolder)
          init templte engine
 java.lang.String merge(java.lang.String templateFileName, java.lang.String templateFileEncoding, java.util.Map context)
          merge HTML templte file with dynamic data
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTemplateWrapper

public VelocityTemplateWrapper()
Method Detail

init

public void init(javax.servlet.ServletConfig config,
                 java.lang.String templateRootFolder)
          throws javax.servlet.ServletException
init templte engine

Specified by:
init in interface TemplateWrapper
Throws:
javax.servlet.ServletException

merge

public java.lang.String merge(java.lang.String templateFileName,
                              java.lang.String templateFileEncoding,
                              java.util.Map context)
                       throws java.lang.Exception
merge HTML templte file with dynamic data

Specified by:
merge in interface TemplateWrapper
Parameters:
templateFileName - HTML templte file name
templateFileEncoding - encoding of HTML templte file
context - dynamic data
Throws:
java.lang.Exception

destroy

public void destroy()
destroy templte engine

Specified by:
destroy in interface TemplateWrapper