test_class.file: stagemonitor-configuration/src/test/java/org/stagemonitor/configuration/ConfigurationRegistryTest.java
test_class.identifier: ConfigurationRegistryTest
test_case.body: @Test
  	public void testValidateConfigurationOption() throws Exception {
  		final ConfigurationOption<Boolean> configurationOption = ConfigurationOption.booleanOption()
  				.key("foo")
  				.addValidator((value) -> {
  					if (!value) {
  						throw new IllegalArgumentException("Validation failed");
  					}
  				})
  				.buildWithDefault(true);
  
  		final ConfigurationOptionProvider optionProvider = TestConfigurationOptionProvider.of(configurationOption);
  		final SimpleSource configurationSource = new SimpleSource("test");
  		final ConfigurationRegistry config = ConfigurationRegistry.builder()
  				.addOptionProvider(optionProvider)
  				.addConfigSource(configurationSource)
  				.build();
  		try {
  			config.save("foo", "false", "test");
  			fail();
  		} catch (IllegalArgumentException e) {
  			assertEquals("Validation failed", e.getMessage());
  		}
  	}
test_case.class_method_signature: ConfigurationRegistryTest.testValidateConfigurationOption()
test_case.full_signature: @Test public void testValidateConfigurationOption()
test_case.identifier: testValidateConfigurationOption
test_case.invocations: buildWithDefault addValidator key booleanOption of build addConfigSource addOptionProvider builder save fail assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidateConfigurationOption()
focal_class.declarator: logger = LoggerFactory.getLogger(getClass())
focal_class.modifier: private final
focal_class.original_string: private final Logger logger = LoggerFactory.getLogger(getClass());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: configurationSources = new CopyOnWriteArrayList<ConfigurationSource>()
focal_class.modifier: private final
focal_class.original_string: private final List<ConfigurationSource> configurationSources = new CopyOnWriteArrayList<ConfigurationSource>();
focal_class.type: List<ConfigurationSource>
focal_class.var_name: configurationSources
focal_class.declarator: failOnMissingRequiredValues
focal_class.modifier: private final
focal_class.original_string: private final boolean failOnMissingRequiredValues;
focal_class.type: boolean
focal_class.var_name: failOnMissingRequiredValues
focal_class.declarator: optionProvidersByClass = new HashMap<Class<? extends ConfigurationOptionProvider>, ConfigurationOptionProvider>()
focal_class.modifier: private
focal_class.original_string: private Map<Class<? extends ConfigurationOptionProvider>, ConfigurationOptionProvider> optionProvidersByClass = new HashMap<Class<? extends ConfigurationOptionProvider>, ConfigurationOptionProvider>();
focal_class.type: Map<Class<? extends ConfigurationOptionProvider>, ConfigurationOptionProvider>
focal_class.var_name: optionProvidersByClass
focal_class.declarator: configurationOptionsByKey = new LinkedHashMap<String, ConfigurationOption<?>>()
focal_class.modifier: private
focal_class.original_string: private Map<String, ConfigurationOption<?>> configurationOptionsByKey = new LinkedHashMap<String, ConfigurationOption<?>>();
focal_class.type: Map<String, ConfigurationOption<?>>
focal_class.var_name: configurationOptionsByKey
focal_class.declarator: configurationOptionsByCategory = new LinkedHashMap<String, List<ConfigurationOption<?>>>()
focal_class.modifier: private
focal_class.original_string: private Map<String, List<ConfigurationOption<?>>> configurationOptionsByCategory = new LinkedHashMap<String, List<ConfigurationOption<?>>>();
focal_class.type: Map<String, List<ConfigurationOption<?>>>
focal_class.var_name: configurationOptionsByCategory
focal_class.declarator: configurationReloader
focal_class.modifier: private
focal_class.original_string: private ScheduledExecutorService configurationReloader;
focal_class.type: ScheduledExecutorService
focal_class.var_name: configurationReloader
focal_class.file: stagemonitor-configuration/src/main/java/org/stagemonitor/configuration/ConfigurationRegistry.java
focal_class.identifier: ConfigurationRegistry
focal_class.interfaces: implements Closeable
focal_class.class_method_signature: ConfigurationRegistry.builder()
focal_class.full_signature: public static Builder builder()
focal_class.identifier: builder
focal_class.modifiers: public static
focal_class.parameters: ()
focal_class.return: Builder
focal_class.signature: Builder builder()
focal_class.class_method_signature: ConfigurationRegistry.ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources)
focal_class.full_signature: @Deprecated public  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources)
focal_class.identifier: ConfigurationRegistry
focal_class.modifiers: @Deprecated public
focal_class.parameters: (Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources)
focal_class.signature:  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources)
focal_class.class_method_signature: ConfigurationRegistry.ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources, boolean failOnMissingRequiredValues)
focal_class.full_signature: @Deprecated public  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources, boolean failOnMissingRequiredValues)
focal_class.identifier: ConfigurationRegistry
focal_class.modifiers: @Deprecated public
focal_class.parameters: (Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources, boolean failOnMissingRequiredValues)
focal_class.signature:  ConfigurationRegistry(Iterable<? extends ConfigurationOptionProvider> optionProviders,
  								 List<ConfigurationSource> configSources, boolean failOnMissingRequiredValues)
