|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.core.configuration.ConfigurationServiceImpl
public class ConfigurationServiceImpl
Implementation of ConfigurationService.
Constructor Summary | |
---|---|
ConfigurationServiceImpl()
|
Method Summary | |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext componentContext)
|
void |
configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
|
protected void |
deactivate(org.osgi.service.component.ComponentContext componentContext)
|
ComponentConfiguration |
getComponentConfiguration(String pid)
Returns the ComponentConfiguration for the component identified with specified PID (service's persistent identity). |
List<ComponentConfiguration> |
getComponentConfigurations()
Returns the list of ConfigurableComponents currently registered with the ConfigurationService. |
Set<String> |
getConfigurableComponentPids()
Return the PIDs (service's persistent identity) for all the services that implements the ConfigurableComponent Maker interface and registered themselves with the container. |
List<ComponentConfiguration> |
getSnapshot(long sid)
Loads a snapshot given its ID and return the component configurations stored in that snapshot. |
Set<Long> |
getSnapshots()
Returns the ID of all the snapshots taken by the ConfigurationService. |
boolean |
hasConfigurableComponent(String pid)
|
long |
rollback()
Rolls back to the last saved snapshot if available. |
void |
rollback(long id)
Rolls back to the specified snapshot id. |
void |
setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
|
void |
setMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
|
void |
setSystemService(SystemService systemService)
|
long |
snapshot()
Takes a new snapshot of the current configuration of all the registered ConfigurableCompoenents. |
void |
unsetConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
|
void |
unsetMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
|
void |
unsetSystemService(SystemService systemService)
|
void |
updateConfiguration(String pidToUpdate,
Map<String,Object> propertiesToUpdate)
Updates the Configuration of the registered component with the specified pid. |
void |
updateConfigurations(List<ComponentConfiguration> configsToUpdate)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConfigurationServiceImpl()
Method Detail |
---|
public void setConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
public void unsetConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
public void setMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
public void unsetMetaTypeService(org.osgi.service.metatype.MetaTypeService metaTypeService)
public void setSystemService(SystemService systemService)
public void unsetSystemService(SystemService systemService)
protected void activate(org.osgi.service.component.ComponentContext componentContext) throws org.osgi.framework.InvalidSyntaxException
org.osgi.framework.InvalidSyntaxException
protected void deactivate(org.osgi.service.component.ComponentContext componentContext)
public void configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
configurationEvent
in interface org.osgi.service.cm.ConfigurationListener
public boolean hasConfigurableComponent(String pid)
public Set<String> getConfigurableComponentPids()
ConfigurationService
getConfigurableComponentPids
in interface ConfigurationService
public List<ComponentConfiguration> getComponentConfigurations() throws EsfException
ConfigurationService
getComponentConfigurations
in interface ConfigurationService
EsfException
public ComponentConfiguration getComponentConfiguration(String pid) throws EsfException
ConfigurationService
getComponentConfiguration
in interface ConfigurationService
pid
- The ID of the component whose configuration is requested.
EsfException
public void updateConfiguration(String pidToUpdate, Map<String,Object> propertiesToUpdate) throws EsfException
ConfigurationService
updateConfiguration
in interface ConfigurationService
pidToUpdate
- The ID of the component whose configuration is requested.propertiesToUpdate
- Properties to be used as the new Configuration for the specified Component.
EsfException
- if the properties specified do not pass the validation of the ObjectClassDefinitionpublic long snapshot() throws EsfException
ConfigurationService
snapshot
in interface ConfigurationService
EsfException
public long rollback() throws EsfException
ConfigurationService
rollback
in interface ConfigurationService
EsfException
- if no snapshots are available orpublic void rollback(long id) throws EsfException
ConfigurationService
rollback
in interface ConfigurationService
id
- ID of the snapshot we need to rollback to
EsfException
- if the snapshot is not foundpublic Set<Long> getSnapshots() throws EsfException
ConfigurationService
getSnapshots
in interface ConfigurationService
EsfException
public List<ComponentConfiguration> getSnapshot(long sid) throws EsfException
ConfigurationService
getSnapshot
in interface ConfigurationService
sid
- - ID of the snapshot to be loaded
EsfException
public void updateConfigurations(List<ComponentConfiguration> configsToUpdate) throws EsfException
updateConfigurations
in interface ConfigurationService
EsfException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |