de.goerntkai.toolbox.cmdln
Class CommandLineFactory

java.lang.Object
  extended byde.goerntkai.toolbox.cmdln.CommandLineFactory

public abstract class CommandLineFactory
extends java.lang.Object

Creates CommandLines.

Logs in level CONFIG.

Invariants
log != null

Version:
$Id: CommandLineFactory.java,v 1.13 2007/05/23 12:16:52 GoerntKai Exp $
Author:
Kai Görnt

Method Summary
static CommandLine createCommandLine(java.lang.String[] theParameters, Folder theDirectory)
          Creates a CommandLine with the parameters given in the command line.
static CommandLine createCommandLine(java.lang.String theCommando, java.lang.String[] theParameters, Folder theDirectory)
          Creates a CommandLine with the parameters given in the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createCommandLine

public static CommandLine createCommandLine(java.lang.String theCommando,
                                            java.lang.String[] theParameters,
                                            Folder theDirectory)
                                     throws java.io.FileNotFoundException,
                                            HelpTextException

Creates a CommandLine with the parameters given in the command line. The commando must be given as a seperate argument.

Preconditions
theCommando != null
theParameters != null
theDirectory != null
Postconditions
result != null

Parameters:
theCommando - itself
theParameters - of the command line
theDirectory - where to find the help document in
Returns:
a new CommandLine based on the command line
Throws:
java.io.FileNotFoundException - when the help document was not found
HelpTextException - when the help document is invalid

createCommandLine

public static CommandLine createCommandLine(java.lang.String[] theParameters,
                                            Folder theDirectory)
                                     throws java.io.FileNotFoundException,
                                            HelpTextException

Creates a CommandLine with the parameters given in the command line. The first parameter is expected to be the commando itself.

Preconditions
theParameters != null
theParameters.length > 0
theDirectory != null
Postconditions
result != null

Parameters:
theParameters - of the command line
theDirectory - where to find the help document in
Returns:
a new CommandLine based on the command line
Throws:
java.io.FileNotFoundException - when the help document was not found
HelpTextException - when the help document is invalid


Copyright © 2004-2007 Kai Görnt. All Rights Reserved.