importResults.getMessages().add(new ImportExportMessage(ImportExportMessage.PROVIDER_CREATED, new Object[] {newProvider}));
}
}
// Save the imported KPIs.
KPIManager kpiMgr = DataDisplayerServices.lookup().getKPIManager();
for (KPI newKPI : importResults.getKPIs()) {
KPI oldKPI = kpiMgr.getKPIByCode(newKPI.getCode());
if (oldKPI != null) {
// If the KPI is already present in the database then simply replace the references to the old KPI.
importResults.replaceKPI(newKPI, oldKPI);
if (update) {
oldKPI.setDescriptionI18nMap(newKPI.getDescriptionI18nMap());