Package com.vaadin.client
Class StorageUtil
java.lang.Object
com.vaadin.client.StorageUtil
Includes utility methods to interact with HTML storage API.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetLocalItem(String key) Gets an item value from the local storage.static StringgetSessionItem(String key) Gets an item value from the session storage.static voidsetLocalItem(String key, String value) Sets an item value in the local storage.static voidsetSessionItem(String key, String value) Sets an item value in the session storage.
-
Method Details
-
getLocalItem
Gets an item value from the local storage.- Parameters:
key- the item key- Returns:
- the value of the item
-
setLocalItem
Sets an item value in the local storage.- Parameters:
key- the item keyvalue- the item value
-
getSessionItem
Gets an item value from the session storage.- Parameters:
key- the item key- Returns:
- the value of the item
-
setSessionItem
Sets an item value in the session storage.- Parameters:
key- the item keyvalue- the item value
-