org.openmuc.core.datamanager.config
Interface ConfigurationService

All Known Implementing Classes:
Configuration

public interface ConfigurationService


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()
           
 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
 

Method Detail

registerListener

void registerListener(ConfigurationListener listener)
Register a listener to get informed when the configuration changes.

Parameters:
listener -

persist

void persist()
Saves the configuration to the persistent storage


createDevice

DeviceConfiguration createDevice(java.lang.String name)
Creates a new DeviceConfiguration object for a device and add it to the configuration.

Parameters:
name - unique name of the new meter
Returns:
MeterConfiguration object for the new meter

reloadConfiguration

void reloadConfiguration()
Reloads configuration from persistent storage


getDevices

java.util.List<DeviceConfiguration> getDevices()
Returns an immutable list of configured meters. To add or delete a meter use the createDevice() and deleteDevice() functions.


getDeviceByName

DeviceConfiguration getDeviceByName(java.lang.String name)
Returns the DeviceConfiguration object for the device with the specified name.

Parameters:
name - unique name of the device
Returns:
DeviceConfiguration object for the device

deleteDevice

void deleteDevice(java.lang.String name)
Delete a device from the configuration.

Parameters:
name - unique name of the device

getPlantConfiguration

PlantConfiguration getPlantConfiguration()