|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.upgrade.UpgradeManagerImpl
Field Summary | |
(package private) com.atlassian.license.License |
license
|
Constructor Summary | |
|
UpgradeManagerImpl()
This constructor adds all the upgrade tasks to the relevant Maps |
protected |
UpgradeManagerImpl(java.util.Collection standardUpgrades,
java.util.Collection professionalUpgrades,
java.util.Collection enterpriseUpgrades)
For testing purposes only. |
|
UpgradeManagerImpl(java.lang.String standardFileName,
java.lang.String professionalFileName,
java.lang.String enterpriseFileName)
|
Method Summary | |
void |
addToUpgradeHistory(java.lang.Class upgradeClass)
|
java.util.Collection |
doEditionUpgrade(com.atlassian.license.License originalLicense)
Takes the original JIRA edition (the edition before the upgrade) and performs all relevant enterprise upgrade tasks plus any professional upgrade tasks and any standard upgarde tasks that need to be run from the build number stored in the database to the current build number. |
java.util.Collection |
doSetupUpgrade()
Performs any upgrades that may be needed as a result of the Setup procedure of JIRA Get the set of setupUpgradeNumbers which are to be performed for this setup. |
protected java.util.Collection |
doUpgradeIfNeeded(java.lang.String defaultBackupPath)
|
java.util.Collection |
doUpgradeIfNeededAndAllowed(java.lang.String backupPath)
Performs the upgrade if one is required and the license is not too old to proceed with the upgrade. |
java.util.SortedMap |
getAllEnterpriseUpgrades()
|
java.util.SortedMap |
getAllProfessionalUpgrades()
|
java.util.SortedMap |
getAllStandardUpgrades()
|
java.lang.String |
getExportFilePath()
|
java.lang.String |
getJiraBuildNumber()
Get the current build number from the database. |
java.util.SortedMap |
getRelevantUpgradesFromList(java.util.Map upgradeMap)
For each upgrade in the upgradeMap, test whether it is needed (ie upgrade version is greater than the version in the database), and then add to set. |
java.util.SortedMap |
getSetupEnterpriseUpgrades()
|
java.util.SortedMap |
getSetupProfessionalUpgrades()
|
java.util.SortedMap |
getSetupStandardUpgrades()
|
boolean |
needUpgrade()
Returns true if the current build number is not equal to the build number in the database. |
void |
printErrors(java.util.Collection errors)
Print errors to log4j at error level |
static void |
setJiraBuildNumber(java.lang.String version)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
com.atlassian.license.License license
Constructor Detail |
protected UpgradeManagerImpl(java.util.Collection standardUpgrades, java.util.Collection professionalUpgrades, java.util.Collection enterpriseUpgrades)
professionalUpgrades
- A collection containing all the professional upgrades that are needed to be run.public UpgradeManagerImpl(java.lang.String standardFileName, java.lang.String professionalFileName, java.lang.String enterpriseFileName)
public UpgradeManagerImpl()
Method Detail |
public boolean needUpgrade()
needUpgrade
in interface UpgradeManager
public java.util.Collection doUpgradeIfNeededAndAllowed(java.lang.String backupPath) throws IllegalXMLCharactersException
doUpgradeIfNeededAndAllowed
in interface UpgradeManager
backupPath
- - a path to the default location of the export
IllegalXMLCharactersException
protected java.util.Collection doUpgradeIfNeeded(java.lang.String defaultBackupPath) throws IllegalXMLCharactersException
IllegalXMLCharactersException
public void printErrors(java.util.Collection errors)
printErrors
in interface UpgradeManager
errors
- A collection of strings, describing all the errors that occurred.public java.util.Collection doEditionUpgrade(com.atlassian.license.License originalLicense)
getRelevantUpgradesFromList(java.util.Map)
if upgrading from the standard edition.
Get the relevant standard upgrade tasks using getRelevantUpgradesFromList(java.util.Map)
Get the sortedset of upgradeNumbers which are to be performed for this upgrade. Add to this set ALL the numbers for upgrade tasks that need to
be performed
Iterate over these numbers and if either of the standard, professional or enterprise maps contains an
upgradetask with this number then do the upgrade
If errors are found, it will cancel the upgrade, and return the list of errors.
For each upgrade that happens successfully, if the build number of the upgrade is greater than the
build number stored in the database, the build number in the database will be set to the build number of the successfully
completed upgrade, so that if one fails, you do not have to repeat all the upgrades that have already run.
If there are no errors from the entire upgrade, the build number in the database is
incremented to the current build number. This is because there may be no upgrades
for a particular version & needUpgrade() checks build no in database.
doEditionUpgrade
in interface UpgradeManager
public java.util.Collection doSetupUpgrade()
doSetupUpgrade
in interface UpgradeManager
public java.util.SortedMap getRelevantUpgradesFromList(java.util.Map upgradeMap)
getRelevantUpgradesFromList
in interface UpgradeManager
public java.lang.String getJiraBuildNumber()
getJiraBuildNumber
in interface UpgradeManager
public static void setJiraBuildNumber(java.lang.String version)
public void addToUpgradeHistory(java.lang.Class upgradeClass) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public java.util.SortedMap getAllEnterpriseUpgrades()
getAllEnterpriseUpgrades
in interface UpgradeManager
public java.util.SortedMap getAllProfessionalUpgrades()
getAllProfessionalUpgrades
in interface UpgradeManager
public java.util.SortedMap getAllStandardUpgrades()
getAllStandardUpgrades
in interface UpgradeManager
public java.util.SortedMap getSetupEnterpriseUpgrades()
getSetupEnterpriseUpgrades
in interface UpgradeManager
public java.util.SortedMap getSetupProfessionalUpgrades()
getSetupProfessionalUpgrades
in interface UpgradeManager
public java.util.SortedMap getSetupStandardUpgrades()
getSetupStandardUpgrades
in interface UpgradeManager
public java.lang.String getExportFilePath()
getExportFilePath
in interface UpgradeManager
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |