Skip navigation links
oracle.jdevimpl.audit.preferences
Class AuditPreferencesMigrator
java.lang.Object
oracle.ide.migration.ExtensionMigrator
oracle.jdevimpl.audit.preferences.AuditPreferencesMigrator
- All Implemented Interfaces:
- Migrator
-
public class AuditPreferencesMigrator
- extends 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 key, java.lang.Object object)
Unset any migrated values that are at the default values. |
boolean |
canMigrate(int category, java.io.File sourceDir)
No categories supported. |
protected java.io.File |
getDestFile(java.io.File destDir)
Get the destination File from the given directory. |
protected java.lang.String |
getExtensionID()
Get the extension ID for which settings should be persisted. |
protected 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. |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuditPreferencesMigrator
public AuditPreferencesMigrator()
getSettingKeys
protected java.util.List getSettingKeys()
- Description copied from class:
ExtensionMigrator
- Get a complete list of all key values for persisting in the ClientSetting object associated with an extension.
-
- Specified by:
getSettingKeys
in class ExtensionMigrator
-
- Returns:
- a list of String keys.
getExtensionID
protected java.lang.String getExtensionID()
- Description copied from class:
ExtensionMigrator
- Get the extension ID for which settings should be persisted.
-
- Specified by:
getExtensionID
in class ExtensionMigrator
-
- Returns:
- an extension ID. Must not return null.
addToProductPreferences
protected boolean addToProductPreferences()
- Description copied from class:
ExtensionMigrator
- Determines whether the migrated preferences should be added into the Preferences object or remain separate. This can only be done for preferences which have been modified to use HashStructureAdapter. If the preferences are to be added into the preferences object override this method and return true.
-
- Overrides:
addToProductPreferences
in class ExtensionMigrator
adjustObject
protected ExtensionMigrator.AdjustedObject[] adjustObject(java.lang.String key,
java.lang.Object object)
- Unset any migrated values that are at the default values.
-
- Overrides:
adjustObject
in class ExtensionMigrator
canMigrate
public boolean canMigrate(int category,
java.io.File sourceDir)
- Description copied from class:
ExtensionMigrator
- No categories supported.
-
- Specified by:
canMigrate
in interface Migrator
- Overrides:
canMigrate
in class ExtensionMigrator
-
- Parameters:
category
- ignored.
sourceDir
- 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
- Overrides:
migrate
in class ExtensionMigrator
getSourceFile
protected java.io.File getSourceFile(java.io.File sourceDir)
- Description copied from class:
ExtensionMigrator
- Get the source File from the given directory. By default assumes a File located in sourceDir of the name ClientSetting.FILENAME, else IdeSettings.FILENAME
-
- Overrides:
getSourceFile
in class ExtensionMigrator
-
- Parameters:
sourceDir
- the source directory.
- Returns:
- the settings File located in the given directory.
getDestFile
protected java.io.File getDestFile(java.io.File destDir)
- Description copied from class:
ExtensionMigrator
- Get the destination File from the given directory. By default assumes a File located in destDir of the name ClientSetting.FILENAME.
-
- Overrides:
getDestFile
in class ExtensionMigrator
-
- Parameters:
destDir
- the destination directory.
- Returns:
- the settings File located in the given directory.
Skip navigation links
Copyright © 1997, 2011, Oracle. All rights reserved.