com.izforge.izpack.event
Class SimpleCompilerListener

java.lang.Object
  extended by com.izforge.izpack.event.SimpleCompilerListener
All Implemented Interfaces:
CompilerListener

public class SimpleCompilerListener
extends java.lang.Object
implements CompilerListener

This class implements all methods of interface CompilerListener, but do not do anything else. It can be used as base class to save implementation of unneeded methods.

Author:
Klaus Bartz

Field Summary
 
Fields inherited from interface com.izforge.izpack.event.CompilerListener
BEGIN, END
 
Constructor Summary
SimpleCompilerListener()
          Creates a newly object.
 
Method Summary
 void afterPack(PackInfo pack, int packNumber, Packager packager)
           
 void beforePack(PackInfo pack, int packNumber, Packager packager)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCompilerListener

public SimpleCompilerListener()
Creates a newly object.

Method Detail

reviseAdditionalDataMap

public java.util.Map reviseAdditionalDataMap(java.util.Map existentDataMap,
                                             XMLElement element)
                                      throws CompilerException
Description copied from interface: CompilerListener
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.

Specified by:
reviseAdditionalDataMap in interface CompilerListener
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

afterPack

public void afterPack(PackInfo pack,
                      int packNumber,
                      Packager packager)
               throws CompilerException
Throws:
CompilerException

beforePack

public void beforePack(PackInfo pack,
                       int packNumber,
                       Packager packager)

notify

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

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