org.stanwood.media.cli.manager
Class CLIMediaManager

java.lang.Object
  extended by org.stanwood.media.cli.BaseLauncher
      extended by org.stanwood.media.cli.AbstractLauncher
          extended by org.stanwood.media.cli.manager.CLIMediaManager
All Implemented Interfaces:
ICLICommand

public class CLIMediaManager
extends AbstractLauncher

This is a command line launcher that is used to managed a media directory. It reads the configuration file to work out which sources, stores and actions are to be used with media directory. Then the actions are performed on the media directory.

It has the following usage: usage: mm-manager [-c ] -d [-h] [-l ] [-t] [-u] [-v] --version, -v Display the version --noupdate, -u If this option is present, then the XBMC addons won't be updated --dir, -d The directory to look for media. If not present use the current directory. --test, -t If this option is present, then no changes are performed. --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


Method Summary
static void main(java.lang.String[] args)
          The entry point
protected  boolean processOptions(java.lang.String[] args, org.apache.commons.cli.CommandLine cmd)
          Used to check the CLI options are valid
protected  boolean run()
          This does the actual work of the tool.
 
Methods inherited from class org.stanwood.media.cli.AbstractLauncher
getController, parseLongOption, processOptionsInternal, setConfig
 
Methods inherited from class org.stanwood.media.cli.BaseLauncher
addOption, checkSubCommand, displayHelp, doExit, fatal, fatal, getName, getOptions, getStderr, getStdout, handleBadSubCommandOption, info, init, launch, printOptions, printUsage, shouldDisplayHelp, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.stanwood.media.cli.ICLICommand
getName
 

Method Detail

main

public static void main(java.lang.String[] args)
The entry point

It has the following usage: usage: mm-manager [-c ] -d [-h] [-l ] [-t] [-u] --noupdate, -u If this option is present, then the XBMC addons won't be updated --dir, -d The directory to look for media. If not present use the current directory. --test, -t If this option is present, then no changes are performed. --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

Parameters:
args - The arguments

run

protected boolean run()
This does the actual work of the tool.

Specified by:
run in class BaseLauncher
Returns:
true if successful, otherwise false.

processOptions

protected boolean processOptions(java.lang.String[] args,
                                 org.apache.commons.cli.CommandLine cmd)
Used to check the CLI options are valid

Specified by:
processOptions in class AbstractLauncher
Parameters:
cmd - The CLI options
Returns:
true if valid, otherwise false.