Class ConfigurationContextImpl

java.lang.Object
org.codice.felix.cm.file.ConfigurationContextImpl
All Implemented Interfaces:
org.codice.felix.cm.internal.ConfigurationContext

public class ConfigurationContextImpl extends Object implements org.codice.felix.cm.internal.ConfigurationContext

Helper class for enabling functional constructs with Configurations and exposes the felix.fileinstall.filename property, if it exists, as a File.

Reasons a getConfigFile() call would return null:

  • There was no dictionary of properties associated with the config
  • There was no felix.fileinstall.filename property
  • The felix.fileinstall.filename property was invalid
See FELIX-4005 invalid input: '&' FELIX-4556. This class cannot utilize Java 8 language constructs due to maven bundle plugin 2.3.7
  • Constructor Details

    • ConfigurationContextImpl

      public ConfigurationContextImpl(org.osgi.service.cm.Configuration config)
    • ConfigurationContextImpl

      public ConfigurationContextImpl(String pid, Dictionary<String,Object> props)
  • Method Details

    • getServicePid

      public String getServicePid()
      Specified by:
      getServicePid in interface org.codice.felix.cm.internal.ConfigurationContext
    • getFactoryPid

      public String getFactoryPid()
      Specified by:
      getFactoryPid in interface org.codice.felix.cm.internal.ConfigurationContext
    • getFactoryServiceName

      public String getFactoryServiceName()
      Specified by:
      getFactoryServiceName in interface org.codice.felix.cm.internal.ConfigurationContext
    • getConfigFile

      public File getConfigFile()
      Specified by:
      getConfigFile in interface org.codice.felix.cm.internal.ConfigurationContext
    • getSanitizedProperties

      public Dictionary<String,Object> getSanitizedProperties()
      Specified by:
      getSanitizedProperties in interface org.codice.felix.cm.internal.ConfigurationContext
    • setProperty

      public void setProperty(String key, Object value)
      Specified by:
      setProperty in interface org.codice.felix.cm.internal.ConfigurationContext
    • shouldBeVisibleToPlugins

      public boolean shouldBeVisibleToPlugins()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object