org.directwebremoting.servlet
Class TemplateHandler

java.lang.Object
  extended by org.directwebremoting.servlet.CachingHandler
      extended by org.directwebremoting.servlet.TemplateHandler
All Implemented Interfaces:
Handler
Direct Known Subclasses:
JavaScriptHandler

public abstract class TemplateHandler
extends CachingHandler

A Handler that allows some very simple search and replace templating. The general recommended syntax is to use ${search} as the string to be searched for, to allow future expansion to a more EL-like syntax.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
TemplateHandler()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getSearchReplacePairs()
          Mostly when we send a file out, we don't change anything so the default set of search and replaces is empty.
 
Methods inherited from class org.directwebremoting.servlet.CachingHandler
getMimeType, handle, setIgnoreLastModified, setMimeType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateHandler

public TemplateHandler()
Method Detail

getSearchReplacePairs

public java.util.Map<java.lang.String,java.lang.String> getSearchReplacePairs()
Mostly when we send a file out, we don't change anything so the default set of search and replaces is empty. Engine.js can override this with strings to customize the output

Returns:
a map of search (key) and replace (value) strings

Copyright 2008