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 ViewConfigurationModelpublic TopicModelImpl getConfigTopic(String configTypeUri)
getConfigTopic in interface ViewConfigurationModelnull if there is none.public void addConfigTopic(TopicModel configTopic)
ViewConfigurationModeladdConfigTopic in interface ViewConfigurationModelpublic ViewConfigurationModel setConfigValue(String configTypeUri, String childTypeUri, Object value)
ViewConfigurationModelsetConfigValue in interface ViewConfigurationModelconfigTypeUri - 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 ViewConfigurationModelpublic void updateConfigTopic(TopicModel configTopic)
updateConfigTopic in interface ViewConfigurationModelpublic Object getConfigValue(String configTypeUri, String childTypeUri)
ViewConfigurationModelCompare to client-side counterpart: function get_view_config() in webclient.js
getConfigValue in interface ViewConfigurationModelconfigTypeUri - 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 ViewConfigurationModelCopyright © 2018. All Rights Reserved.