org.melati.template.velocity
Class WebMacroConverter

Package class diagram package WebMacroConverter
java.lang.Object
  extended by org.melati.template.velocity.WebMacroConverter

public final class WebMacroConverter
extends Object

Converter from WebMacro templates to Velocity templates. Note that this does not succeed for modern WebMacro syntax which uses optional #begin in #foreach.

Author:
Tim Pizey based on work by Jason vanZyl and Tim Joyce. FIXME Refactor to use java regexp.

Field Summary
static String[] regExps
          The regexes to use for substitution.
 
Method Summary
static InputStream convert(InputStream in)
          Do the conversion.
static String convert(String in)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regExps

public static final String[] regExps
The regexes to use for substitution. The regexes come in pairs. The first is the string to match, the second is the substitution to make.

Method Detail

convert

public static InputStream convert(InputStream in)
Do the conversion.

Parameters:
in -
Returns:
the InputStream with substitutions applied

convert

public static String convert(String in)


Copyright © 2000-2010 PanEris. All Rights Reserved.