public class ApplicationRegistry
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ApplicationRegistry.ApplicationInfo
Provides information about an application installed by install4j.
|
Constructor and Description |
---|
ApplicationRegistry() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkApplicationId(java.io.File dir)
Checks if the application can be safely installed into the given directory.
|
static ApplicationRegistry.ApplicationInfo[] |
getAddOnApplicationInfoByDir(java.io.File dir)
Checks if the specified directory contains an application installed by install4j
and retrieves information about the add-on installers in it.
|
static ApplicationRegistry.ApplicationInfo |
getApplicationInfoByDir(java.io.File dir)
Checks if the specified directory contains an application installed by install4j
and retrieves information about it.
|
static ApplicationRegistry.ApplicationInfo[] |
getApplicationInfoById(java.lang.String id)
Retrieves information about an application installed by install4j via its
application id.
|
static boolean |
isUpdateDirectory(java.io.File dir)
Checks if this application is already installed in the given directory.
|
public static boolean checkApplicationId(java.io.File dir)
dir
- the directory to be checkedpublic static boolean isUpdateDirectory(java.io.File dir)
Note that if you pass the installation
directory of the current installer to this method, the return value will change to
true
after the "Install Files" action has run. To check if the current installer
will perform an update installation, use InstallerContext.isUpdateInstallation()
which returns a consistent value over the entire lifetime of the installer.
dir
- the directory to be checkedInstallerContext.isUpdateInstallation()
public static ApplicationRegistry.ApplicationInfo[] getApplicationInfoById(java.lang.String id)
id
- the application idpublic static ApplicationRegistry.ApplicationInfo getApplicationInfoByDir(java.io.File dir)
dir
- the base directory to checknull
otherwise.public static ApplicationRegistry.ApplicationInfo[] getAddOnApplicationInfoByDir(java.io.File dir)
dir
- the base directory to checknull
otherwise. The array will be empty if there are no add-ons installed.