public abstract class AppCmdLine
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
exitStatus
The value to return to the OS
|
static java.lang.String |
OPTION_DEBUG
command line option to turn on debugging
|
static java.lang.String |
OPTION_HELP
command line option help
|
static java.lang.String |
OPTION_HOME
command line option home
|
static java.lang.String |
OPTION_REMOTE_URL
command line option to set the remote URL
|
static java.lang.String |
PROPERTY_REMOTE_URL
the system property for the remote URL
|
| Constructor and Description |
|---|
AppCmdLine() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
abort(java.lang.String message,
java.lang.Exception exp)
abort the program
|
protected void |
abortShowHelp(java.lang.Exception e)
abort showing the help
|
protected void |
addExtraOptions(org.apache.commons.cli.Options options)
add extra command line options
|
void |
execute(java.lang.String[] args)
execute the program
|
void |
getExtraPars(java.util.Properties p)
Deprecated.
NO LONGER USED
|
void |
handleArgs(java.util.Properties p)
Deprecated.
NO LONGER USED
|
void |
handleCommandLine(org.apache.commons.cli.CommandLine line)
handle the command line args
|
void |
init()
init the program
|
abstract void |
process()
process ( extend this method)
|
static void |
setDefaults()
set up the defaults
|
void |
setExitFlg(boolean flag)
set exit or not flag
|
public static final java.lang.String OPTION_HELP
public static final java.lang.String OPTION_HOME
public static final java.lang.String OPTION_REMOTE_URL
public static final java.lang.String OPTION_DEBUG
public static final java.lang.String PROPERTY_REMOTE_URL
protected int exitStatus
public void execute(@Nonnull
java.lang.String[] args)
args - the argspublic void setExitFlg(boolean flag)
flag - the flagprotected void abort(@Nonnull
java.lang.String message,
@Nullable
java.lang.Exception exp)
message - the message to showexp - the exceptionprotected void abortShowHelp(@Nullable
java.lang.Exception e)
e - @Deprecated
public void getExtraPars(@Nonnull
java.util.Properties p)
p - the parameters@OverridingMethodsMustInvokeSuper
protected void addExtraOptions(@Nonnull
org.apache.commons.cli.Options options)
options - the options@OverridingMethodsMustInvokeSuper
public void init()
throws java.lang.Exception
java.lang.Exception - a serious problempublic abstract void process()
throws java.lang.Exception
java.lang.Exception - a serious problempublic static void setDefaults()
@Deprecated
public void handleArgs(@Nonnull
java.util.Properties p)
throws java.lang.Exception
p - the propertiesjava.lang.Exception - a serious problem@OverridingMethodsMustInvokeSuper
public void handleCommandLine(@Nonnull
org.apache.commons.cli.CommandLine line)
throws java.lang.Exception
line - the command linejava.lang.Exception - a serious problemstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.