Class UpgradeManagerImpl
java.lang.Object
com.atlassian.crowd.manager.upgrade.UpgradeManagerImpl
- All Implemented Interfaces:
UpgradeManager
-
Constructor Summary
ConstructorDescriptionUpgradeManagerImpl
(PropertyManager propertyManager, net.sf.ehcache.CacheManager cacheManager, CrowdBootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, List<UpgradeTask> upgradeTasks, org.springframework.transaction.PlatformTransactionManager transactionManager) -
Method Summary
Modifier and TypeMethodDescriptionMethod to fire off the upgrade processprotected int
int
This gets the pre-build number.boolean
Determines whether we need to run the upgrade or not.
-
Constructor Details
-
UpgradeManagerImpl
public UpgradeManagerImpl(PropertyManager propertyManager, net.sf.ehcache.CacheManager cacheManager, CrowdBootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, List<UpgradeTask> upgradeTasks, org.springframework.transaction.PlatformTransactionManager transactionManager)
-
-
Method Details
-
getApplicationBuildNumber
protected int getApplicationBuildNumber()- Returns:
- the build number of the currently executing version of Crowd. The Crowd data will be upgraded to this version.
-
getDataBuildNumber
public int getDataBuildNumber()Description copied from interface:UpgradeManager
This gets the pre-build number. i.e The build number present in the database, BEFORE the upgrade process has been run.- Specified by:
getDataBuildNumber
in interfaceUpgradeManager
- Returns:
- the build number of the data in the database. The Crowd data will be upgraded from this version.
-
getRequiredUpgrades
- Specified by:
getRequiredUpgrades
in interfaceUpgradeManager
- Returns:
- list of upgrade tasks that are required to be executed (in order).
-
needUpgrade
public boolean needUpgrade()Description copied from interface:UpgradeManager
Determines whether we need to run the upgrade or not.- Specified by:
needUpgrade
in interfaceUpgradeManager
- Returns:
boolean
whether the build was successful or not
-
doUpgrade
Description copied from interface:UpgradeManager
Method to fire off the upgrade process- Specified by:
doUpgrade
in interfaceUpgradeManager
- Returns:
Collection
a string collection of error messages. Collection not empty denotes error occurred on upgrade- Throws:
Exception
- error occurred during upgrade.
-
getPropertyManager
-
getUpgradeTasks
-
getBootstrapManager
-