Class StorageUtil

java.lang.Object
com.vaadin.client.StorageUtil

public class StorageUtil extends Object
Includes utility methods to interact with HTML storage API.
  • Method Details

    • getLocalItem

      public static String getLocalItem(String key)
      Gets an item value from the local storage.
      Parameters:
      key - the item key
      Returns:
      the value of the item
    • setLocalItem

      public static void setLocalItem(String key, String value)
      Sets an item value in the local storage.
      Parameters:
      key - the item key
      value - the item value
    • getSessionItem

      public static String getSessionItem(String key)
      Gets an item value from the session storage.
      Parameters:
      key - the item key
      Returns:
      the value of the item
    • setSessionItem

      public static void setSessionItem(String key, String value)
      Sets an item value in the session storage.
      Parameters:
      key - the item key
      value - the item value