focal_class.class_method_signature: ConfigurationRegistry.registerConfigurationOptions(Iterable<? extends ConfigurationOptionProvider> optionProviders)
focal_class.full_signature: private void registerConfigurationOptions(Iterable<? extends ConfigurationOptionProvider> optionProviders)
focal_class.identifier: registerConfigurationOptions
focal_class.modifiers: private
focal_class.parameters: (Iterable<? extends ConfigurationOptionProvider> optionProviders)
focal_class.return: void
focal_class.signature: void registerConfigurationOptions(Iterable<? extends ConfigurationOptionProvider> optionProviders)
focal_class.class_method_signature: ConfigurationRegistry.registerOptionProvider(ConfigurationOptionProvider configurationOptionProvider)
focal_class.full_signature: private void registerOptionProvider(ConfigurationOptionProvider configurationOptionProvider)
focal_class.identifier: registerOptionProvider
focal_class.modifiers: private
focal_class.parameters: (ConfigurationOptionProvider configurationOptionProvider)
focal_class.return: void
focal_class.signature: void registerOptionProvider(ConfigurationOptionProvider configurationOptionProvider)
focal_class.class_method_signature: ConfigurationRegistry.getConfig(Class<T> configClass)
focal_class.full_signature: public T getConfig(Class<T> configClass)
focal_class.identifier: getConfig
focal_class.modifiers: public
focal_class.parameters: (Class<T> configClass)
focal_class.return: T
focal_class.signature: T getConfig(Class<T> configClass)
focal_class.class_method_signature: ConfigurationRegistry.getConfigurationOptionProviders()
focal_class.full_signature: public Collection<ConfigurationOptionProvider> getConfigurationOptionProviders()
focal_class.identifier: getConfigurationOptionProviders
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<ConfigurationOptionProvider>
focal_class.signature: Collection<ConfigurationOptionProvider> getConfigurationOptionProviders()
focal_class.class_method_signature: ConfigurationRegistry.add(final ConfigurationOption<?> configurationOption)
focal_class.full_signature: private void add(final ConfigurationOption<?> configurationOption)
focal_class.identifier: add
focal_class.modifiers: private
focal_class.parameters: (final ConfigurationOption<?> configurationOption)
focal_class.return: void
focal_class.signature: void add(final ConfigurationOption<?> configurationOption)
focal_class.class_method_signature: ConfigurationRegistry.addConfigurationOptionByKey(ConfigurationOption<?> configurationOption, String key)
focal_class.full_signature: private void addConfigurationOptionByKey(ConfigurationOption<?> configurationOption, String key)
focal_class.identifier: addConfigurationOptionByKey
focal_class.modifiers: private
focal_class.parameters: (ConfigurationOption<?> configurationOption, String key)
focal_class.return: void
focal_class.signature: void addConfigurationOptionByKey(ConfigurationOption<?> configurationOption, String key)
focal_class.class_method_signature: ConfigurationRegistry.addConfigurationOptionByCategory(String configurationCategory, final ConfigurationOption<?> configurationOption)
focal_class.full_signature: private void addConfigurationOptionByCategory(String configurationCategory, final ConfigurationOption<?> configurationOption)
focal_class.identifier: addConfigurationOptionByCategory
focal_class.modifiers: private
focal_class.parameters: (String configurationCategory, final ConfigurationOption<?> configurationOption)
focal_class.return: void
focal_class.signature: void addConfigurationOptionByCategory(String configurationCategory, final ConfigurationOption<?> configurationOption)
focal_class.class_method_signature: ConfigurationRegistry.getConfigurationOptionsByCategory()
focal_class.full_signature: public Map<String, List<ConfigurationOption<?>>> getConfigurationOptionsByCategory()
focal_class.identifier: getConfigurationOptionsByCategory
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, List<ConfigurationOption<?>>>
focal_class.signature: Map<String, List<ConfigurationOption<?>>> getConfigurationOptionsByCategory()
focal_class.class_method_signature: ConfigurationRegistry.getConfigurationOptionsByKey()
focal_class.full_signature: public Map<String, ConfigurationOption<?>> getConfigurationOptionsByKey()
focal_class.identifier: getConfigurationOptionsByKey
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, ConfigurationOption<?>>
focal_class.signature: Map<String, ConfigurationOption<?>> getConfigurationOptionsByKey()
focal_class.class_method_signature: ConfigurationRegistry.getNamesOfConfigurationSources()
focal_class.full_signature: public Map<String, Boolean> getNamesOfConfigurationSources()
focal_class.identifier: getNamesOfConfigurationSources
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Map<String, Boolean>
focal_class.signature: Map<String, Boolean> getNamesOfConfigurationSources()
focal_class.class_method_signature: ConfigurationRegistry.getConfigurationOptionByKey(String key)
focal_class.full_signature: public ConfigurationOption<?> getConfigurationOptionByKey(String key)
focal_class.identifier: getConfigurationOptionByKey
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: ConfigurationOption<?>
focal_class.signature: ConfigurationOption<?> getConfigurationOptionByKey(String key)
focal_class.class_method_signature: ConfigurationRegistry.scheduleReloadAtRate(final long rate, TimeUnit timeUnit)
focal_class.full_signature: public void scheduleReloadAtRate(final long rate, TimeUnit timeUnit)
focal_class.identifier: scheduleReloadAtRate
focal_class.modifiers: public
focal_class.parameters: (final long rate, TimeUnit timeUnit)
focal_class.return: void
focal_class.signature: void scheduleReloadAtRate(final long rate, TimeUnit timeUnit)
focal_class.class_method_signature: ConfigurationRegistry.initThreadPool()
focal_class.full_signature: private void initThreadPool()
focal_class.identifier: initThreadPool
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initThreadPool()
focal_class.class_method_signature: ConfigurationRegistry.reload(String key)
focal_class.full_signature: public void reload(String key)
focal_class.identifier: reload
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: void
focal_class.signature: void reload(String key)
focal_class.class_method_signature: ConfigurationRegistry.reloadAllConfigurationOptions()
focal_class.full_signature: public void reloadAllConfigurationOptions()
focal_class.identifier: reloadAllConfigurationOptions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reloadAllConfigurationOptions()
focal_class.class_method_signature: ConfigurationRegistry.reloadDynamicConfigurationOptions()
focal_class.full_signature: public void reloadDynamicConfigurationOptions()
focal_class.identifier: reloadDynamicConfigurationOptions
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void reloadDynamicConfigurationOptions()
focal_class.class_method_signature: ConfigurationRegistry.reload(final boolean reloadNonDynamicValues)
focal_class.full_signature: private void reload(final boolean reloadNonDynamicValues)
focal_class.identifier: reload
focal_class.modifiers: private
focal_class.parameters: (final boolean reloadNonDynamicValues)
focal_class.return: void
focal_class.signature: void reload(final boolean reloadNonDynamicValues)
focal_class.class_method_signature: ConfigurationRegistry.addConfigurationSource(ConfigurationSource configurationSource)
focal_class.full_signature: public void addConfigurationSource(ConfigurationSource configurationSource)
focal_class.identifier: addConfigurationSource
focal_class.modifiers: public
focal_class.parameters: (ConfigurationSource configurationSource)
focal_class.return: void
focal_class.signature: void addConfigurationSource(ConfigurationSource configurationSource)
focal_class.class_method_signature: ConfigurationRegistry.addConfigurationSourceAfter(ConfigurationSource configurationSource, Class<? extends ConfigurationSource> addAfter)
focal_class.full_signature: public void addConfigurationSourceAfter(ConfigurationSource configurationSource, Class<? extends ConfigurationSource> addAfter)
focal_class.identifier: addConfigurationSourceAfter
focal_class.modifiers: public
focal_class.parameters: (ConfigurationSource configurationSource, Class<? extends ConfigurationSource> addAfter)
focal_class.return: void
focal_class.signature: void addConfigurationSourceAfter(ConfigurationSource configurationSource, Class<? extends ConfigurationSource> addAfter)
focal_class.class_method_signature: ConfigurationRegistry.addConfigurationSource(ConfigurationSource configurationSource, boolean firstPrio)
focal_class.full_signature: public void addConfigurationSource(ConfigurationSource configurationSource, boolean firstPrio)
focal_class.identifier: addConfigurationSource
focal_class.modifiers: public
focal_class.parameters: (ConfigurationSource configurationSource, boolean firstPrio)
focal_class.return: void
focal_class.signature: void addConfigurationSource(ConfigurationSource configurationSource, boolean firstPrio)
focal_class.class_method_signature: ConfigurationRegistry.save(String key, String value, String configurationSourceName)
focal_class.full_signature: public void save(String key, String value, String configurationSourceName)
focal_class.identifier: save
focal_class.modifiers: public
focal_class.parameters: (String key, String value, String configurationSourceName)
focal_class.return: void
focal_class.signature: void save(String key, String value, String configurationSourceName)
focal_class.class_method_signature: ConfigurationRegistry.validateConfigurationOption(String key, String value)
focal_class.full_signature: private ConfigurationOption<?> validateConfigurationOption(String key, String value)
focal_class.identifier: validateConfigurationOption
focal_class.modifiers: private
focal_class.parameters: (String key, String value)
focal_class.return: ConfigurationOption<?>
focal_class.signature: ConfigurationOption<?> validateConfigurationOption(String key, String value)
focal_class.class_method_signature: ConfigurationRegistry.saveToConfigurationSource(String key, String value, String configurationSourceName, ConfigurationOption<?> configurationOption)
focal_class.full_signature: private void saveToConfigurationSource(String key, String value, String configurationSourceName, ConfigurationOption<?> configurationOption)
focal_class.identifier: saveToConfigurationSource
focal_class.modifiers: private
focal_class.parameters: (String key, String value, String configurationSourceName, ConfigurationOption<?> configurationOption)
focal_class.return: void
focal_class.signature: void saveToConfigurationSource(String key, String value, String configurationSourceName, ConfigurationOption<?> configurationOption)
focal_class.class_method_signature: ConfigurationRegistry.maskSensitivConfigurationValues(ConfigurationOption<?> configurationOption, String value)
focal_class.full_signature: private String maskSensitivConfigurationValues(ConfigurationOption<?> configurationOption, String value)
focal_class.identifier: maskSensitivConfigurationValues
focal_class.modifiers: private
focal_class.parameters: (ConfigurationOption<?> configurationOption, String value)
focal_class.return: String
focal_class.signature: String maskSensitivConfigurationValues(ConfigurationOption<?> configurationOption, String value)
focal_class.class_method_signature: ConfigurationRegistry.validateConfigurationSource(ConfigurationSource configurationSource, ConfigurationOption<?> configurationOption)
focal_class.full_signature: private void validateConfigurationSource(ConfigurationSource configurationSource, ConfigurationOption<?> configurationOption)
focal_class.identifier: validateConfigurationSource
focal_class.modifiers: private
focal_class.parameters: (ConfigurationSource configurationSource, ConfigurationOption<?> configurationOption)
focal_class.return: void
focal_class.signature: void validateConfigurationSource(ConfigurationSource configurationSource, ConfigurationOption<?> configurationOption)
focal_class.class_method_signature: ConfigurationRegistry.getString(String key)
focal_class.full_signature: public String getString(String key)
focal_class.identifier: getString
focal_class.modifiers: public
focal_class.parameters: (String key)
focal_class.return: String
focal_class.signature: String getString(String key)
focal_class.class_method_signature: ConfigurationRegistry.close()
focal_class.full_signature: @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ConfigurationRegistry.isFailOnMissingRequiredValues()
focal_class.full_signature:  boolean isFailOnMissingRequiredValues()
focal_class.identifier: isFailOnMissingRequiredValues
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isFailOnMissingRequiredValues()
focal_method.body: private ConfigurationOption<?> validateConfigurationOption(String key, String value) throws IllegalArgumentException {
  		final ConfigurationOption configurationOption = getConfigurationOptionByKey(key);
  		if (configurationOption != null) {
  			configurationOption.assertValid(value);
  			return configurationOption;
  		} else {
  			throw new IllegalArgumentException("Config key '" + key + "' does not exist.");
  		}
  	}
focal_method.class_method_signature: ConfigurationRegistry.validateConfigurationOption(String key, String value)
focal_method.full_signature: private ConfigurationOption<?> validateConfigurationOption(String key, String value)
focal_method.identifier: validateConfigurationOption
focal_method.invocations: getConfigurationOptionByKey assertValid
focal_method.modifiers: private
focal_method.parameters: (String key, String value)
focal_method.return: ConfigurationOption<?>
focal_method.signature: ConfigurationOption<?> validateConfigurationOption(String key, String value)