Gridarta Editor
net.sf.gridarta.updater.UpdaterManager Class Reference

This class handles updating the map editor. More...

+ Inheritance diagram for net.sf.gridarta.updater.UpdaterManager:
+ Collaboration diagram for net.sf.gridarta.updater.UpdaterManager:

Public Member Functions

void setAction (@NotNull final Action action, @NotNull final String name)
 Sets the Action instance for this editor action. More...
 
void startup ()
 Eventually perform an update during startup. More...
 
void update ()
 Perform an update. More...
 
 UpdaterManager (@NotNull final Exiter exiter, @NotNull final MapManager<?, ?, ?> mapManager, @NotNull final Component parentComponent, @NotNull final String updateFileName)
 Creates a new instance. More...
 

Static Public Attributes

static final boolean AUTO_CHECK_DEFAULT = false
 Preferences default value for AUTO_CHECK_KEY. More...
 
static final String AUTO_CHECK_KEY = "UpdaterAutoCheck"
 Preferences key whether to automatically check for updates. More...
 
static final int INTERVAL_DEFAULT = 2
 Preferences default value for INTERVAL_KEY. More...
 
static final String INTERVAL_KEY = "UpdaterInterval"
 Preferences key for selected update interval. More...
 

Private Attributes

final Exiter exiter
 The Exiter for terminating the application. More...
 
final boolean hasUpdateURL
 Whether an update URL is defined. More...
 
final MapManager<?, ?, ?> mapManager
 The map manager to use. More...
 
final Component parentComponent
 The component 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 Preferences PREFERENCES = Preferences.userNodeForPackage(MainControl.class)
 Preferences. More...
 
static final long[] UPDATE_TIMES
 The times for update calculation. More...
 

Detailed Description

This class handles updating the map editor.

Author
Christian.Hujer

Definition at line 38 of file UpdaterManager.java.

Constructor & Destructor Documentation

◆ UpdaterManager()

net.sf.gridarta.updater.UpdaterManager.UpdaterManager ( @NotNull final Exiter  exiter,
@NotNull final MapManager<?, ?, ?>  mapManager,
@NotNull final Component  parentComponent,
@NotNull final String  updateFileName 
)

Creates a new instance.

Parameters
exiterthe exiter for terminating the application
mapManagerthe map manager to use
parentComponentthe parent component to show dialogs on
updateFileNamethe file to update

Definition at line 119 of file UpdaterManager.java.

References net.sf.gridarta.updater.UpdaterManager.ACTION_BUILDER, net.sf.gridarta.updater.UpdaterManager.exiter, net.sf.gridarta.updater.UpdaterManager.hasUpdateURL, net.sf.gridarta.updater.UpdaterManager.mapManager, net.sf.gridarta.updater.UpdaterManager.parentComponent, and net.sf.gridarta.updater.UpdaterManager.updateFileName.

Member Function Documentation

◆ setAction()

void net.sf.gridarta.updater.UpdaterManager.setAction ( @NotNull final Action  action,
@NotNull final String  name 
)

Sets the Action instance for this editor action.

Parameters
actionthe action instance
namethe name of the action

Implements net.sf.gridarta.utils.EditorAction.

Definition at line 156 of file UpdaterManager.java.

References net.sf.gridarta.updater.UpdaterManager.hasUpdateURL.

◆ startup()

◆ update()

Member Data Documentation

◆ ACTION_BUILDER

final ActionBuilder net.sf.gridarta.updater.UpdaterManager.ACTION_BUILDER = ActionBuilderFactory.getInstance().getActionBuilder("net.sf.gridarta")
staticprivate

Action Builder to create Actions.

Definition at line 44 of file UpdaterManager.java.

Referenced by net.sf.gridarta.updater.UpdaterManager.update(), and net.sf.gridarta.updater.UpdaterManager.UpdaterManager().

◆ AUTO_CHECK_DEFAULT

◆ AUTO_CHECK_KEY

◆ exiter

final Exiter net.sf.gridarta.updater.UpdaterManager.exiter
private

The Exiter for terminating the application.

Definition at line 87 of file UpdaterManager.java.

Referenced by net.sf.gridarta.updater.UpdaterManager.update(), and net.sf.gridarta.updater.UpdaterManager.UpdaterManager().

◆ hasUpdateURL

final boolean net.sf.gridarta.updater.UpdaterManager.hasUpdateURL
private

◆ INTERVAL_DEFAULT

◆ INTERVAL_KEY

◆ mapManager

final MapManager<?, ?, ?> net.sf.gridarta.updater.UpdaterManager.mapManager
private

◆ parentComponent

final Component net.sf.gridarta.updater.UpdaterManager.parentComponent
private

The component to show dialogs on.

Definition at line 99 of file UpdaterManager.java.

Referenced by net.sf.gridarta.updater.UpdaterManager.update(), and net.sf.gridarta.updater.UpdaterManager.UpdaterManager().

◆ PREFERENCES

final Preferences net.sf.gridarta.updater.UpdaterManager.PREFERENCES = Preferences.userNodeForPackage(MainControl.class)
staticprivate

Preferences.

Definition at line 50 of file UpdaterManager.java.

Referenced by net.sf.gridarta.updater.UpdaterManager.startup().

◆ UPDATE_TIMES

final long [] net.sf.gridarta.updater.UpdaterManager.UPDATE_TIMES
staticprivate
Initial value:
= { 0L,
86400000L,
604800000L,
2419200000L,
}

The times for update calculation.

Definition at line 77 of file UpdaterManager.java.

Referenced by net.sf.gridarta.updater.UpdaterManager.startup().

◆ updateFileName

final String net.sf.gridarta.updater.UpdaterManager.updateFileName
private

The documentation for this class was generated from the following file: