class ViewConfigurationModelImpl extends Object implements ViewConfigurationModel
Modifier and Type | Field and Description |
---|---|
private Map<String,TopicModelImpl> |
configTopics
Key: config topic type URI
Value: config topic
|
private ModelFactoryImpl |
mf |
Constructor and Description |
---|
ViewConfigurationModelImpl(Map<String,TopicModelImpl> configTopics,
PersistenceLayer pl) |
Modifier and Type | Method and Description |
---|---|
void |
addConfigTopic(TopicModel configTopic)
Adds a config topic to this view config.
|
TopicModelImpl |
getConfigTopic(String configTypeUri) |
Iterable<TopicModelImpl> |
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() |
String |
toString() |
void |
updateConfigTopic(TopicModel configTopic) |
private Map<String,TopicModelImpl> configTopics
private ModelFactoryImpl mf
ViewConfigurationModelImpl(Map<String,TopicModelImpl> configTopics, PersistenceLayer pl)
configTopics
- must not be nullpublic Iterable<TopicModelImpl> getConfigTopics()
getConfigTopics
in interface ViewConfigurationModel
public TopicModelImpl getConfigTopic(String configTypeUri)
getConfigTopic
in interface ViewConfigurationModel
null
if there is none.public void addConfigTopic(TopicModel configTopic)
ViewConfigurationModel
addConfigTopic
in interface ViewConfigurationModel
public ViewConfigurationModel setConfigValue(String configTypeUri, String childTypeUri, Object value)
ViewConfigurationModel
setConfigValue
in interface ViewConfigurationModel
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)public ViewConfigurationModel setConfigValueRef(String configTypeUri, String childTypeUri, Object topicIdOrUri)
setConfigValueRef
in interface ViewConfigurationModel
public void updateConfigTopic(TopicModel configTopic)
updateConfigTopic
in interface ViewConfigurationModel
public Object getConfigValue(String configTypeUri, String childTypeUri)
ViewConfigurationModel
Compare to client-side counterpart: function get_view_config() in webclient.js
getConfigValue
in interface ViewConfigurationModel
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 setpublic org.codehaus.jettison.json.JSONArray toJSONArray()
toJSONArray
in interface ViewConfigurationModel
Copyright © 2018. All Rights Reserved.