test_class.declarator: uriDummy
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) URI uriDummy;
test_class.type: URI
test_class.var_name: uriDummy
test_class.declarator: uriDummy1
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) URI uriDummy1;
test_class.type: URI
test_class.var_name: uriDummy1
test_class.declarator: uriAliases
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) URI uriAliases;
test_class.type: URI
test_class.var_name: uriAliases
test_class.declarator: configDescriptionRegistry
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) ConfigDescriptionRegistry configDescriptionRegistry;
test_class.type: ConfigDescriptionRegistry
test_class.var_name: configDescriptionRegistry
test_class.declarator: configDescription
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) ConfigDescription configDescription;
test_class.type: ConfigDescription
test_class.var_name: configDescription
test_class.declarator: configDescription1
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) ConfigDescription configDescription1;
test_class.type: ConfigDescription
test_class.var_name: configDescription1
test_class.declarator: configDescription2
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) ConfigDescription configDescription2;
test_class.type: ConfigDescription
test_class.var_name: configDescription2
test_class.declarator: configDescriptionAliased
test_class.modifier: private @NonNullByDefault({})
test_class.original_string: private @NonNullByDefault({}) ConfigDescription configDescriptionAliased;
test_class.type: ConfigDescription
test_class.var_name: configDescriptionAliased
test_class.declarator: configDescriptionProviderMock
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigDescriptionProvider configDescriptionProviderMock;
test_class.type: ConfigDescriptionProvider
test_class.var_name: configDescriptionProviderMock
test_class.declarator: configDescriptionProviderMock1
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigDescriptionProvider configDescriptionProviderMock1;
test_class.type: ConfigDescriptionProvider
test_class.var_name: configDescriptionProviderMock1
test_class.declarator: configDescriptionProviderMock2
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigDescriptionProvider configDescriptionProviderMock2;
test_class.type: ConfigDescriptionProvider
test_class.var_name: configDescriptionProviderMock2
test_class.declarator: configDescriptionProviderAliased
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigDescriptionProvider configDescriptionProviderAliased;
test_class.type: ConfigDescriptionProvider
test_class.var_name: configDescriptionProviderAliased
test_class.declarator: aliasProvider
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigDescriptionAliasProvider aliasProvider;
test_class.type: ConfigDescriptionAliasProvider
test_class.var_name: aliasProvider
test_class.declarator: configOptionsProviderMockAliased
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigOptionProvider configOptionsProviderMockAliased;
test_class.type: ConfigOptionProvider
test_class.var_name: configOptionsProviderMockAliased
test_class.declarator: configOptionsProviderMock
test_class.modifier: private @Mock @NonNullByDefault({})
test_class.original_string: private @Mock @NonNullByDefault({}) ConfigOptionProvider configOptionsProviderMock;
test_class.type: ConfigOptionProvider
test_class.var_name: configOptionsProviderMock
test_class.file: bundles/org.openhab.core.config.core/src/test/java/org/openhab/core/config/core/ConfigDescriptionRegistryTest.java
test_class.identifier: ConfigDescriptionRegistryTest
test_class.superclass: extends JavaTest
test_case.body: @Test
      public void testGetConfigDescriptions() throws Exception {
          assertThat(configDescriptionRegistry.getConfigDescriptions().size(), is(0));
  
          configDescriptionRegistry.addConfigDescriptionProvider(configDescriptionProviderMock);
          assertThat(configDescriptionRegistry.getConfigDescriptions().size(), is(1));
  
          List<ConfigDescription> configDescriptions = new ArrayList<>(configDescriptionRegistry.getConfigDescriptions());
          assertThat(configDescriptions.get(0).getUID(), is(equalTo(uriDummy)));
          assertThat(configDescriptions.get(0).toParametersMap().size(), is(1));
          assertThat(configDescriptions.get(0).toParametersMap().get("param1"), notNullValue());
  
          configDescriptionRegistry.addConfigDescriptionProvider(configDescriptionProviderMock1);
          assertThat(configDescriptionRegistry.getConfigDescriptions().size(), is(2));
  
          configDescriptionRegistry.removeConfigDescriptionProvider(configDescriptionProviderMock);
          assertThat(configDescriptionRegistry.getConfigDescriptions().size(), is(1));
  
          configDescriptionRegistry.removeConfigDescriptionProvider(configDescriptionProviderMock1);
          assertThat(configDescriptionRegistry.getConfigDescriptions().size(), is(0));
      }
