|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.migration.ExtensionMigrator
public abstract class ExtensionMigrator
Migrator implementation for extensions. This implementation will attempt to fetch all extension specific settings values from previous releases of the product, and up date the extension specific settings file accordingly.
Nested Class Summary | |
---|---|
protected static class |
ExtensionMigrator.AdjustedObject
|
Field Summary | |
---|---|
protected boolean |
isSelected
|
protected static java.lang.String |
ROOT_TAG
|
protected static int |
SETTINGS
|
Fields inherited from interface oracle.ide.migration.Migrator |
---|
JDEV_HOME_DIR, SYSTEM_DIR |
Constructor Summary | |
---|---|
ExtensionMigrator()
|
Method Summary | |
---|---|
protected boolean |
addToProductPreferences()
Determines whether the migrated preferences should be added into the Preferences object or remain separate. |
protected ExtensionMigrator.AdjustedObject[] |
adjustObject(java.lang.String inKey,
java.lang.Object inObject)
Override to adjust an object in some way after it has been created by Object2Dom and before it's either saved in the Preferences or ClientSetting object. |
boolean |
canMigrate(int category,
java.io.File sourceDir)
No categories supported. |
java.lang.String[] |
copyPreferenceObject(java.io.File srcFile,
java.io.File destFile,
java.util.List settingKeys,
java.lang.String extensionID)
|
static java.lang.String[] |
copyPreferenceObjectsAsIs(java.io.File srcFile,
java.io.File destFile,
java.util.List settingKeys,
java.lang.String extensionID)
|
protected java.util.Collection<java.lang.String> |
getClassNamesToIgnoreErrorsOn()
Provides a way to suppress errors from Object2Dom when the preferences file is read and contains preferences that are not in the same class loader as the preferences you are migrating. |
java.lang.String |
getDescription(int category)
No descriptions supported. |
protected java.io.File |
getDestFile(java.io.File destDir)
Get the destination File from the given directory. |
protected abstract java.lang.String |
getExtensionID()
Get the extension ID for which settings should be persisted. |
protected java.io.File |
getIde1013ExtensionDirectory(java.io.File sourceDir)
|
int[] |
getMigrationCategories()
No categories supported. |
protected java.lang.ClassLoader |
getMigratorClassLoader()
Override to provide a class loader other than the one that supplies the subclass of ExtensionMigrator. |
protected java.lang.String |
getRootTag(java.net.URL sourceURL)
Override this only if the file that's storing your preferences uses a different root tag than ROOT_TAG . |
protected abstract java.util.List |
getSettingKeys()
Get a complete list of all key values for persisting in the ClientSetting object associated with an extension. |
protected java.io.File |
getSourceFile(java.io.File sourceDir)
Get the source File from the given directory. |
protected java.io.File |
getSourceFileOrJDevExtrasFile(java.io.File sourceDir)
Get the source File from the given directory with the name preferences.xml. |
boolean |
isSelected(int category)
No categories supported. |
protected java.lang.Class |
loadClass(org.w3c.dom.Element element)
|
java.lang.String[] |
migrate(java.io.File sourceDir,
java.io.File destDir)
Migrate all flagged categories, from a given source directory, to a given destination directory. |
void |
setSelected(int category,
boolean selected)
No categories supported. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int SETTINGS
protected boolean isSelected
protected static final java.lang.String ROOT_TAG
Constructor Detail |
---|
public ExtensionMigrator()
Method Detail |
---|
public int[] getMigrationCategories()
getMigrationCategories
in interface Migrator
public java.lang.String getDescription(int category)
getDescription
in interface Migrator
category
- ignored.
public boolean canMigrate(int category, java.io.File sourceDir)
canMigrate
in interface Migrator
category
- ignored.sourceDir
- ignored.
public void setSelected(int category, boolean selected)
setSelected
in interface Migrator
category
- ignored.selected
- ignored.public boolean isSelected(int category)
isSelected
in interface Migrator
category
- ignored.
public java.lang.String[] migrate(java.io.File sourceDir, java.io.File destDir)
Migrator
migrate
in interface Migrator
public static java.lang.String[] copyPreferenceObjectsAsIs(java.io.File srcFile, java.io.File destFile, java.util.List settingKeys, java.lang.String extensionID)
public java.lang.String[] copyPreferenceObject(java.io.File srcFile, java.io.File destFile, java.util.List settingKeys, java.lang.String extensionID)
protected java.lang.ClassLoader getMigratorClassLoader()
protected ExtensionMigrator.AdjustedObject[] adjustObject(java.lang.String inKey, java.lang.Object inObject)
protected java.io.File getSourceFile(java.io.File sourceDir)
sourceDir
- the source directory.
protected java.io.File getSourceFileOrJDevExtrasFile(java.io.File sourceDir)
sourceDir
- the source directory.
protected java.io.File getDestFile(java.io.File destDir)
destDir
- the destination directory.
protected boolean addToProductPreferences()
protected java.util.Collection<java.lang.String> getClassNamesToIgnoreErrorsOn()
protected java.lang.String getRootTag(java.net.URL sourceURL)
ROOT_TAG
. The only known case of
this current is IdeMigrator to handle migrating settings.xml and it needs
to vary the root tag based on what URL it is trying to work with
protected java.lang.Class loadClass(org.w3c.dom.Element element) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected abstract java.util.List getSettingKeys()
protected abstract java.lang.String getExtensionID()
protected java.io.File getIde1013ExtensionDirectory(java.io.File sourceDir)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.1.0) E17493-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |