Interface UpdateDescriptor
-
- All Superinterfaces:
java.io.Serializable
public interface UpdateDescriptor extends java.io.Serializable
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 theupdates.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 theUpdateChecker
class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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 theupdates.xml
file. Ifupdates.xml
and the update installers are not placed into the same directory on the web server, you have to change thebaseUrl
attribute in theupdateDescriptor
element inupdates.xml
to the appropriate URL.- Returns:
- the base URL
-
-