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

E13403-04

oracle.ide.migration
Class ExtensionMigrator

java.lang.Object
  extended by oracle.ide.migration.ExtensionMigrator
All Implemented Interfaces:
Migrator
Direct Known Subclasses:
BookmarkMigrator, CodeEditorMigrator

public abstract class ExtensionMigrator
extends java.lang.Object
implements Migrator

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.


Field Summary
protected  boolean isSelected
           
protected static int SETTINGS
           
 
Fields inherited from interface oracle.ide.migration.Migrator
JDEV_HOME_DIR, SYSTEM_DIR
 
Constructor Summary
ExtensionMigrator()
           
 
Method Summary
 boolean canMigrate(int category, java.io.File sourceDir)
          No categories supported.
static java.lang.String[] copyPreferenceObjectsAsIs(java.io.File srcFile, java.io.File destFile, java.util.List settingKeys, java.lang.String extensionID)
           
 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.
 int[] getMigrationCategories()
          No categories supported.
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.
 boolean isSelected(int category)
          No categories supported.
 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

SETTINGS

protected static final int SETTINGS
See Also:
Constant Field Values

isSelected

protected boolean isSelected
Constructor Detail

ExtensionMigrator

public ExtensionMigrator()
Method Detail

getMigrationCategories

public int[] getMigrationCategories()
No categories supported.

Specified by:
getMigrationCategories in interface Migrator
Returns:
an empty array.

getDescription

public java.lang.String getDescription(int category)
No descriptions supported.

Specified by:
getDescription in interface Migrator
Parameters:
category - ignored.
Returns:
null.

canMigrate

public boolean canMigrate(int category,
                          java.io.File sourceDir)
No categories supported.

Specified by:
canMigrate in interface Migrator
Parameters:
category - ignored.
sourceDir - ignored.
Returns:
true.

setSelected

public void setSelected(int category,
                        boolean selected)
No categories supported.

Specified by:
setSelected in interface Migrator
Parameters:
category - ignored.
selected - ignored.

isSelected

public boolean isSelected(int category)
No categories supported.

Specified by:
isSelected in interface Migrator
Parameters:
category - ignored.
Returns:
true.

migrate

public java.lang.String[] migrate(java.io.File sourceDir,
                                  java.io.File destDir)
Description copied from interface: Migrator
Migrate all flagged categories, from a given source directory, to a given destination directory. Does nothing if no categories have been flagged for migration.

Specified by:
migrate in interface Migrator

copyPreferenceObjectsAsIs

public static java.lang.String[] copyPreferenceObjectsAsIs(java.io.File srcFile,
                                                           java.io.File destFile,
                                                           java.util.List settingKeys,
                                                           java.lang.String extensionID)

getSourceFile

protected java.io.File getSourceFile(java.io.File sourceDir)
Get the source File from the given directory. By default assumes a File located in sourceDir of the name ClientSetting.FILENAME, else IdeSettings.FILENAME

Parameters:
sourceDir - the source directory.
Returns:
the settings File located in the given directory.

getDestFile

protected java.io.File getDestFile(java.io.File destDir)
Get the destination File from the given directory. By default assumes a File located in destDir of the name ClientSetting.FILENAME.

Parameters:
destDir - the destination directory.
Returns:
the settings File located in the given directory.

getSettingKeys

protected abstract java.util.List getSettingKeys()
Get a complete list of all key values for persisting in the ClientSetting object associated with an extension.

Returns:
a list of String keys.

getExtensionID

protected abstract java.lang.String getExtensionID()
Get the extension ID for which settings should be persisted.

Returns:
an extension ID. Must not return null.

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.