com.synz.igor.parser
Class TemplateParser

java.lang.Object
  |
  +--com.synz.igor.parser.TemplateParser

public class TemplateParser
extends java.lang.Object
implements IgorConstants

This class is responsible for parsing templates.


Method Summary
static java.lang.StringBuffer parseTemplate(java.lang.String templateFile)
          Reads in the template file and returns it as a StringBuffer.
static java.lang.String replaceMacros(java.lang.String s, char c, java.util.Hashtable hashtable)
          Reads in the template file and returns it as a StringBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

parseTemplate

public static java.lang.StringBuffer parseTemplate(java.lang.String templateFile)
                                            throws java.io.IOException
Reads in the template file and returns it as a StringBuffer.
Returns:
StringBuffer - the contents of the template file

replaceMacros

public static java.lang.String replaceMacros(java.lang.String s,
                                             char c,
                                             java.util.Hashtable hashtable)
Reads in the template file and returns it as a StringBuffer.
Parameters:
String - s - the string containing the macros to be replaced
char - c - delimeter used, default is '%'
Hashtable - hashtable - Hashtable of the name value pairs to be replaced in template
Returns:
StringBuffer - the contents of the template file