org.stanwood.media.info
Class CLIMediaFileInformation

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

public class CLIMediaFileInformation
extends AbstractLauncher

This is a CLI application used to print media file information.

It has the following usage: usage: mm-media-file-info [-h] [-c ] [-l ] --version, -v Display the version --config_file, -c The location of the config file. If not present, attempts to load it from ~/.mediaManager/mediamanager-conf.xml or /etc/mediamanager-conf.xml --log_config, -l The log config mode [||] --help, -h Show the help *


Constructor Summary
CLIMediaFileInformation(IExitHandler exitHandler)
          The constructor
 
Method Summary
static void main(java.lang.String[] args)
          The entry point to the application.
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.
 
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, 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
 

Constructor Detail

CLIMediaFileInformation

public CLIMediaFileInformation(IExitHandler exitHandler)
The constructor

Parameters:
exitHandler - the exit handler
Method Detail

processOptions

protected boolean processOptions(java.lang.String[] args,
                                 org.apache.commons.cli.CommandLine cmd)
Description copied from class: AbstractLauncher
This is called to validate the tools CLI options. When this is called, the default options added by AbstractLauncher will already have been validated sucesfully.

Specified by:
processOptions in class AbstractLauncher
cmd - The command line options
Returns:
True, if the command line options verified successfully, otherwise false

run

protected boolean run()
Description copied from class: BaseLauncher
This is executed to make the tool perform its function and should be extended.

Specified by:
run in class BaseLauncher
Returns:
True if executed without problems, otherwise false

main

public static void main(java.lang.String[] args)
The entry point to the application. For details see the class documentation.

Parameters:
args - The arguments.

printUsage

protected void printUsage(org.apache.commons.cli.Options options,
                          java.io.PrintStream stdout,
                          java.io.PrintStream stderr)
Overrides:
printUsage in class BaseLauncher