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

java.lang.Objectorg.jomc.cli.commands.AbstractJomcCommand
@Generated(value="org.jomc.tools.JavaSources",
comments="See http://jomc.sourceforge.net/jomc/1.0-alpha-11/jomc-tools")
public abstract class AbstractJomcCommand
Base JOMC Command implementation.
Specifications
org.jomc.cli.Command 1.0 MultitonProperties
abbreviatedCommandName"
Property of typejava.lang.String.Abbreviated name of the command.
classpathOptionLongName"
Property of typejava.lang.String.Long name of the 'classpath' option.
classpathOptionShortName"
Property of typejava.lang.String.Name of the 'classpath' option.
commandName"
Property of typejava.lang.String.Name of the command.
documentsOptionLongName"
Property of typejava.lang.String.Long name of the 'documents' option.
documentsOptionShortName"
Property of typejava.lang.String.Name of the 'documents' option.
moduleLocationOptionLongName"
Property of typejava.lang.String.Long name of the 'module-location' option.
moduleLocationOptionShortName"
Property of typejava.lang.String.Name of the 'module-location' option.
moduleNameOptionLongName"
Property of typejava.lang.String.Long name of the 'module' option.
moduleNameOptionShortName"
Property of typejava.lang.String.Name of the 'module' option.
noClasspathResolutionOptionLongName"
Property of typejava.lang.String.Long name of the 'no-classpath-resolution' option.
noClasspathResolutionOptionShortName"
Property of typejava.lang.String.Name of the 'no-classpath-resolution' option.
Dependencies
Locale"
Dependency on java.util.Locale at specification level 1.1 bound to an instance.Messages
applicationTitle"| English: | JOMC Version 1.0-alpha-11 Build 2009-12-07T02:58:52+0000 |
cannotProcess"| English: | Cannot process ''{0}'': {1} |
| Deutsch: | Kann ''{0}'' nicht verarbeiten: {1} |
classpathElement"| English: | Classpath element: ''{0}'' |
| Deutsch: | Klassenpfad-Element: ''{0}'' |
classpathOption"| English: | Classpath elements separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding classpath elements. |
| Deutsch: | Klassenpfad-Elemente mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Klassenpfad-Elementen. |
classpathOptionArgName"| English: | elements |
| Deutsch: | Elemente |
defaultLogLevelInfo"| English: | Default log level: ''{0}'' |
| Deutsch: | Standard-Protokollierungsstufe: ''{0}'' |
documentFile"| English: | Document file: ''{0}'' |
| Deutsch: | Dokument-Datei: ''{0}'' |
documentsOption"| English: | Document filenames separated by ''{0}''. If starting with a ''@'' character, a file name of a file holding document filenames. |
| Deutsch: | Dokument-Dateinamen mit ''{0}'' getrennt. Wenn mit ''@'' beginnend, Dateiname einer Textdatei mit Dokument-Dateinamen. |
documentsOptionArgName"| English: | files |
| Deutsch: | Dateien |
invalidModel"| English: | Invalid model. |
| Deutsch: | Ungültiges Modell. |
longDescription"| English: | |
| Deutsch: |
missingModule"| English: | Module ''{0}'' not found. |
| Deutsch: | Modul ''{0}'' nicht gefunden. |
moduleLocationOption"| English: | Location of classpath modules. |
| Deutsch: | Ort der Klassenpfad-Module. |
moduleLocationOptionArgName"| English: | location |
| Deutsch: | Ort |
moduleNameOption"| English: | Name of the module to process. |
| Deutsch: | Name des zu verarbeitenden Moduls. |
moduleNameOptionArgName"| English: | name |
| Deutsch: | Name |
modulesReport"| English: | Modules |
| Deutsch: | Module |
noClasspathResolutionOption"| English: | Do not perform classpath resolution. |
| Deutsch: | Keine Klassenpfad-Auflösung durchführen. |
separator"| English: | -------------------------------------------------------------------------------- |
shortDescription"| English: | Does nothing. |
| Deutsch: | Führt nichts aus. |
startingModuleProcessing"| English: | Executing command {0} with module ''{1}'' ... |
| Deutsch: | Führt Befehl {0} mit Modul ''{1}'' aus ... |
startingProcessing"| English: | Executing command {0} ... |
| Deutsch: | Führt Befehl {0} aus ... |
toolFailure"| English: | {0} failure. |
| Deutsch: | {0} fehlgeschlagen. |
toolSuccess"| English: | {0} successful. |
| Deutsch: | {0} erfolgreich. |
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jomc.cli.Command |
|---|
Command.Listener |
| Field Summary |
|---|
| Fields inherited from interface org.jomc.cli.Command |
|---|
STATUS_FAILURE, STATUS_SUCCESS |
| Constructor Summary | |
|---|---|
AbstractJomcCommand()
Creates a new AbstractJomcCommand instance. |
|
| Method Summary | |
|---|---|
int |
execute(org.apache.commons.cli.CommandLine commandLine)
Executes the command. |
protected abstract int |
executeCommand(org.apache.commons.cli.CommandLine commandLine)
|
String |
getAbbreviatedName()
Gets the abbreviated name of the command. |
protected ClassLoader |
getClassLoader(org.apache.commons.cli.CommandLine commandLine)
|
protected org.apache.commons.cli.Option |
getClasspathOption()
|
static Level |
getDefaultLogLevel()
Gets the default log level events are logged at. |
protected Set<File> |
getDocumentFiles(org.apache.commons.cli.CommandLine commandLine)
|
protected org.apache.commons.cli.Option |
getDocumentsOption()
|
protected org.jomc.tools.JavaBundles |
getJavaBundles()
|
protected org.jomc.tools.JavaClasses |
getJavaClasses()
|
protected org.jomc.tools.JavaSources |
getJavaSources()
|
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. |
protected org.jomc.model.ModelManager |
getModelManager()
|
protected org.jomc.model.ModelObjectValidator |
getModelObjectValidator()
|
protected org.apache.commons.cli.Option |
getModuleLocationOption()
|
protected org.apache.commons.cli.Option |
getModuleNameOption()
|
protected org.jomc.model.Modules |
getModules(org.apache.commons.cli.CommandLine commandLine)
|
String |
getName()
Gets the name of the command. |
protected org.apache.commons.cli.Option |
getNoClasspathResolutionOption()
|
org.apache.commons.cli.Options |
getOptions()
Gets the options of the command. |
String |
getShortDescription(Locale locale)
Gets the short description of the command. |
protected boolean |
isLoggable(Level level)
Checks if a message at a given level is provided to the listeners of the instance. |
protected void |
log(Level level,
String message,
Throwable throwable)
Notifies registered listeners. |
protected void |
log(org.jomc.model.ModelObjectValidationReport validationReport,
javax.xml.bind.Marshaller marshaller)
|
static void |
setDefaultLogLevel(Level value)
Sets the default log level events are logged at. |
void |
setLogLevel(Level value)
Sets the log level of the instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@Generated(value="org.jomc.tools.JavaSources",
comments="See http://jomc.sourceforge.net/jomc/1.0-alpha-11/jomc-tools")
public AbstractJomcCommand()
AbstractJomcCommand instance.
| Method Detail |
|---|
public List<Command.Listener> getListeners()
This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make
to the returned list will be present inside the object. This is why there is no set method for the
listeners property.
getListeners in interface Commandlog(java.util.logging.Level, java.lang.String, java.lang.Throwable)public static Level getDefaultLogLevel()
The default log level is controlled by system property
org.jomc.cli.command.AbstractJomcCommand.defaultLogLevel holding the log level to log events at by
default. If that property is not set, the WARNING default is returned.
getLogLevel(),
Level.parse(java.lang.String)public static void setDefaultLogLevel(Level value)
value - The new default level events are logged at or null.getDefaultLogLevel()public Level getLogLevel()
getLogLevel in interface CommandgetDefaultLogLevel(),
setLogLevel(java.util.logging.Level),
isLoggable(java.util.logging.Level)public void setLogLevel(Level value)
setLogLevel in interface Commandvalue - The new log level of the instance or null.getLogLevel(),
isLoggable(java.util.logging.Level)public String getName()
Command
getName in interface Commandpublic String getAbbreviatedName()
Command
getAbbreviatedName in interface Commandpublic String getShortDescription(Locale locale)
Command
getShortDescription in interface Commandlocale - The locale of the short description to return.
public String getLongDescription(Locale locale)
Command
getLongDescription in interface Commandlocale - The locale of the long description to return.
public org.apache.commons.cli.Options getOptions()
Command
getOptions in interface Commandpublic final int execute(org.apache.commons.cli.CommandLine commandLine)
Command
execute in interface CommandcommandLine - Command line to execute.
Command.STATUS_SUCCESS,
Command.STATUS_FAILURE
protected abstract int executeCommand(org.apache.commons.cli.CommandLine commandLine)
throws Exception
Exceptionprotected boolean isLoggable(Level level)
level - The level to test.
true if messages at level are provided to the listeners of the instance;
false if messages at level are not provided to the listeners of the instance.
NullPointerException - if level is null.getLogLevel(),
setLogLevel(java.util.logging.Level)
protected void log(Level level,
String message,
Throwable throwable)
level - The level of the event.message - The message of the event or null.throwable - The throwable of the event null.
NullPointerException - if level is null.getListeners(),
isLoggable(java.util.logging.Level)
protected void log(org.jomc.model.ModelObjectValidationReport validationReport,
javax.xml.bind.Marshaller marshaller)
throws javax.xml.bind.JAXBException
javax.xml.bind.JAXBExceptionprotected org.jomc.model.ModelManager getModelManager()
protected org.jomc.model.ModelObjectValidator getModelObjectValidator()
protected org.jomc.tools.JavaBundles getJavaBundles()
protected org.jomc.tools.JavaClasses getJavaClasses()
protected org.jomc.tools.JavaSources getJavaSources()
protected org.apache.commons.cli.Option getClasspathOption()
protected org.apache.commons.cli.Option getDocumentsOption()
protected org.apache.commons.cli.Option getModuleLocationOption()
protected org.apache.commons.cli.Option getModuleNameOption()
protected org.apache.commons.cli.Option getNoClasspathResolutionOption()
protected ClassLoader getClassLoader(org.apache.commons.cli.CommandLine commandLine)
throws IOException
IOException
protected Set<File> getDocumentFiles(org.apache.commons.cli.CommandLine commandLine)
throws IOException
IOException
protected org.jomc.model.Modules getModules(org.apache.commons.cli.CommandLine commandLine)
throws IOException,
SAXException,
javax.xml.bind.JAXBException
IOException
SAXException
javax.xml.bind.JAXBException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||