if (configurationName==null) {
throw new IllegalArgumentException("ConfigurationName must not be null");
}
ConfigurationDefinition configurationDefinition = new ConfigurationDefinition(configurationName,
descriptor.getNotes());
configurationDefinition.setConfigurationFormat(getConfigurationFormat(descriptor));
if (configurationDefinition.getConfigurationFormat() == RAW) {
return configurationDefinition;
}
for (ConfigurationTemplateDescriptor templateDescriptor : descriptor.getTemplate()) {
configurationDefinition.putTemplate(parseTemplate(templateDescriptor));
}
ConfigurationTemplate defaultTemplate = initDefaultTemplate(configurationDefinition);
configurationDefinition.putTemplate(defaultTemplate);
Configuration defaultConfiguration = defaultTemplate.getConfiguration();
parseProperties(descriptor, defaultConfiguration, configurationDefinition);
ConfigurationUtility.normalizeConfiguration(defaultConfiguration, configurationDefinition);