public class PackageVersions extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FILENAME
Name of the file used to persist the version data.
|
static String |
LEGACY_FILENAME
Name of the file used in JON 2.1 and earlier to persist the version data.
|
| Constructor and Description |
|---|
PackageVersions(String pluginName,
String dataDirectory)
Creates a new entry point to the persisted version data.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getVersion(String packageKey)
Retrieves the version for the package identified by the supplied package key.
|
void |
loadFromDisk()
Loads the last known application (package) versions for the plugin this instance is scoped to.
|
void |
putVersion(String packageKey,
String version)
Updates the store with a new version for the package identified by the specified key.
|
void |
saveToDisk()
Saves the current state of the application (package) versions to disk.
|
void |
unload()
For internal use only - Removes the static data object to simulate the first load in the system.
|
public static final String FILENAME
public static final String LEGACY_FILENAME
public PackageVersions(String pluginName, String dataDirectory)
loadFromDisk().pluginName - plugin loading the version datadataDirectory - directory into which to persist the versionspublic void loadFromDisk()
public void saveToDisk()
public String getVersion(String packageKey)
packageKey - identifies the packagenull otherwisepublic void unload()
public void putVersion(String packageKey, String version)
packageKey - identifies the packageversion - version of the packageCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.