Interface UserSettingsService

All Known Implementing Classes:
UserSettingsServiceImpl

public interface UserSettingsService
Service providing settings functionality for the current user. An application can save/load some "setting" (plain or JSON/XML string) for the current user.

It is usually used by UI Views and components.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copy(String fromUsername, String toUsername)
    Copies all settings to another user.
    void
    Deletes setting by key for the current user.
    load(String key)
    Loads setting for the current user.
    void
    save(String key, String value)
    Saves value for the current user.
  • Method Details

    • load

      Optional<String> load(String key)
      Loads setting for the current user.
      Parameters:
      key - the setting identifier
      Returns:
      loaded setting value
    • save

      void save(String key, @Nullable String value)
      Saves value for the current user.
      Parameters:
      key - setting identifier
      value - setting value
    • delete

      void delete(String key)
      Deletes setting by key for the current user.
    • copy

      void copy(String fromUsername, String toUsername)
      Copies all settings to another user.