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

E13403-04

oracle.ide.config
Class Preferences

java.lang.Object
  extended by oracle.javatools.data.HashStructureAdapter
      extended by oracle.ide.config.Preferences
All Implemented Interfaces:
PropertyStorage

public final class Preferences
extends HashStructureAdapter
implements PropertyStorage

Class that represents shapeable Preferences. These preferences are stored in a HashStructure format and saved in a file named product-preferences.xml in the product extension's directory -- i.e. under the system directory, it's the subdirectory whose name matches (modulo any version portion) the "ide.product" system property.


Field Summary
static java.lang.String DATA_KEY
          Key used to lookup a copy of the Preferences object within other data structures, such as in the TraversableContext of the IDE Preferences dialog.
 
Fields inherited from class oracle.javatools.data.HashStructureAdapter
_hash
 
Method Summary
 void clearDirty()
          Clears the dirty flag for the Preferences.
static Preferences getPreferences()
          Returns the product-level Preferences object.
 HashStructure getProperties()
           
 boolean isDirty()
           
 void save()
          Saves the product-level Preferences object to its fixed location in the system directory.
 
Methods inherited from class oracle.javatools.data.HashStructureAdapter
addStructureChangeListener, containsKey, copyTo, copyToImpl, equals, equalsImpl, findOrCreate, forcedCopyTo, getHashStructure, removeStructureChangeListener, useObjectEquals
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_KEY

public static final java.lang.String DATA_KEY
Key used to lookup a copy of the Preferences object within other data structures, such as in the TraversableContext of the IDE Preferences dialog.

See Also:
Constant Field Values
Method Detail

getPreferences

public static Preferences getPreferences()
Returns the product-level Preferences object.


getProperties

public HashStructure getProperties()
Specified by:
getProperties in interface PropertyStorage
Returns:
The HashStructure representing all the preferences.

isDirty

public boolean isDirty()
Returns:
true if the Preferences have been modified since they were last saved or (in the case of a copy) created.

clearDirty

public void clearDirty()
Clears the dirty flag for the Preferences.


save

public void save()
          throws java.io.IOException
Saves the product-level Preferences object to its fixed location in the system directory.

Throws:
java.io.IOException - if an IOException occurred during save.

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.