Class DelegatingPreferences

  • All Implemented Interfaces:
    Serializable, org.osgi.service.prefs.Preferences

    public class DelegatingPreferences
    extends Object
    implements org.osgi.service.prefs.Preferences, Serializable
    Author:
    Johannes Utzig (jutzig.dev@googlemail.com)
    See Also:
    Serialized Form
    • Constructor Detail

      • DelegatingPreferences

        public DelegatingPreferences​(org.osgi.service.prefs.Preferences delegate)
    • Method Detail

      • put

        public void put​(String key,
                        String value)
        Specified by:
        put in interface org.osgi.service.prefs.Preferences
      • get

        public String get​(String key,
                          String def)
        Specified by:
        get in interface org.osgi.service.prefs.Preferences
      • remove

        public void remove​(String key)
        Specified by:
        remove in interface org.osgi.service.prefs.Preferences
      • clear

        public void clear()
                   throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        clear in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • putInt

        public void putInt​(String key,
                           int value)
        Specified by:
        putInt in interface org.osgi.service.prefs.Preferences
      • getInt

        public int getInt​(String key,
                          int def)
        Specified by:
        getInt in interface org.osgi.service.prefs.Preferences
      • putLong

        public void putLong​(String key,
                            long value)
        Specified by:
        putLong in interface org.osgi.service.prefs.Preferences
      • getLong

        public long getLong​(String key,
                            long def)
        Specified by:
        getLong in interface org.osgi.service.prefs.Preferences
      • putBoolean

        public void putBoolean​(String key,
                               boolean value)
        Specified by:
        putBoolean in interface org.osgi.service.prefs.Preferences
      • getBoolean

        public boolean getBoolean​(String key,
                                  boolean def)
        Specified by:
        getBoolean in interface org.osgi.service.prefs.Preferences
      • putFloat

        public void putFloat​(String key,
                             float value)
        Specified by:
        putFloat in interface org.osgi.service.prefs.Preferences
      • getFloat

        public float getFloat​(String key,
                              float def)
        Specified by:
        getFloat in interface org.osgi.service.prefs.Preferences
      • putDouble

        public void putDouble​(String key,
                              double value)
        Specified by:
        putDouble in interface org.osgi.service.prefs.Preferences
      • getDouble

        public double getDouble​(String key,
                                double def)
        Specified by:
        getDouble in interface org.osgi.service.prefs.Preferences
      • putByteArray

        public void putByteArray​(String key,
                                 byte[] value)
        Specified by:
        putByteArray in interface org.osgi.service.prefs.Preferences
      • getByteArray

        public byte[] getByteArray​(String key,
                                   byte[] def)
        Specified by:
        getByteArray in interface org.osgi.service.prefs.Preferences
      • keys

        public String[] keys()
                      throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        keys in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • childrenNames

        public String[] childrenNames()
                               throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        childrenNames in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • parent

        public org.osgi.service.prefs.Preferences parent()
        Specified by:
        parent in interface org.osgi.service.prefs.Preferences
      • node

        public org.osgi.service.prefs.Preferences node​(String pathName)
        Specified by:
        node in interface org.osgi.service.prefs.Preferences
      • nodeExists

        public boolean nodeExists​(String pathName)
                           throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        nodeExists in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • removeNode

        public void removeNode()
                        throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        removeNode in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • name

        public String name()
        Specified by:
        name in interface org.osgi.service.prefs.Preferences
      • absolutePath

        public String absolutePath()
        Specified by:
        absolutePath in interface org.osgi.service.prefs.Preferences
      • flush

        public void flush()
                   throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        flush in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • sync

        public void sync()
                  throws org.osgi.service.prefs.BackingStoreException
        Specified by:
        sync in interface org.osgi.service.prefs.Preferences
        Throws:
        org.osgi.service.prefs.BackingStoreException
      • isDirty

        public boolean isDirty()
      • setValue

        protected void setValue​(String key,
                                Object value)