|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.migration.NodeMigrator
The NodeMigrator class is used for migrating nodes from previous versions of JDeveloper to a new JDeveloper version.
Addins should register NodeMigratorHelper
s to handle customized
migration of nodes they are interested in. That registration is done
on the specific implementation of a node migrator. For example,
workspace migration helpers are registered with the
WorkspaceMigrator
.
Addins access specific migrators by invoking the method
getNodeMigrator(java.lang.String)
specifying the appropriate migrator name
identifier. For example, to get at the workspace migrator the
identifier {link oracle.ide.model.WorkspaceMigrator#MIGRATOR_NAME} would
be used. A migrator identifier is the name of the node class that
migrator works on.
Field Summary | |
static java.lang.String |
MIGRATOR_MAP_DATA
Constant identifying the migration data stored in the TraversableContext . |
Constructor Summary | |
NodeMigrator()
|
Method Summary | |
void |
addHelper(NodeMigratorHelper helper)
Add a NodeMigratorHelper . |
MigrationInfo.MigrationStatus |
checkVersions(MigrationInfo[] infos)
Verify if all nodes can be migrated. |
java.util.List |
doMigration(java.util.List list,
TraversableContext context)
This method invokes the NodeMigratorHelper s to carry out
addin specific migrations. |
java.util.List |
doMigration(TraversableContext context)
Do the actual migration of the nodes. |
protected void |
finishMigration(java.util.List infos)
Conclude the migration process by saving the migrated objects and updating their migration status. |
protected void |
forceSave(Node node)
Makes sure that the specified node is saved. |
protected NodeMigratorHelper[] |
getHelpers()
Get registered NodeMigratorHelper s. |
protected java.util.Map |
getInfoToMigratorMap(TraversableContext context)
Gets from the context the Map identified by the
constant MIGRATOR_MAP_DATA . |
static java.lang.String |
getLookupKey(java.lang.Class clazz)
Build the key used to lookup a node migrator. |
static java.lang.String |
getLookupKey(Node node)
Build the key used to lookup a node migrator. |
static java.lang.String |
getLookupKey(java.lang.String name)
Build the key used to lookup a node migrator. |
abstract MigrationInfo |
getMigrationInfo(Node node)
Get the current MigrationInfo for the specified node. |
MigrationInfo[] |
getMigrationInfos(Node[] nodes)
Get the current MigrationInfo s for the specified nodes. |
protected abstract java.lang.String |
getMsg(MigrationInfo[] infos)
Get the wizard welcome page message. |
static NodeMigrator |
getNodeMigrator(java.lang.String name)
Use this method to access the migrator specified by the name . |
java.util.List |
getPages(MigrationInfo[] infos,
TraversableContext context)
Get the list of wizard pages associated with the specified infos . |
protected abstract java.lang.String |
getSummaryMsg(MigrationInfo[] infos)
Get the message for the wizard summary page. |
protected abstract java.lang.String |
getTitle()
Get the wizard title. |
protected MigrationInfo.MigrationStatus |
invokeWizard(TraversableContext context,
java.util.List pages,
MigrationInfo[] infos)
Invoke the migration wizard. |
protected void |
mapInfoToMigrator(NodeMigrator key,
MigrationInfo info,
java.util.Map map)
Associate the NodeMigrator specified with the given
MigrationInfo by storing these in the specified map . |
MigrationInfo |
migrate(MigrationInfo info)
Migrate the node whose migration information is given. |
abstract MigrationInfo[] |
migrate(MigrationInfo[] infos)
Method called to migrate the nodes recorded in the specified MigrationInfo . |
protected void |
recache(MigrationInfo[] infos,
boolean cacheCopy)
Tells the NodeFactory to recache the copy or original node as
dictated by the cacheCopy parameter. |
void |
removeHelper(NodeMigratorHelper helper)
Remove the specified NodeMigratorHelper . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String MIGRATOR_MAP_DATA
TraversableContext
. This information is a Map
associating a NodeMigrator
with the list of
MigrationInfo
s.
Constructor Detail |
public NodeMigrator()
Method Detail |
public static NodeMigrator getNodeMigrator(java.lang.String name)
name
.
name
- a unique name identifying a node migrator. This name must
be the class name of the nodes the migrator requested is responsible
for migrating.
name
.public static java.lang.String getLookupKey(Node node)
node
- the node whose class is used to build the key.public static java.lang.String getLookupKey(java.lang.String name)
name
- the class name of a node.public static java.lang.String getLookupKey(java.lang.Class clazz)
public abstract MigrationInfo getMigrationInfo(Node node)
MigrationInfo
for the specified node.
node
- the target node for which migration information is being
requested.public abstract MigrationInfo[] migrate(MigrationInfo[] infos)
MigrationInfo
. This method should do the migration without
popping-up an end user graphical user interface.
infos
- information about the nodes that may require migration.
All nodes held in the MigrationInfo
must be of the same
type.
public MigrationInfo[] getMigrationInfos(Node[] nodes)
MigrationInfo
s for the specified nodes.
nodes
- the target nodes for which migration information is being
requested. All nodes must be of the same type.public java.util.List getPages(MigrationInfo[] infos, TraversableContext context)
infos
. Clients must use the context
object
to store the data diplayed in these pages.
infos
- migration information about the nodes to migrate. All nodes
must be of the same type.context
- use the context to store the data gathered from the
pages.
public MigrationInfo migrate(MigrationInfo info)
info
- migration information.
public java.util.List doMigration(TraversableContext context)
context
.
context
- contains a Map
that can be obtained from the
context using the name identifier: MIGRATOR_MAP_DATA
. The
information needed to do the migration is held by this map.public java.util.List doMigration(java.util.List list, TraversableContext context)
NodeMigratorHelper
s to carry out
addin specific migrations.
list
- migration information about the nodes to migrate.context
- contains addin specific migration data that is
passed on to the helpers such that they can use that information
when migrating their data.public void addHelper(NodeMigratorHelper helper)
NodeMigratorHelper
.
helper
- a node migration helper.public void removeHelper(NodeMigratorHelper helper)
NodeMigratorHelper
.
helper
- the node migrator helper to be removed.public MigrationInfo.MigrationStatus checkVersions(MigrationInfo[] infos)
protected abstract java.lang.String getTitle()
protected abstract java.lang.String getMsg(MigrationInfo[] infos)
protected abstract java.lang.String getSummaryMsg(MigrationInfo[] infos)
protected MigrationInfo.MigrationStatus invokeWizard(TraversableContext context, java.util.List pages, MigrationInfo[] infos)
protected NodeMigratorHelper[] getHelpers()
NodeMigratorHelper
s.
protected java.util.Map getInfoToMigratorMap(TraversableContext context)
context
the Map
identified by the
constant MIGRATOR_MAP_DATA
.
protected void mapInfoToMigrator(NodeMigrator key, MigrationInfo info, java.util.Map map)
NodeMigrator
specified with the given
MigrationInfo
by storing these in the specified map
.
key
- the node migrator.info
- the migration information.map
- map associating the migrator with the migration information.protected void finishMigration(java.util.List infos)
infos
- a list of objects that may have been migrated.protected void forceSave(Node node)
node
is saved.
node
- the node to save.protected void recache(MigrationInfo[] infos, boolean cacheCopy)
NodeFactory
to recache the copy or original node as
dictated by the cacheCopy
parameter. This is done
before calling out to the NodeMigratorHelper
s in order to
allow migrator helpers to access the node copy when looking for
the node in the node factory.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.