SignStixStore
Javascript-to-Player interface for storing data persistently over the lifetime of the player instance. This makes the data potentially accessible by multiple web views across different signs.
A Javascript application should first ask the store to create a dictionary. The JS app can then set/get values within this dictionary. Optionally the dictionary can be explicitly destroyed when the app is finished with it. This is good practice, both for security and memory reasons.
Support for multiple dictionaries allows different web applications to operate on different data sets without interfering with each other.
Modifier and Type | Function and Description |
---|---|
boolean |
createDictionary(String dictionaryName)
Attempt to create a dictionary with the argument name.
|
boolean |
destroyDictionary(String dictionaryName)
Attempt to destroy the dictionary with the argument name.
|
String |
getString(String dictionaryName,
String key)
Attempt to extract (from the argument dictionary) the string value
associated with the argument key.
|
boolean |
isDictionaryPresent(String dictionaryName)
Find out if a dictionary with the argument name has been created.
|
boolean |
setString(String dictionaryName,
String key,
String value)
Attempt to set (in the argument dictionary) the string value associated
with the argument key.
|
boolean createDictionary(String dictionaryName)
dictionaryName
- name for the new dictionary.boolean destroyDictionary(String dictionaryName)
dictionaryName
- name of the dictionary (already created).boolean isDictionaryPresent(String dictionaryName)
dictionaryName
- name of the dictionary (which may or may not
exist).boolean setString(String dictionaryName, String key, String value)
dictionaryName
- name of the dictionary (already created).key
- e.g. 'country'.value
- e.g. 'France'.String getString(String dictionaryName, String key)
dictionaryName
- name of the dictionary (already created).key
- e.g. 'country'.