Forward Computing and Control Pty. Ltd.
WebStringTemplate V1.5.0

2004/1/7

au.com.forward.runWST
Class RunWST

java.lang.Object
  extended byau.com.forward.runWST.RunWST

public class RunWST
extends java.lang.Object

This is the Web Page Designer's test program for WebStringTemplates

Author:
matthew ford

Field Summary
static java.util.logging.Logger logger
          The Java logger for this class
static java.lang.String VERSION
          The version number 1.4
static java.lang.String VERSION_DATE
          The version date 15th Jan. 2004
 
Constructor Summary
RunWST()
           
 
Method Summary
static boolean copyFile(java.lang.String fromFileName, java.lang.String toFileName)
          Copies the from file to the to file.
static void main(java.lang.String[] args)
          The main method.
 void run(java.lang.String templateFileName, java.lang.String attributesFileName, java.lang.String outputFileName, java.lang.String startDelim, java.lang.String endDelim, long refreshDelay)
          Main processing method for the RunWST object
 void stopRun()
          Stops the program
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static final java.util.logging.Logger logger
The Java logger for this class


VERSION

public static final java.lang.String VERSION
The version number 1.4

See Also:
Constant Field Values

VERSION_DATE

public static final java.lang.String VERSION_DATE
The version date 15th Jan. 2004

See Also:
Constant Field Values
Constructor Detail

RunWST

public RunWST()
Method Detail

main

public static void main(java.lang.String[] args)
The main method.
Usage:
RunWST template
    uses inputs template.st.html template.data.html output.html
    or
RunWST template.st.html attributes.html output.html
    If output.html exists it will be renamed *.*.n before rewriting it.
    output.html will be continually updated every 2sec
    until q [Enter] or Ctrl-Z [Enter]
    are typed in or the Attribute Tree display is closed.

Parameters:
args - the program args

stopRun

public void stopRun()
Stops the program


run

public void run(java.lang.String templateFileName,
                java.lang.String attributesFileName,
                java.lang.String outputFileName,
                java.lang.String startDelim,
                java.lang.String endDelim,
                long refreshDelay)
         throws RunWSTException
Main processing method for the RunWST object

Parameters:
templateFileName - the template file name (with extension)
attributesFileName - the HTML data map file name (with extension)
outputFileName - the HTML output file name (with extension)
startDelim - the start delimiter
endDelim - the end delimiter
refreshDelay - the refreshDelay (in Sec), < 0 is set as 0
Throws:
RunWSTException - if it cannot write the error to the output file.

copyFile

public static boolean copyFile(java.lang.String fromFileName,
                               java.lang.String toFileName)
                        throws java.io.IOException
Copies the from file to the to file.

Parameters:
fromFileName - the name of the file to copy from
toFileName - the name of the file to copy to
Returns:
true if copy performed else false if fromFile is the same as toFile or some error occured
Throws:
java.io.IOException - thrown if error occured while copying
java.lang.IllegalArgumentException - thrown if to file or from file names are empty.
java.lang.NullPointerException - thrown if to file or from file names are null.

Forward Computing and Control Pty. Ltd.
WebStringTemplate V1.5.0

2004/1/7

Copyright ©2003, Forward Computing and Control Pty. Ltd
ACN 003 669 994   NSW Australia,   All Rights Reserved.
WebStringTemplate and associated code is released under licence. See the source.
WebStringTemplate uses code from StringTemplates and Antlr, under licence.
See the WebStringTemplate licence file for details.