public interface ViewConfigModel
Config topics can be accessed by their type URI. A view config can contain only one config topic with a certain type URI.
Modifier and Type | Method and Description |
---|---|
ViewConfigModel |
addConfigTopic(TopicModel configTopic)
Adds a config topic to this view config.
|
TopicModel |
getConfigTopic(String configTypeUri) |
Iterable<? extends TopicModel> |
getConfigTopics() |
Object |
getConfigValue(String configTypeUri,
String childTypeUri)
### TODO: drop method?
Lookup a view config value.
|
ViewConfigModel |
setConfigValue(String configTypeUri,
String childTypeUri,
Object value)
Sets a single value of a certain config topic.
|
ViewConfigModel |
setConfigValueRef(String configTypeUri,
String childTypeUri,
Object topicIdOrUri) |
org.codehaus.jettison.json.JSONArray |
toJSONArray() |
void |
updateConfigTopic(TopicModel configTopic)
Overrides a config topic with the given one.
|
Iterable<? extends TopicModel> getConfigTopics()
TopicModel getConfigTopic(String configTypeUri)
null
if there is none.ViewConfigModel addConfigTopic(TopicModel configTopic)
RuntimeException
- if this view config already contains a config topic for that type URI.void updateConfigTopic(TopicModel configTopic)
RuntimeException
- if this view config does not contain a config topic for that type URI.ViewConfigModel setConfigValue(String configTypeUri, String childTypeUri, Object value)
configTypeUri
- The type URI of the config topic, e.g. "dmx.webclient.view_config"childTypeUri
- The child type URI of the config value to set, e.g. "dmx.webclient.icon"value
- The config value (String, Integer, Long, Double, or Boolean)ViewConfigModel setConfigValueRef(String configTypeUri, String childTypeUri, Object topicIdOrUri)
Object getConfigValue(String configTypeUri, String childTypeUri)
Compare to client-side counterpart: function get_view_config() in webclient.js
configTypeUri
- The type URI of the config topic, e.g. "dmx.webclient.view_config"childTypeUri
- The child type URI of the config value to lookup, e.g. "dmx.webclient.icon"null
if no value is setorg.codehaus.jettison.json.JSONArray toJSONArray()
Copyright © 2023. All Rights Reserved.