|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface InstallerContext
The extended context provided during installation. This context provides access to information about all installation parameters, as well as the methods for file installation.
| Method Summary | |
|---|---|
void |
abort()
Deprecated. return false in a custom action in order to perform a rollback and close the installer. |
java.util.Collection |
getCustomTasks()
Returns all custom tasks for this installer. |
java.util.Collection |
getInstallationComponents()
Returns all installation components for this installer. |
java.io.File |
getInstallerFile()
Returns the current media file. |
java.lang.String |
getMediaName()
Get the name of the current media set. |
java.lang.String |
getProgramGroup()
Retrieves the name of the program group selected by the user or the default program group if the user has not yet made a selection. |
java.util.Collection |
getServiceSetups()
Returns all services that can be installed by this installation together with their installation parameters. |
boolean |
installFile(java.io.File sourceFile,
java.io.File destFile)
Installs a file. |
boolean |
installFile(java.io.File sourceFile,
java.io.File destFile,
FileOptions options)
Installs a file. |
boolean |
installFile(java.io.File sourceFile,
java.io.File destFile,
FileOptions options,
ProgressInterface progressInterface,
int fromPercent,
int toPercent)
Installs a file. |
boolean |
isCreateDesktopIcon()
Returns whether the installer will create a desktop icon. |
boolean |
isCreateMenu()
Returns whether start menu entries should be created. |
boolean |
isCreateMenuAllUsers()
Returns whether the start menu entries should be made for all users. |
boolean |
isCreateQuickLaunchIcon()
Returns whether the installer will create a quick launch icon. |
void |
registerUninstallFile(java.io.File file)
Registers a file for uninstallation. |
| Methods inherited from interface com.install4j.api.Context |
|---|
getAddOnApplicationId, getApplicationId, getInstallationDirectory, getUserVariableValue, isAdminUser, isUnattended, rebootAfterFinish |
| Method Detail |
|---|
boolean isCreateMenu()
java.lang.String getProgramGroup()
boolean isCreateMenuAllUsers()
java.util.Collection getServiceSetups()
ServiceSetupjava.util.Collection getInstallationComponents()
InstallationComponentSetupjava.util.Collection getCustomTasks()
CustomTaskSetupboolean isCreateDesktopIcon()
boolean isCreateQuickLaunchIcon()
java.lang.String getMediaName()
boolean installFile(java.io.File sourceFile,
java.io.File destFile)
throws UserCanceledException
installFile(File, File, FileOptions)
with new FileOptions(sourceFile.lastModified()).
The uninstaller will uninstall a file that has been installed with this method. The overwrite policy
will be FileOptions.OVERWRITE_ALWAYS_ASK.
sourceFile - the file to be installed.destFile - the destination file.
UserCanceledException - if the user hits cancel on the progress screen or on
an overwrite or retry dialog.
boolean installFile(java.io.File sourceFile,
java.io.File destFile,
FileOptions options)
throws UserCanceledException
installFile(File, File, FileOptions, ProgressInterface)
with no ProgressInterface (null). The
FileOptions parameter determines the overwrite strategy as well as whether the file will be
registered for uninstallation.
sourceFile - the file to be installed.destFile - the destination file.options - the installation options.
UserCanceledException - if the user hits cancel on the progress screen or on
an overwrite or retry dialog.
boolean installFile(java.io.File sourceFile,
java.io.File destFile,
FileOptions options,
ProgressInterface progressInterface,
int fromPercent,
int toPercent)
throws UserCanceledException
sourceFile - the file to be installed.destFile - the destination file.options - the installation options.progressInterface - the interface for displaying progress during the file installation.
You should pass the interface that is passed as a parameter in the
performAction method of your custom action.fromPercent - the start percentage value for the file installation. The progress interface
will be advanced starting with this percentage value.toPercent - the end percentage value for the file installation. The progress interface
will be advanced up to this percentage value.
UserCanceledException - if the user hits cancel on the progress screen or on
an overwrite or retry dialog.void registerUninstallFile(java.io.File file)
file - the file that should be removed when uninstalling the application.java.io.File getInstallerFile()
void abort()
|
install4j API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||