public class RunTool extends BaseTool
Modifier and Type | Class and Description |
---|---|
static class |
RunTool.Actions
Enumeration of available actions
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_RUN
run action identifier
|
static org.apache.log4j.Logger |
log4j
log4j
|
Constructor and Description |
---|
RunTool()
Create QueueTool with default framework properties located by the system rdeck.base property.
|
RunTool(CLIToolLogger logger)
Create QueueTool specifying the logger
|
RunTool(DispatcherConfig dispatcherConfig,
CLIToolLogger logger) |
RunTool(IPropertyLookup frameworkProps)
Create QueueTool specifying the framework
|
RunTool(IPropertyLookup frameworkProps,
CLIToolLogger logger)
Create QueueTool with the framework.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(java.lang.String message)
Logs debug message via implementation specific log facility
|
void |
error(java.lang.String output)
Logs error message via implementation specific log facility
|
RunTool.Actions |
getAction()
Get action
|
java.lang.String |
getHelpString() |
java.lang.String |
getSingleProjectName() |
protected void |
go()
Call the action
|
protected boolean |
isUseHelpOption() |
void |
log(java.lang.String output)
Logs message via implementation specific log facility
|
static void |
main(java.lang.String[] args)
Creates an instance and executes
BaseTool.run(String[]) . |
org.apache.commons.cli.CommandLine |
parseArgs(java.lang.String[] args)
Reads the argument vector and constructs a
CommandLine object containing params |
void |
setAction(RunTool.Actions action)
Set action
|
void |
verbose(java.lang.String message)
Logs verbose message via implementation specific log facility
|
void |
warn(java.lang.String output)
Logs warning message via implementation specific log facility
|
addToolOptions, createDefaultDispatcherConfig, exit, getCentralDispatcher, getCommandLine, getOptions, help, initOptions, optionDisplayString, optionDisplayString, run, setCentralDispatcher, setShouldExit, validateOptions
public static final org.apache.log4j.Logger log4j
public static final java.lang.String ACTION_RUN
public RunTool()
public RunTool(CLIToolLogger logger)
logger
- the loggerpublic RunTool(IPropertyLookup frameworkProps)
public RunTool(IPropertyLookup frameworkProps, CLIToolLogger logger)
logger
- the loggerpublic RunTool(DispatcherConfig dispatcherConfig, CLIToolLogger logger)
public RunTool.Actions getAction()
public void setAction(RunTool.Actions action)
action
- the actionpublic java.lang.String getSingleProjectName()
public static void main(java.lang.String[] args) throws java.lang.Exception
BaseTool.run(String[])
.args
- command line arg vectorjava.lang.Exception
- action errorpublic org.apache.commons.cli.CommandLine parseArgs(java.lang.String[] args) throws CLIToolOptionsException
CommandLine
object containing paramsparseArgs
in interface CLITool
parseArgs
in class BaseTool
args
- the cli arg vectorCLIToolOptionsException
- if arguments are incorrectprotected void go() throws RunToolException, CLIToolOptionsException
go
in class BaseTool
RunToolException
- if an error occursCLIToolOptionsException
protected boolean isUseHelpOption()
isUseHelpOption
in class BaseTool
public java.lang.String getHelpString()
getHelpString
in class BaseTool
public void log(java.lang.String output)
BaseLogger
output
- message to logpublic void error(java.lang.String output)
BaseLogger
output
- message to logpublic void warn(java.lang.String output)
BaseLogger
output
- message to logpublic void verbose(java.lang.String message)
message
- message to logpublic void debug(java.lang.String message)
BaseLogger
message
- message to log