org.stanwood.media.source.xbmc.cli
Class AbstractXBMCSubCommand

java.lang.Object
  extended by org.stanwood.media.cli.BaseLauncher
      extended by org.stanwood.media.cli.AbstractSubCLICommand
          extended by org.stanwood.media.source.xbmc.cli.AbstractXBMCSubCommand
All Implemented Interfaces:
ICLICommand
Direct Known Subclasses:
InstallCommand, ListCommand, RemoveCommand, UpdateCommand

public abstract class AbstractXBMCSubCommand
extends AbstractSubCLICommand

A base class for all XBMC releated commands


Constructor Summary
AbstractXBMCSubCommand(ICLICommand rootCommand, java.lang.String name, java.lang.String description, java.util.List<org.apache.commons.cli.Option> options, IExitHandler exitHandler, java.io.PrintStream stdout, java.io.PrintStream stderr)
          The constructor
 
Method Summary
protected  boolean checkNoArgs(org.apache.commons.cli.CommandLine cmd)
           
protected  IConsole getConsole()
           
protected  IXBMCUpdater getUpdater()
           
 void init(Controller controller)
          Called to setup stuff that depends on the controller
 
Methods inherited from class org.stanwood.media.cli.AbstractSubCLICommand
getDescription, getPrintArguments, printUsage, processOptions, processOptionsInternal
 
Methods inherited from class org.stanwood.media.cli.BaseLauncher
addOption, checkSubCommand, displayHelp, doExit, fatal, fatal, getName, getOptions, getStderr, getStdout, handleBadSubCommandOption, info, launch, printOptions, run, 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

AbstractXBMCSubCommand

public AbstractXBMCSubCommand(ICLICommand rootCommand,
                              java.lang.String name,
                              java.lang.String description,
                              java.util.List<org.apache.commons.cli.Option> options,
                              IExitHandler exitHandler,
                              java.io.PrintStream stdout,
                              java.io.PrintStream stderr)
The constructor

Parameters:
rootCommand - The parent command
name - The name of the sub command
description - The description of the sub command
options - The sub command options
stdout - The standard output stream
stderr - The standard error stream
exitHandler - The exit handler
Method Detail

init

public void init(Controller controller)
Called to setup stuff that depends on the controller

Overrides:
init in class BaseLauncher
Parameters:
controller - The controller

getConsole

protected IConsole getConsole()

getUpdater

protected IXBMCUpdater getUpdater()

checkNoArgs

protected boolean checkNoArgs(org.apache.commons.cli.CommandLine cmd)