|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmuc.core.datamanager.impl.Configuration
public class Configuration
Field Summary | |
---|---|
protected org.w3c.dom.Document |
doc
|
protected org.w3c.dom.Element |
root
|
Constructor Summary | |
---|---|
Configuration(java.io.InputStream stream)
|
|
Configuration(java.lang.String configFileName)
|
Method Summary | |
---|---|
DeviceConfiguration |
createDevice(java.lang.String name)
Creates a new DeviceConfiguration object for a device and add it to the configuration. |
void |
deleteDevice(java.lang.String name)
Delete a device from the configuration. |
DeviceConfiguration |
getDeviceByName(java.lang.String name)
Returns the DeviceConfiguration object for the device with the specified name. |
java.util.List<DeviceConfiguration> |
getDevices()
Returns an immutable list of configured meters. |
PlantConfiguration |
getPlantConfiguration()
|
protected org.w3c.dom.Document |
getXmlDocument()
|
void |
persist()
Saves the configuration to the persistent storage |
void |
registerListener(ConfigurationListener listener)
Register a listener to get informed when the configuration changes. |
void |
reloadConfiguration()
Reloads configuration from persistent storage |
void |
sendConfigurationChangedEvent()
|
protected void |
setDataManager(DataManagerImpl dataManager)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected org.w3c.dom.Document doc
protected org.w3c.dom.Element root
Constructor Detail |
---|
public Configuration(java.lang.String configFileName)
public Configuration(java.io.InputStream stream)
Method Detail |
---|
protected void setDataManager(DataManagerImpl dataManager)
public void persist()
ConfigurationService
persist
in interface ConfigurationService
public DeviceConfiguration createDevice(java.lang.String name)
ConfigurationService
createDevice
in interface ConfigurationService
name
- unique name of the new meter
public void reloadConfiguration()
ConfigurationService
reloadConfiguration
in interface ConfigurationService
public java.util.List<DeviceConfiguration> getDevices()
ConfigurationService
getDevices
in interface ConfigurationService
public DeviceConfiguration getDeviceByName(java.lang.String name)
ConfigurationService
getDeviceByName
in interface ConfigurationService
name
- unique name of the device
public void deleteDevice(java.lang.String name)
ConfigurationService
deleteDevice
in interface ConfigurationService
name
- unique name of the deviceprotected org.w3c.dom.Document getXmlDocument()
public void sendConfigurationChangedEvent()
public void registerListener(ConfigurationListener listener)
ConfigurationService
registerListener
in interface ConfigurationService
public PlantConfiguration getPlantConfiguration()
getPlantConfiguration
in interface ConfigurationService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |