Search in sources :

Example 1 with DynamicModulesConfigurationProvider

use of org.walkmod.conf.providers.DynamicModulesConfigurationProvider in project walkmod-core by walkmod.

the class WalkModFacade method createConfig.

private Configuration createConfig(String[] chains, ConfigurationProvider... cp) throws InvalidConfigurationException {
    Configuration config = new ConfigurationImpl();
    try {
        DynamicConfigurationProvider prov = new DynamicConfigurationProvider(options, chains);
        prov.init(config);
        prov.load();
        ConfigurationManager cfgManager = new ConfigurationManager(config, cp);
        DynamicModulesConfigurationProvider prov2 = new DynamicModulesConfigurationProvider();
        prov2.init(config);
        prov2.load();
        config = cfgManager.getConfiguration();
        config.setParameters(options.getMutableCopyOfDynamicArgs());
    } catch (Exception e) {
        printConfigError(e);
    }
    return config;
}
Also used : Configuration(org.walkmod.conf.entities.Configuration) DynamicConfigurationProvider(org.walkmod.conf.providers.DynamicConfigurationProvider) ConfigurationImpl(org.walkmod.conf.entities.impl.ConfigurationImpl) ConfigurationManager(org.walkmod.conf.ConfigurationManager) DynamicModulesConfigurationProvider(org.walkmod.conf.providers.DynamicModulesConfigurationProvider) WalkModException(org.walkmod.exceptions.WalkModException) IOException(java.io.IOException) InvalidConfigurationException(org.walkmod.exceptions.InvalidConfigurationException)

Aggregations

IOException (java.io.IOException)1 ConfigurationManager (org.walkmod.conf.ConfigurationManager)1 Configuration (org.walkmod.conf.entities.Configuration)1 ConfigurationImpl (org.walkmod.conf.entities.impl.ConfigurationImpl)1 DynamicConfigurationProvider (org.walkmod.conf.providers.DynamicConfigurationProvider)1 DynamicModulesConfigurationProvider (org.walkmod.conf.providers.DynamicModulesConfigurationProvider)1 InvalidConfigurationException (org.walkmod.exceptions.InvalidConfigurationException)1 WalkModException (org.walkmod.exceptions.WalkModException)1