|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.tools.versioning.VersionsManager
public class VersionsManager
Provides access to and persistence of version information for pieces of code installed in the portal. Identification of pieces of code is by functional name. Version is represented by three integers. In most significant order these are Major, Minor, and Micro.
Field Summary | |
---|---|
private static VersionsManager |
instance
|
private static org.apache.commons.logging.Log |
log
|
private static java.util.LinkedList |
versions
|
private static Version[] |
VERSIONS_ARRAY_TYPE
|
Constructor Summary | |
---|---|
private |
VersionsManager()
|
Method Summary | |
---|---|
static VersionsManager |
getInstance()
Returns the singleton instance of the VersionsManager. |
Version |
getVersion(java.lang.String fname)
Returns the version for a specified functional name or null if no version information is available. |
Version[] |
getVersions()
Returns an array of Versions representing all version information registered with the VersionsManager. |
private boolean |
insertVersion(java.lang.String fname,
java.lang.String description,
int major,
int minor,
int micro)
Attempts to insert new version information into the database. |
private static java.util.LinkedList |
loadVersions()
Loads all version information from the back end database and returns it as a LinkedList containing Version objects. |
private boolean |
remove(Version v)
Removes this version from the backend database. |
boolean |
removeVersion(java.lang.String fname)
Removes version information for the specified functional name. |
boolean |
setVersion(java.lang.String fname,
java.lang.String description,
int major,
int minor,
int micro)
Updates the version information for the indicated functional name to the passed in values only if: a) a version already exists and the values in the database match those obtained via getVersion(fname). |
private boolean |
updateVersion(Version old,
Version next)
Attempts to update version information in the database. |
private static void |
updateVersions()
Updates the cached version information from the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.commons.logging.Log log
private static final Version[] VERSIONS_ARRAY_TYPE
private static final VersionsManager instance
private static java.util.LinkedList versions
Constructor Detail |
---|
private VersionsManager()
Method Detail |
---|
private static java.util.LinkedList loadVersions()
private static void updateVersions()
public static final VersionsManager getInstance()
public Version[] getVersions()
public Version getVersion(java.lang.String fname)
fname
- java.lang.String
public boolean removeVersion(java.lang.String fname)
fname
- java.lang.String
private boolean remove(Version v)
v
-
public boolean setVersion(java.lang.String fname, java.lang.String description, int major, int minor, int micro)
fname
- major
- minor
- micro
-
private boolean updateVersion(Version old, Version next)
old
- next
-
private boolean insertVersion(java.lang.String fname, java.lang.String description, int major, int minor, int micro)
fname
- major
- minor
- micro
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |