|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

@Generated(value="org.jomc.tools.JavaSources",
comments="See http://jomc.sourceforge.net/jomc/1.0-alpha-11/jomc-tools")
public interface CommandCommand.
This specification declares a multiplicity of Many.
An application assembler may provide multiple implementations of this specification (including none).
Use of class ObjectManager is supported for getting these implementations or for
selecting a single implementation.
Command[] objects = (Command[]) ObjectManagerFactory.getObjectManager( getClassLoader() ).getObject( Command.class ); Command object = ObjectManagerFactory.getObjectManager( getClassLoader() ).getObject( Command.class, "implementation name" );
This specification does not apply to any scope. A new object is returned whenever requested.
| Nested Class Summary | |
|---|---|
static interface |
Command.Listener
Listener interface. |
| Field Summary | |
|---|---|
static int |
STATUS_FAILURE
Status code when the command failed. |
static int |
STATUS_SUCCESS
Status code when the command completed successfully. |
| Method Summary | |
|---|---|
int |
execute(org.apache.commons.cli.CommandLine commandLine)
Executes the command. |
String |
getAbbreviatedName()
Gets the abbreviated name of the command. |
List<Command.Listener> |
getListeners()
Gets the list of registered listeners. |
Level |
getLogLevel()
Gets the log level of the instance. |
String |
getLongDescription(Locale locale)
Gets the long description of the command. |
String |
getName()
Gets the name of the command. |
org.apache.commons.cli.Options |
getOptions()
Gets the options of the command. |
String |
getShortDescription(Locale locale)
Gets the short description of the command. |
void |
setLogLevel(Level value)
Sets the log level of the instance. |
| Field Detail |
|---|
static final int STATUS_SUCCESS
static final int STATUS_FAILURE
| Method Detail |
|---|
List<Command.Listener> getListeners()
Level getLogLevel()
setLogLevel(java.util.logging.Level)void setLogLevel(Level value)
value - The new log level of the instance or null.getLogLevel()String getName()
String getAbbreviatedName()
String getShortDescription(Locale locale)
throws NullPointerException
locale - The locale of the short description to return.
NullPointerException - if locale is null.
String getLongDescription(Locale locale)
throws NullPointerException
locale - The locale of the long description to return.
NullPointerException - if locale is null.org.apache.commons.cli.Options getOptions()
int execute(org.apache.commons.cli.CommandLine commandLine)
throws NullPointerException
commandLine - Command line to execute.
NullPointerException - if commandLine is null.STATUS_SUCCESS,
STATUS_FAILURE
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||