ur_rna.Utilities.prefs

## Class FilePreferences.Factory

- java.lang.Object
- - ur_rna.Utilities.prefs.FilePreferences.Factory

- All Implemented Interfaces:
    java.util.prefs.PreferencesFactory
  Enclosing class:
    FilePreferences

      public static class FilePreferences.Factory
      extends java.lang.Object
      implements java.util.prefs.PreferencesFactory

  PreferencesFactory implementation that stores the preferences in an XML file. (N.B. The system property `java.util.prefs.PreferencesFactory` must be set to `ur_rna.Utilities.prefs.FilePreferences.Factory`

  The file defaults to `[user.home]/[ProgramTitle].prefs`, but may be overridden with the system property `ur_rna.Utilities.prefs.FilePreferences.Factory`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static java.util.logging.Logger` | `log`
    `private static java.io.File` | `preferencesFile`
    `(package private) FilePreferences` | `rootPreferences`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Factory()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.io.File` | `getPreferencesFile()`
    `static void` | `register()` Sets the system property `java.util.prefs.PreferencesFactory` to the `FilePreferences.Factory` class so that the `Preferences` class will use it for the global singleton PreferencesFactory.
    `static void` | `register(java.io.File preferencesFile)`
    `static void` | `setPreferencesFile(java.io.File systemPropertyFile)`
    `static void` | `setPreferencesFile(java.lang.String systemPropertyFile)`
    `java.util.prefs.Preferences` | `systemRoot()`
    `java.util.prefs.Preferences` | `userRoot()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### log

          private static final java.util.logging.Logger log

    - #### preferencesFile

          private static java.io.File preferencesFile

    - #### rootPreferences

          FilePreferences rootPreferences

  - ### Constructor Detail

    - #### Factory

          public Factory()

  - ### Method Detail

    - #### getPreferencesFile

          public static java.io.File getPreferencesFile()

    - #### register

          public static void register()

      Sets the system property `java.util.prefs.PreferencesFactory` to the `FilePreferences.Factory` class so that the `Preferences` class will use it for the global singleton PreferencesFactory. This affects calls such as `Preferences.userRoot()` and `Preferences.userNodeForPackage(Class)` etc.

    - #### register

          public static void register(java.io.File preferencesFile)

    - #### setPreferencesFile

          public static void setPreferencesFile(java.io.File systemPropertyFile)

    - #### setPreferencesFile

          public static void setPreferencesFile(java.lang.String systemPropertyFile)

    - #### systemRoot

          public java.util.prefs.Preferences systemRoot()

      Specified by:
        `systemRoot` in interface `java.util.prefs.PreferencesFactory`

    - #### userRoot

          public java.util.prefs.Preferences userRoot()

      Specified by:
        `userRoot` in interface `java.util.prefs.PreferencesFactory`