freemarker.template
Interface TemplateProcessor

All Known Subinterfaces:
FunctionTemplateProcessor, UnparsedInstruction
All Known Implementing Classes:
AbstractTemplate, AssignBlockInstruction, 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 1124 2005-10-04 10:48:45Z run2000 $

Nested Class Summary
static class TemplateProcessor.ExitStatus
          Enumates the return values from a template processor.
 
Method Summary
 TemplateProcessor.ExitStatus process(TemplateWriteableHashModel 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(TemplateWriteableHashModel 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