org.apache.velocity.convert
Class WebMacro

java.lang.Object
  extended by org.apache.velocity.convert.WebMacro

public class WebMacro
extends Object

This class will convert a WebMacro template to a Velocity template. Uses the ORO Regexp package to do the rewrites. Note, it isn't 100% perfect, but will definitely get you about 99.99% of the way to a converted system. Please see the website documentation for more information on how to use this class.

Version:
$Id: WebMacro.java 463298 2006-10-12 16:10:32Z henning $
Author:
Jason van Zyl, Daniel Rall

Field Summary
protected static String[] perLineREs
          The regexes to use for line by line substition.
protected static String VM_EXT
           
protected static String WM_EXT
           
 
Constructor Summary
WebMacro()
           
 
Method Summary
 void convert(String target)
          Iterate through the set of find/replace regexes that will convert a given WM template to a VM template
 String convertTemplate(String template)
          Apply find/replace regexes to our WM template
static void main(String[] args)
          Main hook for the conversion process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VM_EXT

protected static final String VM_EXT
See Also:
Constant Field Values

WM_EXT

protected static final String WM_EXT
See Also:
Constant Field Values

perLineREs

protected static String[] perLineREs
The regexes to use for line by line substition. The regexes come in pairs. The first is the string to match, the second is the substitution to make.

Constructor Detail

WebMacro

public WebMacro()
Method Detail

convert

public void convert(String target)
Iterate through the set of find/replace regexes that will convert a given WM template to a VM template

Parameters:
target -

convertTemplate

public String convertTemplate(String template)
Apply find/replace regexes to our WM template

Parameters:
template -
Returns:
Returns the template with all regexprs applied.

main

public static void main(String[] args)
Main hook for the conversion process.

Parameters:
args -


Copyright © 2000-2008 The Apache Software Foundation. All Rights Reserved.