Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


oracle.ide.migration
Class MigrationManager

java.lang.Object
  extended by oracle.ide.migration.MigrationManager


public abstract class MigrationManager
extends java.lang.Object

The MigrationManager class provides access to the registered Migrator implementations available. The lifespan of the MigrationManager is limited to the point immediately after IDE notification of addins loaded.


Constructor Summary
MigrationManager()
           

 

Method Summary
abstract  void addLazyMigrator(Extension ex, MetaClass mc)
          Add migrators after initial migration.
abstract  void finishMigration()
          Perform any final migration after all addins have been loaded.
abstract  Version getCurrentVersion()
          Utility method for retreiving the Version number to which Migration is taking place.
static MigrationManager getMigrationManager()
          Gets the MigrationMananger instance.
abstract  Migrator getMigrator(java.lang.Class migratorCls)
          Get the Migrator instance of the given Class.
abstract  java.util.List getMigrators()
          Get a List of all Migrator implementations.
abstract  java.io.File getOracleHomeDirectory(java.io.File systemDir)
          Get the Oracle products install directory used by the version of the IDE whose 'System' directory is provided.
abstract  java.io.File getSourceInstallationIfAvailable()
          Returns the source directory for migration if available or null otherwise.
abstract  Version getSourceVersion()
          Utility method for retreiving the Version number from which Migration is taking place.
abstract  void migrate()
          Deprecated. as of 11.1.1.1.0 use @link #migrate(boolean, boolean) instead.
abstract  java.lang.String migrate(boolean userDirectoryCreated, boolean systemDirectoryCreated)
          Migrate user settings from a previous install, optionally deleting the given location.
abstract  java.lang.String migrate(TaskMonitor ts, boolean userDirectoryCreated, boolean systemDirectoryCreated)
          Attempts to determine migration needs and then pops up a dialog to collect user decisions and then executes migration based on user selections.
abstract  void migrateExtension(Extension ex)
          Attempts to migrate a particular extension, in case it was initialized but not migrated.
abstract  void migrateRecentlyInitializedExtension()
          Executes migrators that may have been registered during on-demand loading.
abstract  void registerMigrator(java.lang.String name, Extension desc)
          Register a Migrator implementation for use when migrating a given extension.
static void setMigrationManager(MigrationManager migrationManager)
          Set teh MigrationManager instance.
abstract  boolean startMigratingOnDemand()
          Migration previously happened in one attempt where we collected all the migrators and executed them together.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

MigrationManager

public MigrationManager()

Method Detail

getMigrationManager

public static MigrationManager getMigrationManager()
Gets the MigrationMananger instance. The lifespan of the MigrationManager is limited to the startup process. The MigrationManager instance is disposed of immediately after the IdeEvent.IDE_ADDINS_LOADED event is sent.

setMigrationManager

public static void setMigrationManager(MigrationManager migrationManager)
Set teh MigrationManager instance.

migrate

public abstract java.lang.String migrate(boolean userDirectoryCreated,
                                         boolean systemDirectoryCreated)
Migrate user settings from a previous install, optionally deleting the given location. Normally this method should only ever be called a single time, and only by the IdeCore.
Parameters:
userDirectoryCreated - if true the UserDirectory (where System.x.x.x is located) was created during this session. This variable can be used to determine if this is the first-time install of JDev.
systemDirectoryCreated - if true the System directory (System.x.x.x) was created during this session. This variable can be used to determine if the migration dialog should be shown.

migrate

public abstract java.lang.String migrate(TaskMonitor ts,
                                         boolean userDirectoryCreated,
                                         boolean systemDirectoryCreated)
Attempts to determine migration needs and then pops up a dialog to collect user decisions and then executes migration based on user selections. 1) First Time JDeveloper Install: A) if previous installation is detected (userDirectoryCreated==true). i) determine latest previous installation +list all others (a) Popup migration dialog with above data. B) if previous installation is NOT detected. (i) DO NOTHING. 2) Restart JDeveloper after Role change or New Extension addition A) if previous installation is detected i) if ANY previous installation contained any of the ?new extension? (a) Determine previous installation list (containing extensions) Popup migration dialog with above data. ii) if NO previous installation contained any of the ?new extension? (a) DO NOTHING B) if previous installation is NOT detected. (a) DO NOTHING 3) Forced Migration (via flag or command/menu action) A) Determine latest previous installation + list all others (can be empty set) i) Popup migration dialog with above data. (can be empty set, so manual selection of directory is needed).
Parameters:
ts - TaskMonitor a TaskMonitor object which can be used to report progress. ts can be null.
userDirectoryCreated - if true the UserDirectory (where System.x.x.x is located) was created during this session. This variable can be used to determine if this is the first-time install of JDev.
systemDirectoryCreated - if true the System directory (System.x.x.x) was created during this session. This variable can be used to determine if the migration dialog should be shown.

migrate

public abstract void migrate()
Deprecated. as of 11.1.1.1.0 use @link #migrate(boolean, boolean) instead.

finishMigration

public abstract void finishMigration()
Perform any final migration after all addins have been loaded. Normally this method should only ever be called a single time, and only by the IdeCore.

getMigrators

public abstract java.util.List getMigrators()
Get a List of all Migrator implementations.

getMigrator

public abstract Migrator getMigrator(java.lang.Class migratorCls)
Get the Migrator instance of the given Class.

getOracleHomeDirectory

public abstract java.io.File getOracleHomeDirectory(java.io.File systemDir)
Get the Oracle products install directory used by the version of the IDE whose 'System' directory is provided.
Returns:
the result that would have been obtained by calling Ide.getOracleHomeDirectory() on the version of the IDE whose 'System' directory is provided.

registerMigrator

public abstract void registerMigrator(java.lang.String name,
                                      Extension desc)
Register a Migrator implementation for use when migrating a given extension.
Parameters:
name - fully qualified class name of a Migrator implementation.
desc - extension.

startMigratingOnDemand

public abstract boolean startMigratingOnDemand()
Migration previously happened in one attempt where we collected all the migrators and executed them together. However, now we also execute migration of settings incrementally on demand. This method tells us when to stop collecting migrators and start executing right away.

NOTE: introduced to implement on-demand extension loading.

Returns:
if true we the initial migration has already happened and new migrators should be executed when encountered.

addLazyMigrator

public abstract void addLazyMigrator(Extension ex,
                                     MetaClass mc)
Add migrators after initial migration.

migrateExtension

public abstract void migrateExtension(Extension ex)
Attempts to migrate a particular extension, in case it was initialized but not migrated.

migrateRecentlyInitializedExtension

public abstract void migrateRecentlyInitializedExtension()
Executes migrators that may have been registered during on-demand loading.

getSourceInstallationIfAvailable

public abstract java.io.File getSourceInstallationIfAvailable()
Returns the source directory for migration if available or null otherwise.
Returns:
File the source installation directory, usually of the form [path]/system.x.x.x.x

getSourceVersion

public abstract Version getSourceVersion()
Utility method for retreiving the Version number from which Migration is taking place. Can be null if no migration has occurred.
Returns:
version the Source Version or null

getCurrentVersion

public abstract Version getCurrentVersion()
Utility method for retreiving the Version number to which Migration is taking place. This is the current version of the IDE. Can be null if no migration has occurred.
Returns:
version the current Version or null

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


Copyright © 1997, 2012, Oracle. All rights reserved.