|
Gridarta Editor
|
This class handles updating the map editor. More...
Inheritance diagram for net.sf.gridarta.updater.Updater:
Collaboration diagram for net.sf.gridarta.updater.Updater:Classes | |
| class | VersionInfo |
| Class for holding version information and quickly comparing it. More... | |
Public Member Functions | |
| void | run () |
| Updater (@Nullable final Component parentComponent, @NotNull final Exiter exiter, @NotNull final String updateFileName) | |
| Create a new instance. More... | |
Static Public Attributes | |
| static final String | LAST_UPDATE_KEY = "UpdateTimestamp" |
| Preferences key for last update. More... | |
Private Member Functions | |
| boolean | askIfUserWantsUpdate (@Nullable final VersionInfo active, @NotNull final VersionInfo update, @NotNull final String propUrl, @NotNull final String downloadUrl) |
| Ask the user whether he wants to update. More... | |
| void | downloadAndInstallUpdate (@NotNull final String url) |
| Download and install an update. More... | |
| void | noNewUpdate (@Nullable final VersionInfo active, @NotNull final VersionInfo update, @NotNull final String propUrl, @NotNull final String downloadUrl) |
| Tell the user there is no update. More... | |
| InputStream | openStream (@NotNull final String url) throws IOException |
| Opens an InputStream on a URL. More... | |
Private Attributes | |
| final Exiter | exiter |
| The Exiter for terminating the application. More... | |
| final Component | parentComponent |
| The parentComponent to show dialogs on. More... | |
| final String | updateFileName |
| The file to update. More... | |
Static Private Attributes | |
| static final ActionBuilder | ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta") |
| Action Builder to create Actions. More... | |
| static final int | BUF_SIZE = 4096 |
| Buffer size. More... | |
| static final Category | LOG = Logger.getLogger(Updater.class) |
| Logger. More... | |
| static final Preferences | PREFERENCES = Preferences.userNodeForPackage(MainControl.class) |
| Preferences. More... | |
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 | ||
| ) |
Create 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 |
Ask the user whether he wants to update.
| active | VersionInfo of currently installed version |
| update | VersionInfo of available update version |
| propUrl | URL where properties were downloaded from |
| downloadUrl | URL where the update would be downloaded from |
Definition at line 173 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.run().
Here is the caller graph for this function:
|
private |
Download and install an update.
| url | URL to get update from |
Definition at line 192 of file Updater.java.
References net.sf.gridarta.updater.Updater.BUF_SIZE, net.sf.gridarta.utils.Exiter.doExit(), and net.sf.gridarta.updater.Updater.openStream().
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 |
Tell the user there is no update.
| active | VersionInfo of currently installed version |
| update | VersionInfo of available update version |
| propUrl | URL where properties were downloaded from |
| downloadUrl | URL where the update would be downloaded from |
Definition at line 184 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.run().
Here is the caller graph for this function:
|
private |
Opens an InputStream on a URL.
| url | the URL to open InputStream on |
| IOException | in case of I/O problems |
Definition at line 235 of file Updater.java.
References net.sf.gridarta.gui.dialog.prefs.NetPreferences.getProxy(), and net.sf.gridarta.utils.ActionBuilderUtils.getString().
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.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.VersionInfo.UNAVAILABLE.
Here is the call graph for this function:
|
staticprivate |
Action Builder to create Actions.
Definition at line 64 of file Updater.java.
|
staticprivate |
Buffer size.
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.Updater().
|
static |
Preferences key for last update.
Definition at line 82 of file Updater.java.
Referenced by net.sf.gridarta.updater.UpdaterManager.startup().
|
staticprivate |
Logger.
Definition at line 70 of file Updater.java.
|
private |
The parentComponent to show dialogs on.
Definition at line 88 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.Updater().
|
staticprivate |
Preferences.
Definition at line 76 of file Updater.java.
|
private |
The file to update.
Definition at line 100 of file Updater.java.
Referenced by net.sf.gridarta.updater.Updater.Updater().