|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rhq.core.pluginapi.content.version.PackageVersions
public class PackageVersions
Access to the persistent storage of package versions. This class provides the ability to save and load the versions to disk, along with the basic retrieval and set calls for the versions themselves.
Field Summary | |
---|---|
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 Summary | |
---|---|
PackageVersions(String pluginName,
String dataDirectory)
Creates a new entry point to the persisted version data. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String FILENAME
public static final String LEGACY_FILENAME
Constructor Detail |
---|
public PackageVersions(String pluginName, String dataDirectory)
loadFromDisk()
.
pluginName
- plugin loading the version datadataDirectory
- directory into which to persist the versionsMethod Detail |
---|
public void loadFromDisk()
public void saveToDisk()
public String getVersion(String packageKey)
packageKey
- identifies the package
null
otherwisepublic void unload()
public void putVersion(String packageKey, String version)
packageKey
- identifies the packageversion
- version of the package
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |