|
Carrot2 Framework
API Specification |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.dcs.AppBase
public abstract class AppBase
A base for command-line invoked applications.
BatchApp,
DCSApp| Field Summary | |
|---|---|
protected org.apache.commons.cli.Options |
cliOptions
Command line options. |
protected String |
header
Header text |
| Constructor Summary | |
|---|---|
protected |
AppBase(String appName)
Initializing constructor. |
protected |
AppBase(String appName,
String header)
Initializing constructor. |
| Method Summary | |
|---|---|
protected String |
getCommandName()
Override to provide command line app name. |
protected org.apache.log4j.Logger |
getLogger()
Returns the logger for this class. |
protected abstract void |
go(org.apache.commons.cli.CommandLine line)
Override and write your stuff using command line options. |
protected void |
go(String[] args)
Initializes application context. |
protected ControllerContext |
initializeContext(File descriptorsDir)
Initializes the processing context. |
protected abstract void |
initializeOptions(org.apache.commons.cli.Options options)
Override and initialize options. |
protected void |
printHeader()
Prints header text (if not blank). |
protected void |
printUsage()
Prints usage (options). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.apache.commons.cli.Options cliOptions
protected final String header
| Constructor Detail |
|---|
protected AppBase(String appName)
appName - Application name (used in help and logger naming).
protected AppBase(String appName,
String header)
appName - Application name (used in help and logger naming).header - Header text to be appended before options help| Method Detail |
|---|
protected final void go(String[] args)
protected ControllerContext initializeContext(File descriptorsDir)
throws ConfigurationException
descriptorsDir - A directory with definitions of processes and descriptors.
ConfigurationException - if the configuration fails for some reason.protected void printHeader()
protected void printUsage()
protected abstract void go(org.apache.commons.cli.CommandLine line)
throws Exception
Exceptionprotected abstract void initializeOptions(org.apache.commons.cli.Options options)
protected String getCommandName()
protected final org.apache.log4j.Logger getLogger()
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||