public class CLIManageAddons extends AbstractLauncher
Modifier and Type | Field and Description |
---|---|
protected int |
subExitCode |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkArgs(org.apache.commons.cli.CommandLine cmd) |
protected java.lang.String |
checkSubCommand(java.lang.String arg) |
void |
displayHelp(org.apache.commons.cli.Options options,
java.io.PrintStream stdout,
java.io.PrintStream stderr)
Called to display the commands help
|
protected void |
handleBadSubCommandOption(org.apache.commons.cli.Options options,
java.lang.String arg) |
static void |
main(java.lang.String[] args)
This CLI launcher command is used to manage XBMC addons.
|
protected void |
printUsage(org.apache.commons.cli.Options options,
java.io.PrintStream stdout,
java.io.PrintStream stderr) |
protected boolean |
processOptions(java.lang.String[] args,
org.apache.commons.cli.CommandLine cmd)
This is called to validate the tools CLI options.
|
protected boolean |
run()
This is executed to make the tool perform its function and should be extended.
|
static void |
setExitHandler(IExitHandler handler)
Used to se a exit handler
|
static void |
setStderr(java.io.PrintStream stream)
Set the stderr that this command should use.
|
static void |
setStdout(java.io.PrintStream stream)
Set the stdout that this command should use.
|
getController, parseLongOption, processOptionsInternal, setConfig
addOption, doExit, fatal, fatal, getName, getOptions, getStderr, getStdout, info, init, launch, printOptions, shouldDisplayHelp, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
protected boolean run()
BaseLauncher
run
in class BaseLauncher
protected boolean processOptions(java.lang.String[] args, org.apache.commons.cli.CommandLine cmd)
AbstractLauncher
AbstractLauncher
will already have been
validated sucesfully.processOptions
in class AbstractLauncher
cmd
- The command line optionsprotected boolean checkArgs(org.apache.commons.cli.CommandLine cmd)
protected java.lang.String checkSubCommand(java.lang.String arg)
checkSubCommand
in class BaseLauncher
protected void handleBadSubCommandOption(org.apache.commons.cli.Options options, java.lang.String arg)
handleBadSubCommandOption
in class BaseLauncher
public void displayHelp(org.apache.commons.cli.Options options, java.io.PrintStream stdout, java.io.PrintStream stderr)
BaseLauncher
displayHelp
in class BaseLauncher
options
- The commands optionsstdout
- The standard output streamstderr
- The standard error streamprotected void printUsage(org.apache.commons.cli.Options options, java.io.PrintStream stdout, java.io.PrintStream stderr)
printUsage
in class BaseLauncher
public static void main(java.lang.String[] args)
This CLI launcher command is used to manage XBMC addons. It has sub commands and args listed below.
usage: mm-xbmc [--global-options] [--command-options] [arguments]
Global options:
--version, -v Display the version
--config_file, -c
The location of the config file. If not present, attempts to load it from /etc/mediamanager-conf.xml
--log_config, -l
The log config mode [||]
--help, -h Show the help
Commands:
list lists the installed XBMC addons
update Update the installed XBMC addons to the latest versions
install Install a new XBMC addon
remove Remove a installed XBMC addons
args
- The arguments passed to the program from the command linepublic static void setExitHandler(IExitHandler handler)
handler
- The exit handlerpublic static void setStdout(java.io.PrintStream stream)
stream
- The stdout streampublic static void setStderr(java.io.PrintStream stream)
stream
- The stderr stream