test_case.class_method_signature: ConfigDescriptionRegistryTest.testGetConfigDescriptions()
test_case.full_signature: @Test public void testGetConfigDescriptions()
test_case.identifier: testGetConfigDescriptions
test_case.invocations: assertThat size getConfigDescriptions is addConfigDescriptionProvider assertThat size getConfigDescriptions is getConfigDescriptions assertThat getUID get is equalTo assertThat size toParametersMap get is assertThat get toParametersMap get notNullValue addConfigDescriptionProvider assertThat size getConfigDescriptions is removeConfigDescriptionProvider assertThat size getConfigDescriptions is removeConfigDescriptionProvider assertThat size getConfigDescriptions is
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetConfigDescriptions()
focal_class.declarator: logger = LoggerFactory.getLogger(ConfigDescriptionRegistry.class)
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(ConfigDescriptionRegistry.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: configOptionProviders = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ConfigOptionProvider> configOptionProviders = new CopyOnWriteArrayList<>();
focal_class.type: List<ConfigOptionProvider>
focal_class.var_name: configOptionProviders
focal_class.declarator: configDescriptionProviders = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ConfigDescriptionProvider> configDescriptionProviders = new CopyOnWriteArrayList<>();
focal_class.type: List<ConfigDescriptionProvider>
focal_class.var_name: configDescriptionProviders
focal_class.declarator: configDescriptionAliasProviders = new CopyOnWriteArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ConfigDescriptionAliasProvider> configDescriptionAliasProviders = new CopyOnWriteArrayList<>();
focal_class.type: List<ConfigDescriptionAliasProvider>
focal_class.var_name: configDescriptionAliasProviders
focal_class.file: bundles/org.openhab.core.config.core/src/main/java/org/openhab/core/config/core/ConfigDescriptionRegistry.java
focal_class.identifier: ConfigDescriptionRegistry
focal_class.class_method_signature: ConfigDescriptionRegistry.addConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.full_signature: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected void addConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.identifier: addConfigOptionProvider
focal_class.modifiers: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected
focal_class.parameters: (ConfigOptionProvider configOptionProvider)
focal_class.return: void
focal_class.signature: void addConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.removeConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.full_signature: protected void removeConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.identifier: removeConfigOptionProvider
focal_class.modifiers: protected
focal_class.parameters: (ConfigOptionProvider configOptionProvider)
focal_class.return: void
focal_class.signature: void removeConfigOptionProvider(ConfigOptionProvider configOptionProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.addConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.full_signature: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected void addConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.identifier: addConfigDescriptionProvider
focal_class.modifiers: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected
focal_class.parameters: (ConfigDescriptionProvider configDescriptionProvider)
focal_class.return: void
focal_class.signature: void addConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.removeConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.full_signature: protected void removeConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.identifier: removeConfigDescriptionProvider
focal_class.modifiers: protected
focal_class.parameters: (ConfigDescriptionProvider configDescriptionProvider)
focal_class.return: void
focal_class.signature: void removeConfigDescriptionProvider(ConfigDescriptionProvider configDescriptionProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.addConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.full_signature: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected void addConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.identifier: addConfigDescriptionAliasProvider
focal_class.modifiers: @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC) protected
focal_class.parameters: (ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.return: void
focal_class.signature: void addConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.removeConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.full_signature: protected void removeConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.identifier: removeConfigDescriptionAliasProvider
focal_class.modifiers: protected
focal_class.parameters: (ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.return: void
focal_class.signature: void removeConfigDescriptionAliasProvider(ConfigDescriptionAliasProvider configDescriptionAliasProvider)
focal_class.class_method_signature: ConfigDescriptionRegistry.getConfigDescriptions(@Nullable Locale locale)
focal_class.full_signature: public Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale)
focal_class.identifier: getConfigDescriptions
focal_class.modifiers: public
focal_class.parameters: (@Nullable Locale locale)
focal_class.return: Collection<ConfigDescription>
focal_class.signature: Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale)
focal_class.class_method_signature: ConfigDescriptionRegistry.getConfigDescriptions()
focal_class.full_signature: public Collection<ConfigDescription> getConfigDescriptions()
focal_class.identifier: getConfigDescriptions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<ConfigDescription>
focal_class.signature: Collection<ConfigDescription> getConfigDescriptions()
focal_class.class_method_signature: ConfigDescriptionRegistry.getConfigDescription(URI uri, @Nullable Locale locale)
focal_class.full_signature: public @Nullable ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale)
focal_class.identifier: getConfigDescription
focal_class.modifiers: public @Nullable
focal_class.parameters: (URI uri, @Nullable Locale locale)
focal_class.return: ConfigDescription
focal_class.signature: ConfigDescription getConfigDescription(URI uri, @Nullable Locale locale)
focal_class.class_method_signature: ConfigDescriptionRegistry.getAliases(URI original)
focal_class.full_signature: private Set<URI> getAliases(URI original)
focal_class.identifier: getAliases
focal_class.modifiers: private
focal_class.parameters: (URI original)
focal_class.return: Set<URI>
focal_class.signature: Set<URI> getAliases(URI original)
focal_class.class_method_signature: ConfigDescriptionRegistry.fillFromProviders(URI uri, @Nullable Locale locale, List<ConfigDescriptionParameter> parameters,
              List<ConfigDescriptionParameterGroup> parameterGroups)
focal_class.full_signature: private boolean fillFromProviders(URI uri, @Nullable Locale locale, List<ConfigDescriptionParameter> parameters,
              List<ConfigDescriptionParameterGroup> parameterGroups)
focal_class.identifier: fillFromProviders
focal_class.modifiers: private
focal_class.parameters: (URI uri, @Nullable Locale locale, List<ConfigDescriptionParameter> parameters,
              List<ConfigDescriptionParameterGroup> parameterGroups)
focal_class.return: boolean
focal_class.signature: boolean fillFromProviders(URI uri, @Nullable Locale locale, List<ConfigDescriptionParameter> parameters,
              List<ConfigDescriptionParameterGroup> parameterGroups)
focal_class.class_method_signature: ConfigDescriptionRegistry.getConfigDescription(URI uri)
focal_class.full_signature: public @Nullable ConfigDescription getConfigDescription(URI uri)
focal_class.identifier: getConfigDescription
focal_class.modifiers: public @Nullable
focal_class.parameters: (URI uri)
focal_class.return: ConfigDescription
focal_class.signature: ConfigDescription getConfigDescription(URI uri)
focal_class.class_method_signature: ConfigDescriptionRegistry.getConfigOptions(URI uri, Set<URI> aliases, ConfigDescriptionParameter parameter,
              @Nullable Locale locale)
focal_class.full_signature: private ConfigDescriptionParameter getConfigOptions(URI uri, Set<URI> aliases, ConfigDescriptionParameter parameter,
              @Nullable Locale locale)
focal_class.identifier: getConfigOptions
focal_class.modifiers: private
focal_class.parameters: (URI uri, Set<URI> aliases, ConfigDescriptionParameter parameter,
              @Nullable Locale locale)
focal_class.return: ConfigDescriptionParameter
focal_class.signature: ConfigDescriptionParameter getConfigOptions(URI uri, Set<URI> aliases, ConfigDescriptionParameter parameter,
              @Nullable Locale locale)
focal_class.class_method_signature: ConfigDescriptionRegistry.fillFromProviders(URI alias, ConfigDescriptionParameter parameter, @Nullable Locale locale,
              List<ParameterOption> options)
focal_class.full_signature: private boolean fillFromProviders(URI alias, ConfigDescriptionParameter parameter, @Nullable Locale locale,
              List<ParameterOption> options)
focal_class.identifier: fillFromProviders
focal_class.modifiers: private
focal_class.parameters: (URI alias, ConfigDescriptionParameter parameter, @Nullable Locale locale,
              List<ParameterOption> options)
focal_class.return: boolean
focal_class.signature: boolean fillFromProviders(URI alias, ConfigDescriptionParameter parameter, @Nullable Locale locale,
              List<ParameterOption> options)
focal_method.body: public Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale) {
          Map<URI, ConfigDescription> configMap = new HashMap<>();
  
          // Loop over all providers
          for (ConfigDescriptionProvider configDescriptionProvider : configDescriptionProviders) {
              // And for each provider, loop over all their config descriptions
              for (ConfigDescription configDescription : configDescriptionProvider.getConfigDescriptions(locale)) {
                  // See if there already exists a configuration for this URI in the map
                  ConfigDescription configFromMap = configMap.get(configDescription.getUID());
                  if (configFromMap != null) {
                      // Yes - Merge the groups and parameters
                      List<ConfigDescriptionParameter> parameters = new ArrayList<>();
                      parameters.addAll(configFromMap.getParameters());
                      parameters.addAll(configDescription.getParameters());
  
                      List<ConfigDescriptionParameterGroup> parameterGroups = new ArrayList<>();
                      parameterGroups.addAll(configFromMap.getParameterGroups());
                      parameterGroups.addAll(configDescription.getParameterGroups());
  
                      // And add the combined configuration to the map
                      configMap.put(configDescription.getUID(),
                              ConfigDescriptionBuilder.create(configDescription.getUID()).withParameters(parameters)
                                      .withParameterGroups(parameterGroups).build());
                  } else {
                      // No - Just add the new configuration to the map
                      configMap.put(configDescription.getUID(), configDescription);
                  }
              }
          }
  
          // Now convert the map into the collection
          Collection<ConfigDescription> configDescriptions = new ArrayList<>(configMap.size());
          for (ConfigDescription configDescription : configMap.values()) {
              configDescriptions.add(configDescription);
          }
  
          return Collections.unmodifiableCollection(configDescriptions);
      }
focal_method.class_method_signature: ConfigDescriptionRegistry.getConfigDescriptions(@Nullable Locale locale)
focal_method.full_signature: public Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale)
focal_method.identifier: getConfigDescriptions
focal_method.invocations: getConfigDescriptions get getUID addAll getParameters addAll getParameters addAll getParameterGroups addAll getParameterGroups put getUID build withParameterGroups withParameters create getUID put getUID size values add unmodifiableCollection
focal_method.modifiers: public
focal_method.parameters: (@Nullable Locale locale)
focal_method.return: Collection<ConfigDescription>
focal_method.signature: Collection<ConfigDescription> getConfigDescriptions(@Nullable Locale locale)