com.izforge.izpack.installer
Class AutomatedInstaller

java.lang.Object
  extended by com.izforge.izpack.installer.InstallerBase
      extended by com.izforge.izpack.installer.AutomatedInstaller

public class AutomatedInstaller
extends InstallerBase

Runs the install process in text only (no GUI) mode.

Author:
Jonathan Halliday , Julien Ponge , Johannes Lehtinen

Field Summary
private  AutomatedInstallData idata
          The automated installation data.
private  java.util.TreeMap<java.lang.String,java.lang.Integer> panelInstanceCount
           
private  boolean result
          The result of the installation.
 
Fields inherited from class com.izforge.izpack.installer.InstallerBase
LANG_FILE_NAME
 
Constructor Summary
AutomatedInstaller(java.lang.String inputFilename)
          Constructing an instance triggers the install.
 
Method Summary
protected  void doInstall()
          Runs the automated installation logic for each panel in turn.
 boolean getResult()
          Get the result of the installation.
 XMLElement getXMLData(java.io.File input)
          Loads the xml data for the automated mode.
private  boolean writeUninstallData()
          Writes the uninstalldata.
 
Methods inherited from class com.izforge.izpack.installer.InstallerBase
addCustomLangpack, loadInstallData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

panelInstanceCount

private java.util.TreeMap<java.lang.String,java.lang.Integer> panelInstanceCount

idata

private AutomatedInstallData idata
The automated installation data.


result

private boolean result
The result of the installation.

Constructor Detail

AutomatedInstaller

public AutomatedInstaller(java.lang.String inputFilename)
                   throws java.lang.Exception
Constructing an instance triggers the install.

Parameters:
inputFilename - Name of the file containing the installation data.
Throws:
java.lang.Exception - Description of the Exception
Method Detail

writeUninstallData

private boolean writeUninstallData()
Writes the uninstalldata.

Unfortunately, Java doesn't allow multiple inheritance, so AutomatedInstaller and InstallerFrame can't share this code ... :-/

TODO: We should try to fix this in the future.


doInstall

protected void doInstall()
                  throws java.lang.Exception
Runs the automated installation logic for each panel in turn.

Throws:
java.lang.Exception

getXMLData

public XMLElement getXMLData(java.io.File input)
                      throws java.lang.Exception
Loads the xml data for the automated mode.

Parameters:
input - The file containing the installation data.
Returns:
The root of the XML file.
Throws:
java.lang.Exception - thrown if there are problems reading the file.

getResult

public boolean getResult()
Get the result of the installation.

Returns:
True if the installation was successful.