com.izforge.izpack.event
Interface CompilerListener

All Known Implementing Classes:
SimpleCompilerListener

public interface CompilerListener

Implementations of this class are used to add extensions to the packs at compilation.

Author:
Klaus Bartz

Field Summary
static int BEGIN
           
static int END
           
 
Method Summary
 void notify(java.lang.String position, int state, XMLElement data, Packager packager)
          This method will be called from each step of packaging.
 java.util.Map reviseAdditionalDataMap(java.util.Map existentDataMap, XMLElement element)
          This method is called from the compiler for each file (or dir) parsing.
 

Field Detail

BEGIN

static final int BEGIN
See Also:
Constant Field Values

END

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

reviseAdditionalDataMap

java.util.Map reviseAdditionalDataMap(java.util.Map existentDataMap,
                                      XMLElement element)
                                      throws CompilerException
This method is called from the compiler for each file (or dir) parsing. The XMLElement is a node of the file related children of the XML element "pack" (see installation.dtd). Current these are "file", "singlefile" or "fileset". If an additional data should be set, it should be added to the given data map (if exist). If no map exist a new should be created and filled. The data map will be added to the PackFile object after all registered CompilerListener are called. If the map contains an not common object, it is necessary to add the needed class to the installer.

Parameters:
existentDataMap - attribute set with previos setted attributes
element - current file related XML node
Returns:
the given or a new attribute set. If no attribute set is given and no attribute was added, null returns
Throws:
CompilerException

notify

void notify(java.lang.String position,
            int state,
            XMLElement data,
            Packager packager)
This method will be called from each step of packaging.

Parameters:
position - name of the calling method, e.g. "addVariables"
state - BEGIN or END
data - current install data
packager - current packager object