toolbox.confgen
Class ConfGenerator

Package class diagram package ConfGenerator
java.lang.Object
  extended by toolbox.confgen.ConfGenerator

public class ConfGenerator
extends java.lang.Object

Utility to generate Toolbox API configuration properties and XML documents using the FreeMarker Template Engine.


Constructor Summary
ConfGenerator()
          Default constructor
ConfGenerator(java.lang.String templateDir, java.lang.String module)
          Create a new ConfGenerator.
 
Method Summary
 void generate(java.util.Properties props, java.lang.String template, java.lang.String outFile, java.lang.String outDir)
          Generate the required configuration.
 void generate(java.lang.String template, java.lang.String outFile, java.lang.String outDir)
          Generate the required configuration interactively.
 void listModules()
          List available configuration modules
static void main(java.lang.String[] args)
          Application starting point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfGenerator

public ConfGenerator()
Default constructor


ConfGenerator

public ConfGenerator(java.lang.String templateDir,
                     java.lang.String module)
              throws ConfGenException
Create a new ConfGenerator.

Parameters:
templateDir - Template loading directory
module - Name of configuration module to load.
Throws:
ConfGenException - if the generator cannot be created.
Method Detail

generate

public void generate(java.util.Properties props,
                     java.lang.String template,
                     java.lang.String outFile,
                     java.lang.String outDir)
              throws ConfGenException
Generate the required configuration.

Parameters:
props - Module properties. properties.
template - Name of template to use.
outFile - The output file name.
outDir - The output directory.
Throws:
ConfGenException

generate

public void generate(java.lang.String template,
                     java.lang.String outFile,
                     java.lang.String outDir)
              throws ConfGenException
Generate the required configuration interactively.

Parameters:
template - Name of template to use.
outFile - The output file.
outDir - The output directory.
Throws:
ConfGenException

listModules

public void listModules()
List available configuration modules


main

public static void main(java.lang.String[] args)
Application starting point.

Parameters:
args - Command line arguments.