.deleteAlertsByContext(getOverlord(), EntityContext.forResource(def.getResource().getId()));
}
alertDefinitionManager.removeAlertDefinitions(getOverlord(), ids);
alertDefinitionManager.purgeUnusedAlertDefinitions();
for(i = 0; i < ids.length; ++i) {
alertDefinitionManager.purgeInternals(ids[i]);
}
}