java.lang.Objectcom.install4j.api.InstallationHandler
public abstract class InstallationHandler
If you define an installation handler derived from this class on the "Advanced tasks" tab in the install4j GUI it will be instantiated and queried before the installation of each file. With this handler, you can achive a fine-grained customization of the installation process or install files in the distribution tree to different directories than the installation directory without using custom install actions.
| Constructor Summary | |
|---|---|
InstallationHandler()
|
|
| Method Summary | |
|---|---|
abstract java.io.File |
getInstallationDirectory(java.io.File defaultInstallationDirectory,
java.io.File file)
Will be queried for each file in the distribution tree that is about to be installed. |
InstallerContext |
getInstallerContext()
Returns the InstallerContext that the framework has associated with this handler in setInstallerContext. |
void |
setInstallerContext(InstallerContext context)
This method is called by the framework to set the InstallerContext. |
abstract boolean |
shouldInstall(java.io.File file)
Will be queried for each file in the distribution tree that is about to be installed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InstallationHandler()
| Method Detail |
|---|
public InstallerContext getInstallerContext()
public void setInstallerContext(InstallerContext context)
context - the context.public abstract boolean shouldInstall(java.io.File file)
file - the file that is about to be installed. This file is relative to the installation
root directory, it is not an absolute file.
public abstract java.io.File getInstallationDirectory(java.io.File defaultInstallationDirectory,
java.io.File file)
defaultInstallationDirectory - the default installation root directory.file - the file that is about to be installed. This file is relative to the installation
root directory, it is not an absolute file.