|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.toolforge.karma.core.cmd.CommandLoader
Loads command-descriptors from an XML
-file. The default filename
is commands.xml
, which should be available in the classpath. It should have been shipped with
the Karma Core release jar-file.
Field Summary | |
static java.lang.String |
COMMAND_PLUGINS_DIR
Directory where plugins are located. |
static java.lang.String |
CORE_COMMANDS_FILE
File name for core commands. |
static java.lang.String |
DEFAULT_COMMANDS_BASEDIR
Default filename for the command descriptor file |
static java.lang.String |
PLUGIN_COMMANDS_FILE
File name for plugin commands definitions. |
Method Summary | |
static CommandLoader |
getInstance()
Gets the singleton instance of the CommandLoader . |
(package private) CommandDescriptorMap |
load()
Loads command xml files from a predefined base directory. |
(package private) CommandDescriptorMap |
load(java.net.URL resource)
Loads the xml file containing command descriptors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String DEFAULT_COMMANDS_BASEDIR
public static final java.lang.String CORE_COMMANDS_FILE
public static final java.lang.String COMMAND_PLUGINS_DIR
public static final java.lang.String PLUGIN_COMMANDS_FILE
Method Detail |
public static CommandLoader getInstance()
CommandLoader
.
CommandLoader
.CommandDescriptorMap load() throws CommandLoadException
DEFAULT_COMMANDS_BASEDIR
, relative to the runtime classpath. Core commands are considered to be in
core-commands.xml
. The rest of the commands are located in plugin directories on the classpath.
CommandLoadException
CommandDescriptorMap load(java.net.URL resource) throws CommandLoadException
Loads the xml
file containing command descriptors.
resource
- The resource url to a command xml
file. Use
load()
to use the default settings.
List
of CommandDescriptor
instances.
CommandLoadException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |