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 Details

    • getServicePid

      String getServicePid()
      Returns:
      the unique identifier for the configuration.
    • getFactoryPid

      @Nullable String getFactoryPid()
      Returns:
      the unique identifier for the configuration factory, or null if the config belongs to a singleton service.
    • getFactoryServiceName

      @Nullable String 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

      @Nullable File getConfigFile()
      Returns:
      a File in the etc directory that defines this config if and only if the config was created by the Felix directory watcher. Returns null otherwise.
    • getSanitizedProperties

      Dictionary<String,Object> getSanitizedProperties()
      Returns:
      a dictionary of properties only relevant to the configuration itself, completely free of Felix internal control values.
    • setProperty

      void setProperty(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.
      Parameters:
      key - the key of the property to add or change.
      value - the intended new value for the specified property to hold.