com.scooterframework.web.controller
Class StringTemplateHandler

java.lang.Object
  extended by com.scooterframework.web.controller.StringTemplateHandler
All Implemented Interfaces:
TemplateHandler

public class StringTemplateHandler
extends java.lang.Object
implements TemplateHandler

StringTemplateHandler handles StringTemplate templates.


Constructor Summary
StringTemplateHandler()
           
 
Method Summary
protected  java.lang.String getTemplateFileContent(java.io.File templateFile)
           
 java.lang.String handle(java.io.File viewTemplate, java.util.Map<java.lang.String,java.lang.Object> props)
          Handles processing the viewTemplate with props.
 java.lang.String handle(java.lang.String content, java.util.Map<java.lang.String,java.lang.Object> props)
          Handles processing the content with props.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringTemplateHandler

public StringTemplateHandler()
Method Detail

handle

public java.lang.String handle(java.lang.String content,
                               java.util.Map<java.lang.String,java.lang.Object> props)
Handles processing the content with props.

Specified by:
handle in interface TemplateHandler
Parameters:
content - The content to be processed.
props - properties (name/value pairs) to be used to process the content
Returns:
processed content as string

handle

public java.lang.String handle(java.io.File viewTemplate,
                               java.util.Map<java.lang.String,java.lang.Object> props)
Handles processing the viewTemplate with props.

Specified by:
handle in interface TemplateHandler
Parameters:
viewTemplate -
props - properties (name/value pairs) to be used to process the content
Returns:
processed content as string

getTemplateFileContent

protected java.lang.String getTemplateFileContent(java.io.File templateFile)