ch.sahits.codegen.wizards
Class HeadlessArtefactGenerator

java.lang.Object
  extended by ch.sahits.codegen.wizards.HeadlessArtefactGenerator

public class HeadlessArtefactGenerator
extends java.lang.Object

This class provides an entry point for a headless code generation. This means no UI component is needed for the generation since all arguments are passed through the command line or their respective setter/builder methods

Since:
2.1.0
Author:
Andi Hotz, Sahits GmbH

Constructor Summary
HeadlessArtefactGenerator()
           
 
Method Summary
static void main(java.lang.String[] args)
          Main method initializing the the artifact generator
 void run(java.lang.String[] args)
          Initializing and generating an artifact
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeadlessArtefactGenerator

public HeadlessArtefactGenerator()
Method Detail

main

public static void main(java.lang.String[] args)
Main method initializing the the artifact generator

Parameters:
args - run(String[])

run

public void run(java.lang.String[] args)
         throws java.io.FileNotFoundException,
                java.io.IOException,
                java.lang.ClassNotFoundException,
                CoreException,
                JDOMException
Initializing and generating an artifact

Parameters:
args - Array of arguments:
  • -s: Store the configuration in an XML file instead of generating
  • XML name: mandatory with -s
  • Output location: mandatory (-o)
  • Output file name: mandatory (-f)
  • Input method: mandatory (-m)
  • DB product: optional (-p)
  • Input file: optional (-i)
  • Code generator: mandatory (-g)
Or:
  • help: for printing the usage message
Or:
  • -l
  • Path to a serialized XML configuration
Throws:
java.io.FileNotFoundException - File could not be found
java.io.IOException - File could not be read
java.lang.ClassNotFoundException - Class not found on the class path
CoreException - some other exception
JDOMException