Class WebStorage

java.lang.Object
org.vaadin.firitin.util.WebStorage

@Deprecated(forRemoval=true) public class WebStorage extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Available as pretty much such in Vaadin core.
Wrapper for similarly named Browser API. WebStorage may be handy to save some data that you want to be stored on the client side, instead of e.g. database on the server. An example could be certain UI settings that the same users might want to have set differently based on their device.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    clear(com.vaadin.flow.component.UI ui, WebStorage.Storage storage)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clears the given storage.
    static void
    getItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key, WebStorage.Callback callback)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    removeItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    setItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key, String value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    setItem(String key, String value)
    Deprecated, for removal: This API element is subject to removal in a future version.
    static void
    setItem(WebStorage.Storage storage, String key, String value)
    Deprecated, for removal: This API element is subject to removal in a future version.

    Methods inherited from class Object

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

    • WebStorage

      public WebStorage()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • setItem

      @Deprecated(forRemoval=true) public static void setItem(String key, String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets given key-value pair to Storage.localStorage
      Parameters:
      key - the key
      value - the value
    • setItem

      @Deprecated(forRemoval=true) public static void setItem(WebStorage.Storage storage, String key, String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets given key-value pair to give storage type
      Parameters:
      storage - the storage type
      key - the key
      value - the value
    • setItem

      @Deprecated(forRemoval=true) public static void setItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key, String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets given key-value pair to give storage type
      Parameters:
      ui - the UI for which the storage is related to
      storage - the storage type
      key - the key
      value - the value
    • removeItem

      @Deprecated(forRemoval=true) public static void removeItem(String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Removes the value associated by the given key from the Storage.localStorage
      Parameters:
      key - the key to be deleted
    • removeItem

      @Deprecated(forRemoval=true) public static void removeItem(WebStorage.Storage storage, String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Removes the value associated by the given key from the Storage.localStorage
      Parameters:
      storage - the storage type from which the value will be removed
      key - the key to be deleted
    • removeItem

      @Deprecated(forRemoval=true) public static void removeItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Removes the value associated by the given key from the Storage.localStorage
      Parameters:
      ui - the UI for which the storage is related to
      storage - the storage type from which the value will be removed
      key - the key to be deleted
    • clear

      @Deprecated(forRemoval=true) public static void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears all values from the Storage.localStorage
    • clear

      public static void clear(WebStorage.Storage storage)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the given storage.
      Parameters:
      storage - the storage
    • clear

      @Deprecated(forRemoval=true) public static void clear(com.vaadin.flow.component.UI ui, WebStorage.Storage storage)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clears the given storage.
      Parameters:
      ui - the UI for which the storage is related to
      storage - the storage
    • getItem

      @Deprecated(forRemoval=true) public static void getItem(String key, WebStorage.Callback callback)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Asynchronously gets an item from the Storage.localStorage
      Parameters:
      key - the key for which the value will be fetched
      callback - the callback that gets the value once transferred from the client side
    • getItem

      @Deprecated(forRemoval=true) public static void getItem(WebStorage.Storage storage, String key, WebStorage.Callback callback)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Asynchronously gets an item from the given storage
      Parameters:
      storage - the storage
      key - the key for which the value will be fetched
      callback - the callback that gets the value once transferred from the client side
    • getItem

      @Deprecated(forRemoval=true) public static void getItem(com.vaadin.flow.component.UI ui, WebStorage.Storage storage, String key, WebStorage.Callback callback)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Asynchronously gets an item from the given storage
      Parameters:
      ui - the UI for which the storage is related to
      storage - the storage
      key - the key for which the value will be fetched
      callback - the callback that gets the value once transferred from the client side