Class UserPreferences

  • All Implemented Interfaces:
    java.util.Map<java.lang.String,​java.lang.String>

    public class UserPreferences
    extends java.util.AbstractMap<java.lang.String,​java.lang.String>
    Author:
    Alex Kalderimis
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String AKA
      What we should call the user.
      static java.lang.String ALIAS
      The alias of this user.
      static java.util.Set<java.lang.String> BOOLEAN_KEYS
      Common keys
      static java.util.Set<java.lang.String> COMMON_KEYS
      Common keys
      static java.lang.String EMAIL
      This is known to the API as the Profile needs to read this to provide getEmailAddress().
      static java.util.Set<java.lang.String> UNIQUE_KEYS
      Common keys
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.String>> entrySet()  
      java.lang.String put​(java.lang.String key, java.lang.String value)  
      void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.String> mapping)  
      java.lang.String remove​(java.lang.Object key)  
      • Methods inherited from class java.util.AbstractMap

        clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, toString, values
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • ALIAS

        public static final java.lang.String ALIAS
        The alias of this user.
        See Also:
        Constant Field Values
      • AKA

        public static final java.lang.String AKA
        What we should call the user.
        See Also:
        Constant Field Values
      • EMAIL

        public static final java.lang.String EMAIL
        This is known to the API as the Profile needs to read this to provide getEmailAddress(). The preferred address to send emails to.
        See Also:
        Constant Field Values
      • COMMON_KEYS

        public static final java.util.Set<java.lang.String> COMMON_KEYS
        Common keys
      • BOOLEAN_KEYS

        public static final java.util.Set<java.lang.String> BOOLEAN_KEYS
        Common keys
      • UNIQUE_KEYS

        public static final java.util.Set<java.lang.String> UNIQUE_KEYS
        Common keys
    • Constructor Detail

      • UserPreferences

        protected UserPreferences​(PreferencesManager manager,
                                  Profile profile)
                           throws java.sql.SQLException
        Parameters:
        manager - preferences manager
        profile - userprofile
        Throws:
        java.sql.SQLException - if we can't get to the database
    • Method Detail

      • put

        public java.lang.String put​(java.lang.String key,
                                    java.lang.String value)
        Specified by:
        put in interface java.util.Map<java.lang.String,​java.lang.String>
        Overrides:
        put in class java.util.AbstractMap<java.lang.String,​java.lang.String>
      • remove

        public java.lang.String remove​(java.lang.Object key)
        Specified by:
        remove in interface java.util.Map<java.lang.String,​java.lang.String>
        Overrides:
        remove in class java.util.AbstractMap<java.lang.String,​java.lang.String>
      • putAll

        public void putAll​(java.util.Map<? extends java.lang.String,​? extends java.lang.String> mapping)
        Specified by:
        putAll in interface java.util.Map<java.lang.String,​java.lang.String>
        Overrides:
        putAll in class java.util.AbstractMap<java.lang.String,​java.lang.String>
      • entrySet

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.String>> entrySet()
        Specified by:
        entrySet in interface java.util.Map<java.lang.String,​java.lang.String>
        Specified by:
        entrySet in class java.util.AbstractMap<java.lang.String,​java.lang.String>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Map<java.lang.String,​java.lang.String>
        Overrides:
        clear in class java.util.AbstractMap<java.lang.String,​java.lang.String>