ApplicationRegistry (install4j API)
Date: 2010-09-29

Overview | Package | Class | Tree | Deprecated | Index | Help
| install4j API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.install4j.api
Class ApplicationRegistry

    java.lang.Object
      com.install4j.api.ApplicationRegistry

    public class ApplicationRegistry

extends java.lang.Object

The class provides information about applications installed with install4j.

Author:
  ej-technologies GmbH

Nested Class Summary
`static interface` | `ApplicationRegistry.ApplicationInfo` Provides information about an application installed by install4j.

Constructor Summary
`ApplicationRegistry()`

Method Summary
`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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ApplicationRegistry

    public ApplicationRegistry()

Method Detail

### checkApplicationId

    public static boolean checkApplicationId(java.io.File dir)

  Checks if the application can be safely installed into the given directory. If this is an add-on installer it returns true if the directory contains the target app.

  Parameters:
    `dir` - the directory to be checked
  Returns:
    true if safe

### isUpdateDirectory

    public static boolean isUpdateDirectory(java.io.File dir)

  Checks if this application is already installed in the given directory. This is the case if the application ID of the current installer is equal to the application ID of the already installed application.

  Parameters:
    `dir` - the directory to be checked
  Returns:
    true if an update is detected
  See Also:
    `InstallerContext.isUpdateInstallation()`

### getApplicationInfoById

    public static ApplicationRegistry.ApplicationInfo[] getApplicationInfoById(java.lang.String id)

  Retrieves information about an application installed by install4j via its application id.

  Parameters:
    `id` - the application id
  Returns:
    an array of ApplicationInfo objects containing all installations of the application with this id. The newest installation is the first element. Empty array if there are no installations.

### getApplicationInfoByDir

    public static ApplicationRegistry.ApplicationInfo getApplicationInfoByDir(java.io.File dir)

  Checks if the specified directory contains an application installed by install4j and retrieves information about it.

  Parameters:
    `dir` - the base directory to check
  Returns:
    an ApplicationInfo object if the directory contains an application installed with install4j, `null` otherwise.

### getAddOnApplicationInfoByDir

    public 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.

  Parameters:
    `dir` - the base directory to check
  Returns:
    an array of ApplicationInfo objects if the directory contains an application installed with install4j, `null` otherwise. The array will be empty if there are no add-ons installed.

Overview | Package | Class | Tree | Deprecated | Index | Help
| install4j API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD