public class WorkspaceMigrator extends NodeMigrator
NodeMigrator.getNodeMigrator(java.lang.String)
specifying the name
identifier: MIGRATOR_NAME
.
Migrator helpers registered with the WorkspaceMigrator
will execute before migrator helpers registered with
ProjectMigrator
.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MIGRATOR_NAME
String identifier used to lookup a specific node migrator.
|
static java.lang.String |
WORKSPACE_NODE
String identifier used to lookup the workspace node from a
given
TraversableContext . |
MIGRATOR_MAP_DATA
Constructor and Description |
---|
WorkspaceMigrator() |
Modifier and Type | Method and Description |
---|---|
protected void |
callHelpersMigrate(MigrationInfo info,
TraversableContext context) |
protected NodeMigratorHelperReference[] |
getHelperReferences(MigrationInfo info)
Returns references to NodeMigratorHelpers that are newer than the version
number stored in the project file.
|
protected NodeMigratorHelper[] |
getHelpers(MigrationInfo info)
Deprecated.
|
MigrationInfo |
getMigrationInfo(Node node)
Get the current
MigrationInfo for the specified node. |
protected java.lang.String |
getMsg(MigrationInfo[] infos)
Get the wizard welcome page message.
|
java.util.List |
getPages(MigrationInfo[] infos,
TraversableContext context)
Get the list of wizard pages associated with the specified
infos . |
protected java.lang.String |
getSummaryMsg(MigrationInfo[] infos)
Get the message for the wizard summary page.
|
protected java.lang.String |
getTitle()
Get the wizard title.
|
protected float |
getWeight()
Returns the weight which we wish to give to the migrator when migrating it.
|
protected void |
postMigrate(MigrationInfo[] infos,
TraversableContext context)
Method called after migration is complete.
|
protected void |
preMigrate(MigrationInfo[] infos,
TraversableContext context)
Method called before migration is initiated.
|
addHelper, callHelperMigrate, checkVersioning, checkVersions, doMigration, doMigration, finishMigration, getHelperReferences, getHelpers, getInfoToMigratorMap, getLookupKey, getMigrationInfos, getNodeMigrator, getTraversableContext, invokeWizard, mapInfoToMigrator, migrate, migrate, migratorType, removeHelper, reportMigration
public static final java.lang.String MIGRATOR_NAME
public static final java.lang.String WORKSPACE_NODE
TraversableContext
. Project migrators that need to find
out the workspace triggering migration can use this constant to
find the workspace.
If the TraversableContext.get(WORKSPACE_NODE) method returns a
null
value, it generally implies that the project
is being migrated directly, without the workspace. This can happen
when a user opens a project in the context of a workspace already
opened in the navigator.public java.util.List getPages(MigrationInfo[] infos, TraversableContext context)
NodeMigrator
infos
. Clients must use the context
object
to store the data diplayed in these pages.getPages
in class NodeMigrator
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.protected final void preMigrate(MigrationInfo[] infos, TraversableContext context)
NodeMigrator
preMigrate
in class NodeMigrator
infos
- information about the nodes that may require migration.
All nodes held in the MigrationInfo
must be of the same
type.context
- contains a Map
that can be obtained from the
context using the name identifier: NodeMigrator.MIGRATOR_MAP_DATA
. The
information needed to do the migration is held by this map.protected final void postMigrate(MigrationInfo[] infos, TraversableContext context)
NodeMigrator
postMigrate
in class NodeMigrator
infos
- information about the nodes that may require migration.
All nodes held in the MigrationInfo
must be of the same
type.context
- contains addin specific migration data that is
passed on to the helpers such that they can use that information
when migrating their data.protected java.lang.String getMsg(MigrationInfo[] infos)
NodeMigrator
getMsg
in class NodeMigrator
protected java.lang.String getTitle()
NodeMigrator
getTitle
in class NodeMigrator
protected java.lang.String getSummaryMsg(MigrationInfo[] infos)
NodeMigrator
getSummaryMsg
in class NodeMigrator
protected void callHelpersMigrate(MigrationInfo info, TraversableContext context)
callHelpersMigrate
in class NodeMigrator
protected float getWeight()
NodeMigrator
getWeight
in class NodeMigrator
public MigrationInfo getMigrationInfo(Node node)
NodeMigrator
MigrationInfo
for the specified node.getMigrationInfo
in class NodeMigrator
node
- the target node for which migration information is being
requested.@Deprecated protected NodeMigratorHelper[] getHelpers(MigrationInfo info)
NodeMigrator
NodeMigratorHelper
s that are newer than the version
number stored in the project file.getHelpers
in class NodeMigrator
protected NodeMigratorHelperReference[] getHelperReferences(MigrationInfo info)
NodeMigrator
getHelperReferences
in class NodeMigrator