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.update
Interface UpdateDescriptor

    public interface UpdateDescriptor

Contains information about available updates.

Please see the "Auto-Update" help topic in the documentation for a detailed discussion on updaters.

When building the installers, install4j creates a file `updates.xml` in the media file output directory. The data in that file is exposed by this class. When you place the `updates.xml` on a web server, the "Check for update" action can download it and save an instance of this class to an installer variable. You can also download an update descriptor programmatically in your application by using the `UpdateChecker` class.

Author:
  ej-technologies GmbH

Method Summary
`java.lang.String` | `getBaseUrl()` Returns the base URL from which update installers will be downloaded.
`UpdateDescriptorEntry[]` | `getEntries()` Returns all descriptor entries for the different media files of the available version.
`UpdateDescriptorEntry` | `getPossibleUpdateEntry()` An entry that has been identified as a match for the current installation and should be used for choosing an update installer.

Method Detail

### getEntries

    UpdateDescriptorEntry[] getEntries()

  Returns all descriptor entries for the different media files of the available version.

  Returns:
    the descriptor entries

### getPossibleUpdateEntry

    UpdateDescriptorEntry getPossibleUpdateEntry()

  An entry that has been identified as a match for the current installation and should be used for choosing an update installer.

  This is only non-null if the following conditions are fulfilled:

  - there is indeed a newer version available
  - the conditions for the maximum and minimum updatable version are satisfied by the current installation
  - an entry is available whose target media set ID is equal to the media file ID of the current installation. Media file IDs can be shown in the media section by invoking "Media->Show IDs" from the main menu.

  Returns:
    the descriptor entry suitable for updating or `null` if no such entry can be found

### getBaseUrl

    java.lang.String getBaseUrl()

  Returns the base URL from which update installers will be downloaded.

  The base URL determines the value of `UpdateDescriptorEntry.getURL()` which returns the URL an update installer will be downloaded from. By default, the base URL is the empty string, and the update installers will be downloaded from the same directory as the `updates.xml` file. If `updates.xml` and the update installers are not placed into the same directory on the web server, you have to change the `baseUrl` attribute in the `updateDescriptor` element in `updates.xml` to the appropriate URL.

  Returns:
    the base URL

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