Class RMPrefsUtils


  • public class RMPrefsUtils
    extends java.lang.Object
    This class offers a number of useful general purpose utilities used by ribs classes.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  RMPrefsUtils.BogusPreferences
      A Preferences implementation that just stores prefs to a map, in case we don't have permission to read & write permissions.
    • Constructor Summary

      Constructors 
      Constructor Description
      RMPrefsUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void flush()
      Flushes the preferences.
      static java.util.prefs.Preferences getBogusPreferences()
      Returns a shared bogus preferences instance.
      static java.util.prefs.Preferences getPrefs()
      Returns the user Preferences object (or bogus prefs, if security exception).
      static java.util.prefs.Preferences prefs()
      Returns the user Preferences object.
      static void prefsPut​(java.lang.String aKey, java.lang.Object aValue)
      Adds an object to the user Preferences object.
      static void prefsPut​(java.lang.String aKey, java.lang.Object aValue, boolean doFlush)
      Adds an object to the user Preferences object.
      static void setPrefsClass​(java.lang.Class aClass)
      Sets the class that ribs preferences are associated with.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RMPrefsUtils

        public RMPrefsUtils()
    • Method Detail

      • prefs

        public static java.util.prefs.Preferences prefs()
        Returns the user Preferences object.
      • getPrefs

        public static java.util.prefs.Preferences getPrefs()
        Returns the user Preferences object (or bogus prefs, if security exception).
      • prefsPut

        public static void prefsPut​(java.lang.String aKey,
                                    java.lang.Object aValue)
        Adds an object to the user Preferences object.
      • prefsPut

        public static void prefsPut​(java.lang.String aKey,
                                    java.lang.Object aValue,
                                    boolean doFlush)
        Adds an object to the user Preferences object.
      • flush

        public static void flush()
        Flushes the preferences.
      • setPrefsClass

        public static void setPrefsClass​(java.lang.Class aClass)
        Sets the class that ribs preferences are associated with.
      • getBogusPreferences

        public static java.util.prefs.Preferences getBogusPreferences()
        Returns a shared bogus preferences instance.