com.izforge.izpack.installer
Class AutomatedInstallData

java.lang.Object
  extended bycom.izforge.izpack.installer.AutomatedInstallData
Direct Known Subclasses:
InstallData

public class AutomatedInstallData
extends java.lang.Object

Encloses information about the install process. This implementation is not thread safe.

Author:
Julien Ponge , Johannes Lehtinen

Nested Class Summary
private static class AutomatedInstallData.VariableValueMapImpl
          A Properties based implementation for VariableValueMap interface.
 
Field Summary
 java.util.List allPacks
          The complete list of packs.
protected  java.util.Map attributes
          The attributes used by the panels
 java.util.List availablePacks
          The available packs.
 boolean canClose
          Can we close the installer ?
 int curPanelNumber
          The current panel.
 Info info
          The inforamtions.
 boolean installSuccess
          Did the installation succeed ?
 java.lang.String kind
          The installer kind.
 LocaleDatabase langpack
          The language pack.
 java.lang.String localeISO3
          The language code.
 java.util.List panels
          The panels list.
 java.util.List panelsOrder
          The panels order.
 java.util.List selectedPacks
          The selected packs.
 java.util.zip.ZipOutputStream uninstallOutJar
          The uninstaller jar stream.
protected  VariableValueMap variableValueMap
          Maps the variable names to their values
 XMLElement xmlData
          The xmlData for automated installers.
 
Constructor Summary
AutomatedInstallData()
          Constructs a new instance of this class.
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attr)
          Returns the value of the named attribute.
 java.lang.String getInstallPath()
          Returns the install path.
 java.lang.String getVariable(java.lang.String var)
          Returns the current value of the specified variable.
 VariableValueMap getVariableValueMap()
          Returns the map of variable values.
 void setAttribute(java.lang.String attr, java.lang.Object val)
          Sets a named attribute.
 void setInstallPath(java.lang.String path)
          Sets the install path.
 void setVariable(java.lang.String var, java.lang.String val)
          Sets a variable to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

localeISO3

public java.lang.String localeISO3
The language code.


langpack

public LocaleDatabase langpack
The language pack.


kind

public java.lang.String kind
The installer kind.


uninstallOutJar

public java.util.zip.ZipOutputStream uninstallOutJar
The uninstaller jar stream.


info

public Info info
The inforamtions.


allPacks

public java.util.List allPacks
The complete list of packs.


availablePacks

public java.util.List availablePacks
The available packs.


selectedPacks

public java.util.List selectedPacks
The selected packs.


panels

public java.util.List panels
The panels list.


panelsOrder

public java.util.List panelsOrder
The panels order.


curPanelNumber

public int curPanelNumber
The current panel.


canClose

public boolean canClose
Can we close the installer ?


installSuccess

public boolean installSuccess
Did the installation succeed ?


xmlData

public XMLElement xmlData
The xmlData for automated installers.


variableValueMap

protected VariableValueMap variableValueMap
Maps the variable names to their values


attributes

protected java.util.Map attributes
The attributes used by the panels

Constructor Detail

AutomatedInstallData

public AutomatedInstallData()
Constructs a new instance of this class.

Method Detail

getVariableValueMap

public VariableValueMap getVariableValueMap()
Returns the map of variable values. Modifying this map will directly affect the current value of variables.

Returns:
the map of variable values

setVariable

public void setVariable(java.lang.String var,
                        java.lang.String val)
Sets a variable to the specified value. This is short hand for getVariableValueMap().setVariable(var, val) .

Parameters:
var - the name of the variable
val - the new value of the variable
See Also:
getVariable(java.lang.String)

getVariable

public java.lang.String getVariable(java.lang.String var)
Returns the current value of the specified variable. This is short hand for getVariableValueMap().getVariable(var).

Parameters:
var - the name of the variable
Returns:
the value of the variable or null if not set
See Also:
setVariable(java.lang.String, java.lang.String)

setInstallPath

public void setInstallPath(java.lang.String path)
Sets the install path.

Parameters:
path - the new install path
See Also:
getInstallPath()

getInstallPath

public java.lang.String getInstallPath()
Returns the install path.

Returns:
the current install path or null if none set yet
See Also:
setInstallPath(java.lang.String)

getAttribute

public java.lang.Object getAttribute(java.lang.String attr)
Returns the value of the named attribute.

Parameters:
attr - the name of the attribute
Returns:
the value of the attribute or null if not set
See Also:
setAttribute(java.lang.String, java.lang.Object)

setAttribute

public void setAttribute(java.lang.String attr,
                         java.lang.Object val)
Sets a named attribute. The panels and other IzPack components can attach custom attributes to InstallData to communicate with each other. For example, a set of co-operating custom panels do not need to implement a common data storage but can use InstallData singleton. The name of the attribute should include the package and class name to prevent name space collisions.

Parameters:
attr - the name of the attribute to set
val - the value of the attribute or null to unset the attribute
See Also:
getAttribute(java.lang.String)