org.springframework.extensions.webscripts
Interface TemplateProcessor

All Known Implementing Classes:
AbstractTemplateProcessor, FTLTemplateProcessor, GroovyTemplateProcessor, PHPTemplateProcessor

public interface TemplateProcessor

Web Script Template Processor

Author:
davidc

Method Summary
 String getDefaultEncoding()
          Gets the default encoding
 boolean hasTemplate(String template)
          Determines if a template exists
 void process(String template, Object model, Writer out)
          Process a template against the supplied data model and write to the out.
 void processString(String template, Object model, Writer out)
          Process a string template against the supplied data model and write to the out.
 void reset()
          Reset the Template Processor
 

Method Detail

hasTemplate

boolean hasTemplate(String template)
Determines if a template exists

Parameters:
template -
Returns:
true => exists

process

void process(String template,
             Object model,
             Writer out)
Process a template against the supplied data model and write to the out.

Parameters:
template - Template name/path
model - Object model to process template against
out - Writer object to send output too

processString

void processString(String template,
                   Object model,
                   Writer out)
Process a string template against the supplied data model and write to the out.

Parameters:
template - Template string
model - Object model to process template against
out - Writer object to send output too

getDefaultEncoding

String getDefaultEncoding()
Gets the default encoding

Returns:
default encoding

reset

void reset()
Reset the Template Processor



Copyright © 2009 SpringSource, Inc. All Rights Reserved.