net.lessy.util.template.velocity
Class VelocityTemplateManager

java.lang.Object
  extended by net.lessy.util.template.velocity.VelocityTemplateManager
All Implemented Interfaces:
TemplateManager

public class VelocityTemplateManager
extends Object
implements TemplateManager

Velocity-Implementation of a Template-Manager

Author:
Hans Lesmeister

Constructor Summary
VelocityTemplateManager()
           
 
Method Summary
 TemplateContext createContext()
          Create a Context that suits the Manager-Implementation.
 void process(String templateName, String encoding, TemplateContext context, Writer output)
          Processes a template and writes the result to the Writer
 void setTemplatePostfix(String templatePostfix)
           
 void setTemplatePrefix(String templatePrefix)
           
 void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VelocityTemplateManager

public VelocityTemplateManager()
Method Detail

process

public void process(String templateName,
                    String encoding,
                    TemplateContext context,
                    Writer output)
Processes a template and writes the result to the Writer

Specified by:
process in interface TemplateManager
Parameters:
templateName - Name of the Template.
encoding - Encoding
context - that contains all data needed to process the Template
output - Output to receive the result of the Template-Processing

createContext

public TemplateContext createContext()
Create a Context that suits the Manager-Implementation.

Specified by:
createContext in interface TemplateManager
Returns:
Instance of a context

setVelocityEngine

public void setVelocityEngine(org.apache.velocity.app.VelocityEngine velocityEngine)

setTemplatePostfix

public void setTemplatePostfix(String templatePostfix)

setTemplatePrefix

public void setTemplatePrefix(String templatePrefix)


Copyright © 2012. All Rights Reserved.