Class DummyConfigurationAdmin

  • All Implemented Interfaces:
    org.osgi.service.cm.ConfigurationAdmin

    public class DummyConfigurationAdmin
    extends java.lang.Object
    implements org.osgi.service.cm.ConfigurationAdmin
    Simulates a ConfigurationAdmin for the OpenEMS Component test framework.
    • Constructor Detail

      • DummyConfigurationAdmin

        public DummyConfigurationAdmin()
    • Method Detail

      • createFactoryConfiguration

        public org.osgi.service.cm.Configuration createFactoryConfiguration​(java.lang.String factoryPid)
                                                                     throws java.io.IOException
        Specified by:
        createFactoryConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • createFactoryConfiguration

        public org.osgi.service.cm.Configuration createFactoryConfiguration​(java.lang.String factoryPid,
                                                                            java.lang.String location)
                                                                     throws java.io.IOException
        Specified by:
        createFactoryConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • getConfiguration

        public org.osgi.service.cm.Configuration getConfiguration​(java.lang.String pid)
                                                           throws java.io.IOException
        Specified by:
        getConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • getConfiguration

        public org.osgi.service.cm.Configuration getConfiguration​(java.lang.String pid,
                                                                  java.lang.String location)
                                                           throws java.io.IOException
        Specified by:
        getConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • listConfigurations

        public org.osgi.service.cm.Configuration[] listConfigurations​(java.lang.String filter)
                                                               throws java.io.IOException,
                                                                      org.osgi.framework.InvalidSyntaxException
        Specified by:
        listConfigurations in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
        org.osgi.framework.InvalidSyntaxException
      • getFactoryConfiguration

        public org.osgi.service.cm.Configuration getFactoryConfiguration​(java.lang.String factoryPid,
                                                                         java.lang.String name,
                                                                         java.lang.String location)
                                                                  throws java.io.IOException
        Specified by:
        getFactoryConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • getFactoryConfiguration

        public org.osgi.service.cm.Configuration getFactoryConfiguration​(java.lang.String factoryPid,
                                                                         java.lang.String name)
                                                                  throws java.io.IOException
        Specified by:
        getFactoryConfiguration in interface org.osgi.service.cm.ConfigurationAdmin
        Throws:
        java.io.IOException
      • addConfig

        public void addConfig​(AbstractComponentConfig config)
                       throws java.lang.IllegalAccessException,
                              java.lang.IllegalArgumentException,
                              java.lang.reflect.InvocationTargetException
        Adds a simulated AbstractComponentConfig with all its properties to the configurations.
        Parameters:
        config - the AbstractComponentConfig
        Throws:
        java.lang.IllegalAccessException - on error
        java.lang.IllegalArgumentException - on error
        java.lang.reflect.InvocationTargetException - on error