GerConfigPropertySettingType[] configPropertySettings = configPropertiesSource.getConfigPropertySettingArray();
if (configPropertySettings.length == 0) {
//we are new
for (int i = 0; i < configProperties.length; i++) {
DDBean configProperty = configProperties[i];
GerConfigPropertySettingType configPropertySetting = configPropertiesSource.addNewConfigPropertySetting();
String name = configProperty.getText(configPropertyNameXPath)[0];
ConfigPropertySettingDConfigBean configPropertySettingDConfigBean = new ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
configPropertiesMap.put(name, configPropertySettingDConfigBean);
}
} else {
//we are read in from xml. Check correct length
assert configProperties.length == configPropertySettings.length;
for (int i = 0; i < configProperties.length; i++) {
DDBean configProperty = configProperties[i];
GerConfigPropertySettingType configPropertySetting = configPropertySettings[i];
String name = configProperty.getText(configPropertyNameXPath)[0];
assert name.equals(configPropertySetting.getName());
ConfigPropertySettingDConfigBean configPropertySettingDConfigBean = new ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
configPropertiesMap.put(name, configPropertySettingDConfigBean);
}
}