public interface ViewConfigurationModel
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 |
---|---|
void |
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.
|
ViewConfigurationModel |
setConfigValue(String configTypeUri,
String childTypeUri,
Object value)
Sets a single value of a certain config topic.
|
ViewConfigurationModel |
setConfigValueRef(String configTypeUri,
String childTypeUri,
Object topicIdOrUri) |
org.codehaus.jettison.json.JSONArray |
toJSONArray() |
void |
updateConfigTopic(TopicModel configTopic) |
Iterable<? extends TopicModel> getConfigTopics()
TopicModel getConfigTopic(String configTypeUri)
null
if there is none.void addConfigTopic(TopicModel configTopic)
RuntimeException
- if this view config already contains a config topic with the same type URI.ViewConfigurationModel 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)ViewConfigurationModel setConfigValueRef(String configTypeUri, String childTypeUri, Object topicIdOrUri)
void updateConfigTopic(TopicModel configTopic)
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 © 2018. All Rights Reserved.