|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.izforge.izpack.event.SimpleInstallerListener
public class SimpleInstallerListener
This class implements all methods of interface InstallerListener, but do not do anything. It can be used as base class to save implementation of unneeded methods.
Additional there are some common helper methods which are used from the base class SpecHelper.
Field Summary | |
---|---|
protected static boolean |
doInformProgressBar
|
private AutomatedInstallData |
installdata
|
protected static java.lang.String |
LANG_FILE_NAME
The name of the XML file that specifies the panel langpack |
protected static LocaleDatabase |
langpack
The packs locale database. |
private static java.util.ArrayList<SimpleInstallerListener> |
progressBarCaller
|
private SpecHelper |
specHelper
|
Fields inherited from interface com.izforge.izpack.event.InstallerListener |
---|
AFTER_DIR, AFTER_FILE, AFTER_PACK, AFTER_PACKS, BEFORE_DIR, BEFORE_FILE, BEFORE_PACK, BEFORE_PACKS |
Constructor Summary | |
---|---|
SimpleInstallerListener()
The default constructor. |
|
SimpleInstallerListener(boolean useSpecHelper)
Constructs a simple installer listener. |
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. |
AutomatedInstallData |
getInstalldata()
Returns the current installdata object. |
protected java.lang.String |
getMsg(java.lang.String id)
Returns the language dependant message from the resource CustomActionsLang.xml or the common language pack for the given id. |
static int |
getProgressBarCallerCount()
Returns the count of listeners which are registered as progress bar caller. |
protected int |
getProgressBarCallerId()
Returns the progress bar caller id of this object. |
SpecHelper |
getSpecHelper()
Returns current specification helper. |
protected boolean |
informProgressBar()
Returns whether this object should inform the progress bar or not. |
boolean |
isFileListener()
Returns true if this listener would be informed at every file and directory installation, else false. |
void |
setInstalldata(AutomatedInstallData data)
Sets the installdata object. |
protected void |
setProgressBarCaller()
Sets this object as progress bar caller. |
void |
setSpecHelper(SpecHelper helper)
Sets the given specification helper to the current used helper. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.ArrayList<SimpleInstallerListener> progressBarCaller
protected static final java.lang.String LANG_FILE_NAME
protected static LocaleDatabase langpack
protected static boolean doInformProgressBar
private AutomatedInstallData installdata
private SpecHelper specHelper
Constructor Detail |
---|
public SimpleInstallerListener()
public SimpleInstallerListener(boolean useSpecHelper)
useSpecHelper
- Method Detail |
---|
public void afterFile(java.io.File file, PackFile pf) throws java.lang.Exception
InstallerListener
afterFile
in interface InstallerListener
file
- current File object of the just installed filepf
- corresponding PackFile object
java.lang.Exception
public void afterDir(java.io.File dir, PackFile pf) throws java.lang.Exception
InstallerListener
afterDir
in interface InstallerListener
dir
- current File object of the just created directorypf
- corresponding PackFile object
java.lang.Exception
public void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler) throws java.lang.Exception
InstallerListener
afterPacks
in interface InstallerListener
idata
- object containing the current installation datahandler
- a handler to the current used UIProgressHandler
java.lang.Exception
public void afterPack(Pack pack, java.lang.Integer i, AbstractUIProgressHandler handler) throws java.lang.Exception
InstallerListener
afterPack
in interface InstallerListener
pack
- current pack objecti
- current pack numberhandler
- a handler to the current used UIProgressHandler
java.lang.Exception
public void beforePacks(AutomatedInstallData idata, java.lang.Integer npacks, AbstractUIProgressHandler handler) throws java.lang.Exception
InstallerListener
beforePacks
in interface InstallerListener
idata
- object containing the current installation datanpacks
- number of packs which are defined for this installationhandler
- a handler to the current used UIProgressHandler
java.lang.Exception
public void beforePack(Pack pack, java.lang.Integer i, AbstractUIProgressHandler handler) throws java.lang.Exception
InstallerListener
beforePack
in interface InstallerListener
pack
- current pack objecti
- current pack numberhandler
- a handler to the current used UIProgressHandler
java.lang.Exception
public boolean isFileListener()
InstallerListener
isFileListener
in interface InstallerListener
public void beforeFile(java.io.File file, PackFile pf) throws java.lang.Exception
InstallerListener
beforeFile
in interface InstallerListener
file
- current File object of the file which should be installedpf
- corresponding PackFile object
java.lang.Exception
public void beforeDir(java.io.File dir, PackFile pf) throws java.lang.Exception
InstallerListener
beforeDir
in interface InstallerListener
dir
- current File object of the just directory which should be createdpf
- corresponding PackFile object
java.lang.Exception
public void afterInstallerInitialization(AutomatedInstallData data)
InstallerListener
afterInstallerInitialization
in interface InstallerListener
public SpecHelper getSpecHelper()
public void setSpecHelper(SpecHelper helper)
helper
- specification helper which should be usedpublic AutomatedInstallData getInstalldata()
public void setInstalldata(AutomatedInstallData data)
data
- installdata object which should be set to currentpublic static int getProgressBarCallerCount()
protected int getProgressBarCallerId()
protected void setProgressBarCaller()
protected boolean informProgressBar()
protected java.lang.String getMsg(java.lang.String id)
id
- string id for which the message should be resolved
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |