| java.lang.Object org.jasig.portal.tools.versioning.VersionsManager
VersionsManager | public class VersionsManager (Code) | | 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.
author: Mark Boyd mark.boyd@engineer.com version: $Revision: 36690 $ |
Method Summary | |
final public static VersionsManager | getInstance() Returns the singleton instance of the VersionsManager. | public Version | getVersion(String fname) Returns the version for a specified functional name or null if no
version information is available. | public Version[] | getVersions() Returns an array of Versions representing all version information
registered with the VersionsManager. | public synchronized boolean | removeVersion(String fname) Removes version information for the specified functional name. | public synchronized boolean | setVersion(String fname, 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). |
getInstance | final public static VersionsManager getInstance()(Code) | | Returns the singleton instance of the VersionsManager.
VersionManager |
getVersion | public Version getVersion(String fname)(Code) | | Returns the version for a specified functional name or null if no
version information is available.
Parameters: fname - java.lang.String Version |
getVersions | public Version[] getVersions()(Code) | | Returns an array of Versions representing all version information
registered with the VersionsManager.
Version[] |
removeVersion | public synchronized boolean removeVersion(String fname)(Code) | | Removes version information for the specified functional name. Returns
true if version information existed and was removed.
Parameters: fname - java.lang.String boolean |
setVersion | public synchronized boolean setVersion(String fname, String description, int major, int minor, int micro)(Code) | | 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). A database update is performed in this
case.
b) a version does not already exist for this functional name. A database
insert is performed in this case.
Returns true if this call resulted in a database change. Use of primary
keys in the database table is critical for (b) in the scenario where
more than one portal is running against the same database to prevent two
inserts to the table from succeeding and masking which portal
successfully changed the version.
Parameters: fname - Parameters: major - Parameters: minor - Parameters: micro - boolean |
|
|