Package org.codice.felix.cm.internal
Interface ConfigurationContext
public interface ConfigurationContext
The purpose of the
ConfigurationContext is to provide an abstraction for the oddities of
Apache Felix, and isolate only a single place where an implementation may need to change when
upgrading versions of Karaf.-
Method Summary
Modifier and TypeMethodDescriptionWhen this object represents a factory service, this method returns the unique name for the factory service instance that Felix appends to the factory PID to create a unique service PID.voidsetProperty(String key, Object value) Provides a mechanism to add or change property values on the internal felix map to be persisted without going back through the config admin service.
-
Method Details
-
getServicePid
String getServicePid()- Returns:
- the unique identifier for the configuration.
-
getFactoryPid
- Returns:
- the unique identifier for the configuration factory, or null if the config belongs to a singleton service.
-
getFactoryServiceName
When this object represents a factory service, this method returns the unique name for the factory service instance that Felix appends to the factory PID to create a unique service PID.- Returns:
- the unique name for the factory service instance, or null if the config belongs to a singleton service.
-
getConfigFile
- Returns:
- a
Filein theetcdirectory that defines this config if and only if the config was created by the Felix directory watcher. Returnsnullotherwise.
-
getSanitizedProperties
Dictionary<String,Object> getSanitizedProperties()- Returns:
- a dictionary of properties only relevant to the configuration itself, completely free of Felix internal control values.
-
setProperty
Provides a mechanism to add or change property values on the internal felix map to be persisted without going back through the config admin service.- Parameters:
key- the key of the property to add or change.value- the intended new value for the specified property to hold.
-