Interface UiPreferencesService


  • public interface UiPreferencesService
    Service for tracking user interface preferences.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.node.ObjectNode getPreference​(java.lang.String username, java.lang.String key)
      Returns the named preference for the specified user.
      java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.node.ObjectNode> getPreferences​(java.lang.String userName)
      Returns an immutable copy of the preferences for the specified user.
      java.util.Set<java.lang.String> getUserNames()
      Returns the list of user names that have user preferences available.
      void setPreference​(java.lang.String username, java.lang.String key, com.fasterxml.jackson.databind.node.ObjectNode value)
      Sets or clears the named preference for the specified user.
    • Method Detail

      • getUserNames

        java.util.Set<java.lang.String> getUserNames()
        Returns the list of user names that have user preferences available.
        Returns:
        list of user names
      • getPreferences

        java.util.Map<java.lang.String,​com.fasterxml.jackson.databind.node.ObjectNode> getPreferences​(java.lang.String userName)
        Returns an immutable copy of the preferences for the specified user.
        Parameters:
        userName - user name
        Returns:
        map of user preferences
      • getPreference

        com.fasterxml.jackson.databind.node.ObjectNode getPreference​(java.lang.String username,
                                                                     java.lang.String key)
        Returns the named preference for the specified user. If no such preferences exist, null will be returned.
        Parameters:
        username - user name
        key - preference key
        Returns:
        named preference
      • setPreference

        void setPreference​(java.lang.String username,
                           java.lang.String key,
                           com.fasterxml.jackson.databind.node.ObjectNode value)
        Sets or clears the named preference for the specified user.
        Parameters:
        username - user name
        key - preference key
        value - preference value; if null it will be cleared