com.atlassian.bamboo.upgrader
Class DefaultVersionUpgrader

java.lang.Object
  extended by com.atlassian.bamboo.upgrader.DefaultVersionUpgrader
All Implemented Interfaces:
VersionUpgrader

public class DefaultVersionUpgrader
extends Object
implements VersionUpgrader

This class upgrades the bamboo persisted files to the latest version


Field Summary
 
Fields inherited from interface com.atlassian.bamboo.upgrader.VersionUpgrader
CURRENT_VERSION
 
Constructor Summary
DefaultVersionUpgrader(File buildDir, File configurationDirectory)
           
 
Method Summary
 void clearStatusMessages()
           
protected  List getConvertors(File buildDir, File configurationDirectory)
           
 int getCurrentVersion()
          Returns the actual version of the current version.
 int getPercentageComplete()
           
 String getUpgradeStatusMessage()
           
 VersionStamper getVersionStamper()
           
 void setBuildDir(File buildDir)
          Where's the build data files that need updating?
 void setCounter(int counter)
           
 void setCurrentVersion(int currentVersion)
           
 void setDataDirectory(File dataDirectory)
          Where's the configuration data files that need updating?
 void updateToCurrentVersion()
          Update the current xml-data files to the latest version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVersionUpgrader

public DefaultVersionUpgrader(File buildDir,
                              File configurationDirectory)
Method Detail

getConvertors

protected List getConvertors(File buildDir,
                             File configurationDirectory)

updateToCurrentVersion

public void updateToCurrentVersion()
Update the current xml-data files to the latest version

Specified by:
updateToCurrentVersion in interface VersionUpgrader

getUpgradeStatusMessage

public String getUpgradeStatusMessage()
Specified by:
getUpgradeStatusMessage in interface VersionUpgrader

setBuildDir

public void setBuildDir(File buildDir)
Description copied from interface: VersionUpgrader
Where's the build data files that need updating?

Specified by:
setBuildDir in interface VersionUpgrader
Parameters:
buildDir - The bamboo build data directory

setDataDirectory

public void setDataDirectory(File dataDirectory)
Description copied from interface: VersionUpgrader
Where's the configuration data files that need updating?

Specified by:
setDataDirectory in interface VersionUpgrader
Parameters:
dataDirectory - The bamboo configuration data directory

getCurrentVersion

public int getCurrentVersion()
Description copied from interface: VersionUpgrader
Returns the actual version of the current version. may be < CURRENT_VERSION as may need to be upgraded!

Specified by:
getCurrentVersion in interface VersionUpgrader
Returns:
The version of the current data.

getVersionStamper

public VersionStamper getVersionStamper()

getPercentageComplete

public int getPercentageComplete()
Specified by:
getPercentageComplete in interface VersionUpgrader

clearStatusMessages

public void clearStatusMessages()
Specified by:
clearStatusMessages in interface VersionUpgrader

setCurrentVersion

public void setCurrentVersion(int currentVersion)

setCounter

public void setCounter(int counter)


Copyright © 2006 Atlassian Software Systems. All Rights Reserved.