public class ConfigurationInstancesStorageImpl extends Object implements ConfigurationInstancesStorage
Constructor and Description |
---|
ConfigurationInstancesStorageImpl()
load all instances.
|
Modifier and Type | Method and Description |
---|---|
void |
addConfigurationInstance(ConfigurationInstance instance)
Adds the configuration instance and saves it to the physical storage.
|
void |
addListener(StorageChangedListener listener) |
boolean |
contains(ConfigurationInstance configInstance) |
List<ConfigurationInstance> |
getAllInstancesForBundle(String bundlename) |
ConfigurationInstance |
getConfigurationForBundle(org.osgi.framework.Bundle bundle)
returns the first primary configuration instance or if there is no
primary instance then this method returns the first configuration
instance for the given bundle.
|
void |
loadInstances()
load the instances from file system.
|
boolean |
removeConfigurationInstance(ConfigurationInstance instance)
Removes the given instance also from the physical storage
|
void |
removeListener(StorageChangedListener listener) |
void |
replaceConfigurationInstance(ConfigurationInstance instance)
Replace the instance with the same id.
|
public ConfigurationInstancesStorageImpl()
public void loadInstances()
loadInstances
in interface ConfigurationInstancesStorage
public void addConfigurationInstance(ConfigurationInstance instance)
ConfigurationInstancesStorage
addConfigurationInstance
in interface ConfigurationInstancesStorage
public void replaceConfigurationInstance(ConfigurationInstance instance)
ConfigurationInstancesStorage
replaceConfigurationInstance
in interface ConfigurationInstancesStorage
public boolean removeConfigurationInstance(ConfigurationInstance instance)
ConfigurationInstancesStorage
removeConfigurationInstance
in interface ConfigurationInstancesStorage
public List<ConfigurationInstance> getAllInstancesForBundle(String bundlename)
getAllInstancesForBundle
in interface ConfigurationInstancesStorage
public boolean contains(ConfigurationInstance configInstance)
contains
in interface ConfigurationInstancesStorage
public ConfigurationInstance getConfigurationForBundle(org.osgi.framework.Bundle bundle) throws NoConfigurationFoundException
getConfigurationForBundle
in interface ConfigurationInstancesStorage
NoConfigurationFoundException
public void addListener(StorageChangedListener listener)
addListener
in interface ConfigurationInstancesStorage
public void removeListener(StorageChangedListener listener)
removeListener
in interface ConfigurationInstancesStorage
Copyright © 2018 universAAL Consortium. All rights reserved.