|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.compatibility.base.application.spi.CommandOptions_1
public class CommandOptions_1
Command option parser
| Nested Class Summary | |
|---|---|
static interface |
CommandOptions_1.Declarator
Deprecated. The command option declarator interface |
static class |
CommandOptions_1.Option
Deprecated. |
static class |
CommandOptions_1.Parameter
Deprecated. |
static class |
CommandOptions_1.SystemProperty
Deprecated. |
| Field Summary | |
|---|---|
protected String[] |
commandArguments
Deprecated. The command arguments are retrieved upon activation. |
protected LongOpt[] |
longOptions
Deprecated. The long options are constructed upon activation |
protected List |
optionDeclaration
Deprecated. A declarator array defining the supported options. |
static String |
PARAMETER_ID
Deprecated. The parameters are stored as options without long equivalent. |
protected CommandOptions_1.Parameter[] |
parameterDeclaration
Deprecated. A declarator array defining the supported parameters. |
protected String |
shortOptions
Deprecated. The short options are constructed upon activation. |
protected List |
systemPropertyDeclaration
Deprecated. A declarator array defining the required system properties. |
protected CharSequence |
usageDetails
Deprecated. The usage notes to be displayed in case of erroneous arguments or help requests are constructed upon activation. |
protected String |
usageLabel
Deprecated. The usage notes tag, e.g. |
protected CharSequence |
usageSummary
Deprecated. The usage notes to be displayed in case of erroneous arguments or help requests are constructed upon activation. |
| Constructor Summary | |
|---|---|
CommandOptions_1(Class main,
CommandOptions_1.Declarator declarator)
Deprecated. Client constructor |
|
CommandOptions_1(String usageLabel,
String usageStart,
CommandOptions_1.Declarator declarator)
Deprecated. Basic constructor |
|
| Method Summary | |
|---|---|
void |
activate()
Deprecated. The activate method initializes a layer or component. |
void |
deactivate()
Deprecated. The deactivate method releases a layer or component. |
Configuration |
getOptions()
Deprecated. Get the command options. |
String[] |
getParameters()
Deprecated. Get the parameters. |
boolean |
isExecutable()
Deprecated. Define whether the applications task should be executed or not. |
Getopt |
newGetopt(String progname)
Deprecated. Option parser |
protected void |
processCommandArguments()
Deprecated. An exception is raised if the actual arguments do not match the declarations. |
protected void |
processSystemProperties()
Deprecated. An exception is raised if the actual system do not match the declarations. |
static List |
standardOptions()
Deprecated. The standard options The option declaration passed to the CommandOption_1 constructor should be extended if additional options are acceptable. |
static List |
standardSystemProperties()
Deprecated. The standard system properties may be extended by an application framework subclass. |
String |
toString()
Deprecated. Get a string representation for log purposes |
String |
toStringFormatted()
Deprecated. Get a string representation for log purposes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PARAMETER_ID
protected final List systemPropertyDeclaration
protected final CommandOptions_1.Parameter[] parameterDeclaration
protected final List optionDeclaration
protected final String usageLabel
protected final CharSequence usageSummary
protected final CharSequence usageDetails
protected String[] commandArguments
activate()protected String shortOptions
protected LongOpt[] longOptions
| Constructor Detail |
|---|
public CommandOptions_1(String usageLabel,
String usageStart,
CommandOptions_1.Declarator declarator)
usageLabel - Usage tagusageStart - Initial usage summarydeclarator - To declare the command options
public CommandOptions_1(Class main,
CommandOptions_1.Declarator declarator)
main - the main classdeclarator - To declare the command options| Method Detail |
|---|
public static List standardSystemProperties()
public List standardSystemProperties () {
final List properties = super.standardSystemProperties();
// If a BasicException.Parameter's value is fixed
properties.add (
new CommandOptions_1.SystemProperty (
"propertyName",
"value"
)
);
...
// If the BasicException.Parameter is mandatory but its value free
properties.add (
new CommandOptions_1.SystemProperty (
"anotherPropertyName",
"another BasicException.Parameter's default value",
"The system BasicException.Parameter «anotherPropertyName» is required"
)
);
...
return properties;
}
Note: This method may be called before the object's activation is completed.
public static List standardOptions()
public List optionDeclaration () {
final List options = CommandOptions_1.standardOptions();
options.add(new CommandOptions_1.Option(«1st option»));
options.add(new CommandOptions_1.Option(«2nd option»));
...
return options;
}
public Getopt newGetopt(String progname)
progname - The name to display as the program name when
printing errors. Error message display will be
suppressed if progname is null.
public Configuration getOptions()
getOptions in interface CommandOptions_1_0public String[] getParameters()
getParameters in interface CommandOptions_1_0public boolean isExecutable()
isExecutable in interface CommandOptions_1_0public String toString()
toString in class Objectpublic String toStringFormatted()
public void activate()
throws Exception,
ServiceException
An exception is raised if the actual arguments do not match the declarations.
activate in interface Manageable_1_0Exception - the application framwork maps all java Exceptions
internally to standard ServiceExceptions.
ServiceException
public void deactivate()
throws Exception,
ServiceException
deactivate in interface Manageable_1_0Exception - the application framwork maps all java Exceptions
internally to standard ServiceExceptions.
ServiceException
protected void processSystemProperties()
throws ServiceException
ServiceException
protected void processCommandArguments()
throws ServiceException
ServiceException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||