|
Gridarta Editor
|
Inheritance diagram for net.sf.gridarta.updater.Updater:
Collaboration diagram for net.sf.gridarta.updater.Updater:Classes | |
| class | VersionInfo |
Public Member Functions | |
| void | run () |
| Updater (@Nullable final Component parentComponent, @NotNull final Exiter exiter, @NotNull final String updateFileName) | |
Static Public Attributes | |
| static final String | LAST_UPDATE_KEY = "UpdateTimestamp" |
Private Member Functions | |
| boolean | askIfUserWantsUpdate (@Nullable final VersionInfo active, @NotNull final VersionInfo update, @NotNull final String propUrl, @NotNull final String downloadUrl) |
| void | downloadAndInstallUpdate (@NotNull final String url) |
| void | noNewUpdate (@Nullable final VersionInfo active, @NotNull final VersionInfo update, @NotNull final String propUrl, @NotNull final String downloadUrl) |
| InputStream | openStream (@NotNull final String url) throws IOException |
Private Attributes | |
| final Exiter | exiter |
| final Component | parentComponent |
| final String | updateFileName |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| static final int | BUF_SIZE = 4096 |
| static final Category | LOG = Logger.getLogger(Updater.class) |
| static final Preferences | PREFERENCES = Preferences.userNodeForPackage(MainControl.class) |
This class handles updating the map editor.
Definition at line 58 of file Updater.java.
| net.sf.gridarta.updater.Updater.Updater | ( | @Nullable final Component | parentComponent, |
| @NotNull final Exiter | exiter, | ||
| @NotNull final String | updateFileName | ||
| ) |
Creates a new instance.
| parentComponent | the parent component to show dialogs on |
| exiter | the exiter for terminating the application |
| updateFileName | the file to update |
Definition at line 113 of file Updater.java.
References net.sf.gridarta.updater.Updater.exiter, net.sf.gridarta.updater.Updater.parentComponent, and net.sf.gridarta.updater.Updater.updateFileName.
|
private |
Asks the user whether he wants to update.
| active | the version info of the currently installed version |
| update | the version info of the available update version |
| propUrl | the URL where properties were downloaded from |
| downloadUrl | the URL where the update would be downloaded from |
Definition at line 173 of file Updater.java.
References net.sf.gridarta.updater.Updater.ACTION_BUILDER, net.sf.gridarta.updater.Updater.parentComponent, and net.sf.gridarta.updater.Updater.updateFileName.
Referenced by net.sf.gridarta.updater.Updater.run().
Here is the caller graph for this function:
|
private |
Downloads and installs an update.
| url | the URL to get update from |
Definition at line 192 of file Updater.java.
References net.sf.gridarta.updater.Updater.ACTION_BUILDER, net.sf.gridarta.updater.Updater.BUF_SIZE, net.sf.gridarta.utils.Exiter.doExit(), net.sf.gridarta.updater.Updater.exiter, net.sf.gridarta.updater.Updater.LOG, net.sf.gridarta.updater.Updater.openStream(), net.sf.gridarta.updater.Updater.parentComponent, and net.sf.gridarta.updater.Updater.updateFileName.
Referenced by net.sf.gridarta.updater.Updater.run().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Tells the user there is no update.
| active | the version info of the currently installed version |
| update | the version info of the available update version |
| propUrl | the URL where properties were downloaded from |
| downloadUrl | the URL where the update would be downloaded from |
Definition at line 184 of file Updater.java.
References net.sf.gridarta.updater.Updater.ACTION_BUILDER, and net.sf.gridarta.updater.Updater.parentComponent.
Referenced by net.sf.gridarta.updater.Updater.run().
Here is the caller graph for this function:
|
private |
Opens an input stream on an URL.
| url | the URL to the open input stream on |
| IOException | in case of I/O problems |
Definition at line 237 of file Updater.java.
References net.sf.gridarta.updater.Updater.ACTION_BUILDER, net.sf.gridarta.gui.dialog.prefs.NetPreferences.getProxy(), net.sf.gridarta.utils.ActionBuilderUtils.getString(), and net.sf.gridarta.updater.Updater.parentComponent.
Referenced by net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), and net.sf.gridarta.updater.Updater.run().
Here is the call graph for this function:
Here is the caller graph for this function:| void net.sf.gridarta.updater.Updater.run | ( | ) |
Definition at line 123 of file Updater.java.
References net.sf.gridarta.updater.Updater.ACTION_BUILDER, net.sf.gridarta.updater.Updater.askIfUserWantsUpdate(), net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), net.sf.gridarta.updater.Updater.LAST_UPDATE_KEY, net.sf.gridarta.updater.Updater.noNewUpdate(), net.sf.gridarta.updater.Updater.openStream(), net.sf.gridarta.updater.Updater.parentComponent, net.sf.gridarta.updater.Updater.PREFERENCES, and net.sf.gridarta.updater.Updater.VersionInfo.UNAVAILABLE.
Here is the call graph for this function:
|
staticprivate |
The action builder to create Actions.
Definition at line 64 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.askIfUserWantsUpdate(), net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), net.sf.gridarta.updater.Updater.noNewUpdate(), net.sf.gridarta.updater.Updater.openStream(), and net.sf.gridarta.updater.Updater.run().
|
staticprivate |
The buffer size in bytes.
Definition at line 105 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.downloadAndInstallUpdate().
|
private |
The Exiter for terminating the application.
Definition at line 94 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), and net.sf.gridarta.updater.Updater.Updater().
|
static |
The preferences key for last update.
Definition at line 82 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.run(), and net.sf.gridarta.updater.UpdaterManager.startup().
|
staticprivate |
The logger.
Definition at line 70 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.downloadAndInstallUpdate().
|
private |
The parent component to show dialogs on.
Definition at line 88 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.askIfUserWantsUpdate(), net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), net.sf.gridarta.updater.Updater.noNewUpdate(), net.sf.gridarta.updater.Updater.openStream(), net.sf.gridarta.updater.Updater.run(), and net.sf.gridarta.updater.Updater.Updater().
|
staticprivate |
The preferences.
Definition at line 76 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.run().
|
private |
The file to update.
Definition at line 100 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.askIfUserWantsUpdate(), net.sf.gridarta.updater.Updater.downloadAndInstallUpdate(), and net.sf.gridarta.updater.Updater.Updater().