|
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.XMLMigrator
The XMLMigrator is a base implementation of a first phase Migrator which operates upon an XML file. First phase Migrator subclasses need only provide implementations for the abstract methods. If desired, a second phase Migrator subclass may be written by additionally overriding the migrate method to register an IdeListener and immediately return without doing anything more (i.e. do not invoke the migrate implmentation provided here). The second phase Migrator subclass would then perform its migration tasks upon notification of the addinsLoaded event of the IdeListener registered in its migrate implementation. Note that second phase migration only manipulates live objects already initialized from sources migrated by a first phase Migrator implementation.
Nested Class Summary | |
static class |
XMLMigrator.MigrationLogger
|
Field Summary |
Fields inherited from interface oracle.ide.migration.Migrator |
JDEV_HOME_DIR, SYSTEM_DIR |
Constructor Summary | |
protected |
XMLMigrator(int[] categories)
|
Method Summary | |
protected java.lang.Object |
adjustObject(java.io.File sourceDir,
java.io.File destDir,
java.lang.Object obj)
Perform any postprocessing necessary before migrating the file. |
boolean |
canMigrate(int category,
java.io.File sourceDir)
Determine whether the settings can be migrated from the given directory. |
protected int |
categoryToIndex(int category)
Get the internal index of the given category. |
protected java.io.File |
getDestFile(java.io.File sourceDir,
java.io.File destDir)
Get the File to hold the information being migrated. |
protected abstract java.lang.String |
getFileName()
Get the filename to migrate. |
protected XMLMigrator.MigrationLogger |
getLogger()
|
int[] |
getMigrationCategories()
Get an array of unique id values representing available categories to migrate. |
protected abstract java.lang.String |
getNamespaceURI()
Get the XML namespace URI. |
protected oracle.ide.marshal.xml.Object2Dom |
getObjectStore()
|
protected abstract java.lang.String |
getRootTag()
Get the XML root element tag. |
protected java.io.File |
getSourceFile(java.io.File sourceDir,
java.io.File destDir)
Get the File containing the information to be migrated. |
protected boolean |
isAnyCategorySelected()
Determine whether any categories are selected. |
boolean |
isSelected(int category)
Determine whether a category has been flagged for migration. |
protected boolean |
isValidCategory(int category)
Determine whether the given category is valid for this Migrator. |
java.lang.String[] |
migrate(java.io.File sourceDir,
java.io.File destDir)
Migrate the settings from a given source directory to a given destination directory. |
protected void |
prepareToMigrate()
Perform any preprocessing necessary before migrating the file. |
protected java.lang.Object |
readObject(java.io.File sourceDir,
java.io.File destDir)
Read in the settings. |
void |
setSelected(int category,
boolean selected)
Flag a category as selected for migration. |
protected void |
writeObject(java.io.File sourceDir,
java.io.File destDir,
java.lang.Object settings)
Write out the settings. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.migration.Migrator |
getDescription |
Constructor Detail |
protected XMLMigrator(int[] categories)
Method Detail |
public final int[] getMigrationCategories()
getMigrationCategories
in interface Migrator
public void setSelected(int category, boolean selected)
setSelected
in interface Migrator
public final boolean isSelected(int category)
isSelected
in interface Migrator
public boolean canMigrate(int category, java.io.File sourceDir)
canMigrate
in interface Migrator
public java.lang.String[] migrate(java.io.File sourceDir, java.io.File destDir)
migrate
in interface Migrator
protected abstract java.lang.String getFileName()
protected abstract java.lang.String getNamespaceURI()
protected abstract java.lang.String getRootTag()
protected final boolean isValidCategory(int category)
protected final int categoryToIndex(int category)
protected final boolean isAnyCategorySelected()
protected void prepareToMigrate()
protected java.lang.Object readObject(java.io.File sourceDir, java.io.File destDir) throws java.lang.Exception
java.lang.Exception
protected void writeObject(java.io.File sourceDir, java.io.File destDir, java.lang.Object settings) throws java.lang.Exception
java.lang.Exception
protected java.lang.Object adjustObject(java.io.File sourceDir, java.io.File destDir, java.lang.Object obj) throws java.lang.Exception
java.lang.Exception
protected java.io.File getSourceFile(java.io.File sourceDir, java.io.File destDir)
protected java.io.File getDestFile(java.io.File sourceDir, java.io.File destDir)
protected final XMLMigrator.MigrationLogger getLogger()
protected final oracle.ide.marshal.xml.Object2Dom getObjectStore()
|
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.