com.atlassian.greenhopper.upgrade
Class XProjectDataMigrator

java.lang.Object
  extended by com.atlassian.greenhopper.upgrade.XProjectDataMigrator

@Service(value="gh-xprojectDataMigrator")
public class XProjectDataMigrator
extends java.lang.Object

Encapsulates all the logic to migrate data from pre-6.0 to GreenHopper 6.0.


Field Summary
static java.lang.String SERVICE
           
 
Constructor Summary
XProjectDataMigrator()
           
 
Method Summary
 void markXProjectAsUpgrading(java.lang.Long xprojectId)
           
protected  void migrateProject(com.atlassian.jira.project.Project project)
          Migrates a single project into a XProject This method executes the migration if either the XProject with the projects name does not exist or the XProject is still marked as being in the process of being upgraded.
 void migrateProjects()
           
protected  boolean shouldMigrate(com.atlassian.jira.project.Project project)
          Checks whether the given project should be migrated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVICE

public static final java.lang.String SERVICE
See Also:
Constant Field Values
Constructor Detail

XProjectDataMigrator

public XProjectDataMigrator()
Method Detail

migrateProjects

public void migrateProjects()

markXProjectAsUpgrading

public void markXProjectAsUpgrading(java.lang.Long xprojectId)

migrateProject

protected void migrateProject(com.atlassian.jira.project.Project project)
Migrates a single project into a XProject This method executes the migration if either the XProject with the projects name does not exist or the XProject is still marked as being in the process of being upgraded. This will allow us reapplying/upgrading the xproject again in case a previous upgrade failed during the actual execution. Only if all and everything has been upgraded successfully the upgrading flag is removed, thus no further upgrading attempts are tried on the XProject.


shouldMigrate

protected boolean shouldMigrate(com.atlassian.jira.project.Project project)
Checks whether the given project should be migrated



Copyright © 2007-2011 Atlassian. All Rights Reserved.