use of org.obiba.mica.dataset.event.DatasetDeletedEvent in project mica2 by obiba.
the class CollectedDatasetService method delete.
public void delete(String id) {
StudyDataset dataset = studyDatasetRepository.findOne(id);
if (dataset == null) {
throw NoSuchDatasetException.withId(id);
}
fileSystemService.delete(FileUtils.getEntityPath(dataset));
helper.evictCache(dataset);
studyDatasetRepository.delete(id);
studyDatasetStateRepository.delete(id);
gitService.deleteGitRepository(dataset);
eventBus.post(new DatasetDeletedEvent(dataset));
}
use of org.obiba.mica.dataset.event.DatasetDeletedEvent in project mica2 by obiba.
the class HarmonizedDatasetService method delete.
public void delete(String id) {
HarmonizationDataset dataset = harmonizationDatasetRepository.findOne(id);
if (dataset == null) {
throw NoSuchDatasetException.withId(id);
}
fileSystemService.delete(FileUtils.getEntityPath(dataset));
helper.evictCache(dataset);
harmonizationDatasetStateRepository.delete(id);
harmonizationDatasetRepository.delete(id);
gitService.deleteGitRepository(dataset);
eventBus.post(new DatasetDeletedEvent(dataset));
}
Aggregations