org.oddjob
Class Main

java.lang.Object
  extended by org.oddjob.Main

public class Main
extends Object

This is a very simple wrapper around Oddjob with a main method.

Author:
Rob Gordon

Field Summary
static String ODDBALLS_DIR
           
static String USER_PROPERTIES
           
 
Constructor Summary
Main()
           
 
Method Summary
 void configureLog(String logConfigFileName)
          Configure logging from a log file.
 File findFileToUse(String oddjobFile, String oddjobHome)
          Work out which file to use
 OddjobRunner init(String[] args)
          Parse the command args and configure Oddjob.
static void main(String[] args)
          The main.
protected  Properties processUserProperties()
          Process the properties in oddjob.properties in the users home directory.
protected  ArooaDescriptorFactory resolveOddballs(String oddballsPath, File oddballsDir)
           
 void usage()
          Display usage info.
 void version()
          Display version info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ODDBALLS_DIR

public static final String ODDBALLS_DIR
See Also:
Constant Field Values

USER_PROPERTIES

public static final String USER_PROPERTIES
See Also:
Constant Field Values
Constructor Detail

Main

public Main()
Method Detail

init

public OddjobRunner init(String[] args)
                  throws IOException
Parse the command args and configure Oddjob.

Parameters:
args - The args.
Returns:
A configured and ready to run Oddjob.
Throws:
FileNotFoundException
IOException

resolveOddballs

protected ArooaDescriptorFactory resolveOddballs(String oddballsPath,
                                                 File oddballsDir)

configureLog

public void configureLog(String logConfigFileName)
Configure logging from a log file.

Parameters:
logConfigFileName - The log file name.

usage

public void usage()
Display usage info.


version

public void version()
Display version info.


findFileToUse

public File findFileToUse(String oddjobFile,
                          String oddjobHome)
                   throws FileNotFoundException
Work out which file to use

Parameters:
oddjobFile -
Returns:
Throws:
FileNotFoundException

processUserProperties

protected Properties processUserProperties()
                                    throws IOException
Process the properties in oddjob.properties in the users home directory.

Returns:
The properties. Null if there aren't any.
Throws:
IOException

main

public static void main(String[] args)
                 throws IOException
The main.

Parameters:
args - The command line args.
Throws:
FileNotFoundException
IOException