org.jaffa.tools.build
Class ConfigFileUpdate

java.lang.Object
  extended byorg.jaffa.tools.build.ConfigFileUpdate

public class ConfigFileUpdate
extends Object

This will update the input configFile re-writing with the contents of fragment files from the searchpath. The configFile will be decomposed. The key for each GuardedBlock will correspond to the name of a particular type of fragment file. The fragment files will be searched in the input searchpath (the classpath will be used, if no searchpath is specified). The non-GuardedBlocks of the input file will be left as is.


Constructor Summary
ConfigFileUpdate()
           
 
Method Summary
static void main(String[] args)
          This will invoke the performMerge method, passing the input arguments.
static void performMerge(String configFileName)
          Updates a config file with fragments for each of the guarded block.
static void performMerge(String configFileName, String searchPath)
          Updates a config file with fragments for each of the guarded block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigFileUpdate

public ConfigFileUpdate()
Method Detail

performMerge

public static void performMerge(String configFileName)
                         throws IOException,
                                SourceDecomposerException,
                                URISyntaxException,
                                MalformedURLException
Updates a config file with fragments for each of the guarded block. This will use the classpath to search the fragments.

Parameters:
configFileName - The configuration file, relative to the classpath.
Throws:
IOException - if any IO error occurs.
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.
URISyntaxException - if the input configFileName is an invalid URI.
MalformedURLException - if the input configFileName is an invalid URL.

performMerge

public static void performMerge(String configFileName,
                                String searchPath)
                         throws IOException,
                                SourceDecomposerException,
                                URISyntaxException,
                                MalformedURLException
Updates a config file with fragments for each of the guarded block.

Parameters:
configFileName - The configuration file, relative to the classpath.
searchPath - The path to be used for searching the fragment files.
Throws:
IOException - if any IO error occurs.
SourceDecomposerException - if the file is malformed or if it cannot be decomposed.
URISyntaxException - if the input configFileName is an invalid URI.
MalformedURLException - if the input configFileName is an invalid URL.

main

public static void main(String[] args)
This will invoke the performMerge method, passing the input arguments.

Parameters:
args - the command line arguments. The first argument will be the ConfigFileName relative to ClassPath. The optional second argument will be the search path.


Copyright © 2002-2004 JAFFA Project.