Search in sources :

Example 1 with FileConfigurationSourceProvider

use of com.b2international.commons.config.FileConfigurationSourceProvider in project snow-owl by b2ihealthcare.

the class SnowOwl method createConfiguration.

private SnowOwlConfiguration createConfiguration(Path configPath, Plugins plugins) throws Exception {
    final Validator validator = ApiValidation.getValidator();
    final ConfigurationFactory<SnowOwlConfiguration> factory = new ConfigurationFactory<SnowOwlConfiguration>(SnowOwlConfiguration.class, validator);
    factory.setAdditionalModules(plugins.getPluginConfigurations());
    final Path configFile = configPath.resolve(CONFIGURATION_FILE);
    return configFile != null ? factory.build(new FileConfigurationSourceProvider(), configFile.toString()) : factory.build();
}
Also used : Path(java.nio.file.Path) ConfigurationFactory(com.b2international.commons.config.ConfigurationFactory) Validator(javax.validation.Validator) SnowOwlConfiguration(com.b2international.snowowl.core.config.SnowOwlConfiguration) FileConfigurationSourceProvider(com.b2international.commons.config.FileConfigurationSourceProvider)

Aggregations

ConfigurationFactory (com.b2international.commons.config.ConfigurationFactory)1 FileConfigurationSourceProvider (com.b2international.commons.config.FileConfigurationSourceProvider)1 SnowOwlConfiguration (com.b2international.snowowl.core.config.SnowOwlConfiguration)1 Path (java.nio.file.Path)1 Validator (javax.validation.Validator)1