com.izforge.izpack.event
Interface InstallerListener

All Known Implementing Classes:
AntActionInstallerListener, LateShortcutInstallListener, NativeInstallerListener, ProgressBarInstallerListener, RegistryInstallerListener, SimpleInstallerListener, SummaryLoggerInstallerListener

public interface InstallerListener

Implementations of this class are used to handle customizing installation. The defined methods are called from the unpacker at different, well defined points of installation.

Author:
Klaus Bartz

Field Summary
static int AFTER_DIR
           
static int AFTER_FILE
           
static int AFTER_PACK
           
static int AFTER_PACKS
           
static int BEFORE_DIR
           
static int BEFORE_FILE
           
static int BEFORE_PACK
           
static int BEFORE_PACKS
           
 
Method Summary
 void afterDir(java.io.File dir, PackFile pf)
          This method will be called from the unpacker after one directory was created.
 void afterFile(java.io.File file, PackFile pf)
          This method will be called from the unpacker after one file was installed.
 void afterInstallerInitialization(AutomatedInstallData data)
          Called when the installer creates the listener instance, immediately after the install data is parsed.
 void afterPack(Pack pack, java.lang.Integer i, AbstractUIProgressHandler handler)
          This method will be called from the unpacker after the installation of one pack was performed.
 void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler)
          This method will be called from the unpacker after the installation of all packs was performed.
 void beforeDir(java.io.File dir, PackFile pf)
          This method will be called from the unpacker before one directory should be created.
 void beforeFile(java.io.File file, PackFile pf)
          This method will be called from the unpacker before one file should be installed.
 void beforePack(Pack pack, java.lang.Integer i, AbstractUIProgressHandler handler)
          This method will be called from the unpacker before the installation of one pack will be performed.
 void beforePacks(AutomatedInstallData idata, java.lang.Integer npacks, AbstractUIProgressHandler handler)
          This method will be called from the unpacker before the installation of all packs will be performed.
 boolean isFileListener()
          Returns true if this listener would be informed at every file and directory installation, else false.
 

Field Detail

BEFORE_FILE

static final int BEFORE_FILE
See Also:
Constant Field Values

AFTER_FILE

static final int AFTER_FILE
See Also:
Constant Field Values

BEFORE_DIR

static final int BEFORE_DIR
See Also:
Constant Field Values

AFTER_DIR

static final int AFTER_DIR
See Also:
Constant Field Values

BEFORE_PACK

static final int BEFORE_PACK
See Also:
Constant Field Values

AFTER_PACK

static final int AFTER_PACK
See Also:
Constant Field Values

BEFORE_PACKS

static final int BEFORE_PACKS
See Also:
Constant Field Values

AFTER_PACKS

static final int AFTER_PACKS
See Also:
Constant Field Values
Method Detail

beforePacks

void beforePacks(AutomatedInstallData idata,
                 java.lang.Integer npacks,
                 AbstractUIProgressHandler handler)
                 throws java.lang.Exception
This method will be called from the unpacker before the installation of all packs will be performed.

Parameters:
idata - object containing the current installation data
npacks - number of packs which are defined for this installation
handler - a handler to the current used UIProgressHandler
Throws:
java.lang.Exception

beforePack

void beforePack(Pack pack,
                java.lang.Integer i,
                AbstractUIProgressHandler handler)
                throws java.lang.Exception
This method will be called from the unpacker before the installation of one pack will be performed.

Parameters:
pack - current pack object
i - current pack number
handler - a handler to the current used UIProgressHandler
Throws:
java.lang.Exception

isFileListener

boolean isFileListener()
Returns true if this listener would be informed at every file and directory installation, else false. If it is true, the listener will be called two times (before and after) for every action. Handle carefully, else performance problems are possible.

Returns:
true if this listener would be informed at every file and directory installation, else false

beforeDir

void beforeDir(java.io.File dir,
               PackFile pf)
               throws java.lang.Exception
This method will be called from the unpacker before one directory should be created. If parent directories should be created also, this method will be called for every directory beginning with the base.

Parameters:
dir - current File object of the just directory which should be created
pf - corresponding PackFile object
Throws:
java.lang.Exception

afterDir

void afterDir(java.io.File dir,
              PackFile pf)
              throws java.lang.Exception
This method will be called from the unpacker after one directory was created. If parent directories should be created, this method will be called for every directory beginning with the base.

Parameters:
dir - current File object of the just created directory
pf - corresponding PackFile object
Throws:
java.lang.Exception

beforeFile

void beforeFile(java.io.File file,
                PackFile pf)
                throws java.lang.Exception
This method will be called from the unpacker before one file should be installed.

Parameters:
file - current File object of the file which should be installed
pf - corresponding PackFile object
Throws:
java.lang.Exception

afterFile

void afterFile(java.io.File file,
               PackFile pf)
               throws java.lang.Exception
This method will be called from the unpacker after one file was installed.

Parameters:
file - current File object of the just installed file
pf - corresponding PackFile object
Throws:
java.lang.Exception

afterPack

void afterPack(Pack pack,
               java.lang.Integer i,
               AbstractUIProgressHandler handler)
               throws java.lang.Exception
This method will be called from the unpacker after the installation of one pack was performed.

Parameters:
pack - current pack object
i - current pack number
handler - a handler to the current used UIProgressHandler
Throws:
java.lang.Exception

afterPacks

void afterPacks(AutomatedInstallData idata,
                AbstractUIProgressHandler handler)
                throws java.lang.Exception
This method will be called from the unpacker after the installation of all packs was performed.

Parameters:
idata - object containing the current installation data
handler - a handler to the current used UIProgressHandler
Throws:
java.lang.Exception

afterInstallerInitialization

void afterInstallerInitialization(AutomatedInstallData data)
                                  throws java.lang.Exception
Called when the installer creates the listener instance, immediately after the install data is parsed.

Parameters:
data -
Throws:
java.lang.Exception