com.izforge.izpack.installer.console
Class ConsoleInstaller

java.lang.Object
  extended by com.izforge.izpack.installer.console.ConsoleInstaller
All Implemented Interfaces:
InstallerBase

public class ConsoleInstaller
extends Object
implements InstallerBase

Runs the console installer.

Author:
Mounir el hajj, Tim Anderson

Constructor Summary
ConsoleInstaller(ConsolePanels panels, ConsoleInstallData installData, UninstallDataWriter uninstallDataWriter, Console console, Housekeeper housekeeper)
          Constructs a ConsoleInstaller
 
Method Summary
protected  Console getConsole()
          Returns the console.
 void run(ConsoleInstallerAction type, String path, String[] args)
          Runs the installation.
 void setMediaPath(String path)
          Sets the media path for multi-volume installations.
protected  void shutdown(boolean exitSuccess, boolean reboot)
          Shuts down the installer.
protected  void shutdown(boolean exitSuccess, Console console)
          Shuts down the installer, rebooting if necessary.
protected  void terminate(boolean exitSuccess, boolean reboot)
          Terminates the installation process.
 void writeInstallationRecord(File file, UninstallData uninstallData)
          Write the automatic installation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConsoleInstaller

public ConsoleInstaller(ConsolePanels panels,
                        ConsoleInstallData installData,
                        UninstallDataWriter uninstallDataWriter,
                        Console console,
                        Housekeeper housekeeper)
Constructs a ConsoleInstaller

Parameters:
panels - the panels
installData - the installation data
uninstallDataWriter - the uninstallation data writer
console - the console
housekeeper - the house-keeper
Throws:
IzPackException - for any IzPack error
Method Detail

setMediaPath

public void setMediaPath(String path)
Sets the media path for multi-volume installations.

Parameters:
path - the media path. May be null

run

public void run(ConsoleInstallerAction type,
                String path,
                String[] args)
Runs the installation.

This method does not return - it invokes System.exit(0) on successful installation, or System.exit(1) on failure.

Parameters:
type - the type of the console action to perform
path - the path to use for the action. May be null

shutdown

protected void shutdown(boolean exitSuccess,
                        Console console)
Shuts down the installer, rebooting if necessary.

Parameters:
exitSuccess - if true, exits with a 0 exit code, else exits with a 1 exit code
console - the console

shutdown

protected void shutdown(boolean exitSuccess,
                        boolean reboot)
Shuts down the installer.

Parameters:
exitSuccess - if true, exits with a 0 exit code, else exits with a 1 exit code
reboot - if true perform a reboot

terminate

protected void terminate(boolean exitSuccess,
                         boolean reboot)
Terminates the installation process.

Parameters:
exitSuccess - if true, exits with a 0 exit code, else exits with a 1 exit code
reboot - if true perform a reboot

getConsole

protected Console getConsole()
Returns the console.

Returns:
the console

writeInstallationRecord

public void writeInstallationRecord(File file,
                                    UninstallData uninstallData)
                             throws Exception
Description copied from interface: InstallerBase
Write the automatic installation

Specified by:
writeInstallationRecord in interface InstallerBase
Throws:
Exception


Copyright © 2018. All rights reserved.