Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

oracle.ide.migration
Class NodeMigratorHelper

java.lang.Object
  extended by oracle.ide.migration.NodeMigratorHelper
Direct Known Subclasses:
OutputDirectoryMigrator, ProjectLibraryMigrator, ResourcePathsMigrator, WorkingSetsMigratorHelper

public abstract class NodeMigratorHelper
extends java.lang.Object

NodeMigratorHelper should be implemented by addins that need to migrate documents from previous versions of JDeveloper to a new JDeveloper version.

Addins that implement this interface need to register an instance of their implementation with the appropriate node migrator. Specific node migrators are looked up using the method: NodeMigrator.getNodeMigrator(java.lang.String). The key used to lookup a migrator is built by calling the NodeMigrator.getLookupKey(oracle.ide.model.Node) passing the class name of the node type handled by the migrator sought.

A node migrator can also be located using the migrator name constant generally defined in a migrator class. By convention, that constant is named: MIGRATOR_NAME. For example, to get at the workspace migrator do:

NodeMigrator.getNodeMigrator( WorkspaceMigrator.MIGRATOR_NAME );

This call returns the workspace migrator if available, otherwise, it returns null.


Constructor Summary
NodeMigratorHelper()
           
 
Method Summary
 java.lang.String getNodeMigratorHelperKey()
          For a NodeMigrator that tracks component version history, the migrator key is used for storing and retrieving the part of the version history related to the NodeMigratorHelper.
 java.lang.String getNodeMigratorHelperVersion()
          The migrator version is used to determine whether a particular migrator needs to be applied based on any stored component version history.
 java.util.List getPages(MigrationInfo[] infos, TraversableContext context)
          Get the traversal pages to be displayed by the node migration wizard.
abstract  void migrate(MigrationInfo[] infos, TraversableContext context)
          Method called to migrate the nodes recorded in the specified MigrationInfo.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeMigratorHelper

public NodeMigratorHelper()
Method Detail

migrate

public abstract void migrate(MigrationInfo[] infos,
                             TraversableContext context)
Method called to migrate the nodes recorded in the specified MigrationInfo. Helpers should not save nodes during migration because this can cause problems for proceeding migrator helpers, possibly preventing them from performing migration.

Parameters:
infos - information about the nodes that may require migration.
context - contains addin specific migration data that is passed on to the helpers such that they can use that information when migrating their data.

getPages

public java.util.List getPages(MigrationInfo[] infos,
                               TraversableContext context)
Get the traversal pages to be displayed by the node migration wizard. Addins should store page data in the given context object. This object is given to the page when the user navigates to it.

Parameters:
infos - information about the nodes that may require migration.
context - contains addin specific migration data that is passed on to the helpers such that they can use that information when migrating their data.
Returns:
the traversable wizard pages.

getNodeMigratorHelperKey

public java.lang.String getNodeMigratorHelperKey()
For a NodeMigrator that tracks component version history, the migrator key is used for storing and retrieving the part of the version history related to the NodeMigratorHelper. For example, in the case of a Project migration, the migrator key is passed to the methods of ProjectVersion. By default, the key is the fully qualified class name of the NodeMigratorHelper subclass. The key must not be null.


getNodeMigratorHelperVersion

public java.lang.String getNodeMigratorHelperVersion()
The migrator version is used to determine whether a particular migrator needs to be applied based on any stored component version history. Version numbers are compared through the VersionNumber class, so whenever possible, the version string should use a dot-delimited notation with only numbers, e.g. "10.1.3.0.1".

By default, this method returns the version string 11.1.1.1.0 You must override this method when your data format changes from one build to the next. Beginning with 11.1.1.1.0 any data format changes must be absolutly necessary and approved.


Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1)

E13403-04

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