Package org.webappos.registry
Interface IRegistry
-
public interface IRegistrywebAppOS Registry API. Used by webAppOS apps to access Registry. In addition, Registry drivers implement this API to provide access to a remote registry that can be mounted into the "users/[login]" branch.- Author:
- Sergejs Kozlovics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.gson.JsonElementgetValue(java.lang.String key)Gets the value of the given registry key.booleansetValue(java.lang.String key, java.lang.Object value)Sets the given registry value.
-
-
-
Method Detail
-
getValue
com.google.gson.JsonElement getValue(java.lang.String key)
Gets the value of the given registry key. If the key is pointing to a final node, a value of some primitive type is returned. Otherwise, a JSON object representing the registry subtree is returned.- Parameters:
key- a registry key specified as the path starting with one of the predefined registry root keys ("users", "xusers", "apps", etc.) and delimited by "/"; as a special key, one can use #xusers to obtain the number of documents in the xusers registry branch- Returns:
- a JSON element (the final element or a branch); null, if the registry key not found or an error occurred
-
setValue
boolean setValue(java.lang.String key, java.lang.Object value)Sets the given registry value. The value if overwritten. If the key is pointing to a subtree, the whole subtree is overwritten with the new value (which can be a final value or a subtree).- Parameters:
key- a registry key specified as the path starting with one of the predefined registry root keys ("users", "xusers", "apps", etc.) and delimited by "/"value- a final value or a JSON object- Returns:
- whether the operation succeeded
-
-