ApiConfigGroup confGroup = serviceToGroup.get(serviceName);
if (confGroup == null) {
confGroup = createConfigGroup(clusterDef, nodeDef, serviceName);
serviceToGroup.put(serviceName, confGroup);
}
ApiConfigGroupConfiguration sameType = null;
for (ApiConfigGroupConfiguration config : confGroup
.getApiConfigGroupInfo().getDesiredConfigs()) {
if (config.getType().equals(type)) {
sameType = config;
break;
}
}
if (sameType == null) {
sameType =
createApiConfigGroupConf(i, type, serviceName,
confGroup);
}
Map<String, String> property = (Map<String, String>)map.get(type);
sameType.getProperties().putAll(property);
}
}
configGroups.addAll(serviceToGroup.values());
}
if (configGroups.isEmpty()) {