freemarker.template
Interface TemplateProcessor

All Known Subinterfaces:
FunctionTemplateProcessor, UnparsedInstruction
All Known Implementing Classes:
AbstractTemplate, AssignInstruction, BreakInstruction, CallInstruction, CaseInstruction, CommentInstruction, DefaultCaseInstruction, ElseInstruction, EmptyInstruction, ExitInstruction, FunctionInstruction, GenericStartInstruction, IfElseInstruction, IfInstruction, IncludeInstruction, ListInstruction, NOOPInstruction, NoParseInstruction, SwitchInstruction, Template, TemplateArrayList, TextBlockInstruction, TransformInstruction, UnparsedTemplate, VariableInstruction

public interface TemplateProcessor

Objects representing compiled templates must implement this interface.

Version:
$Id: TemplateProcessor.java,v 1.2 2004/10/18 06:28:23 run2000 Exp $

Nested Class Summary
static class TemplateProcessor.ExitStatus
          Enumates the return values from a template processor.
 
Method Summary
 TemplateProcessor.ExitStatus process(TemplateModelRoot modelRoot, java.io.Writer out, TemplateRuntimeHandler eventHandler)
          Processes the contents of this TemplateProcessor and outputs the resulting text to a Writer.
 

Method Detail

process

TemplateProcessor.ExitStatus process(TemplateModelRoot modelRoot,
                                     java.io.Writer out,
                                     TemplateRuntimeHandler eventHandler)
                                     throws java.io.IOException
Processes the contents of this TemplateProcessor and outputs the resulting text to a Writer.

Parameters:
modelRoot - the root node of the data model.
out - a Writer to send the output to.
eventHandler - a TemplateEventAdapter for handling any events that occur during processing.
Returns:
an exit code indicating how the process terminated, typically used for short-circuiting template processing
Throws:
java.io.IOException - an IO error occurred during processing