use of org.alien4cloud.alm.events.BeforeApplicationVersionDeleted in project alien4cloud by alien4cloud.
the class ApplicationVersionService method deleteVersion.
private void deleteVersion(ApplicationVersion version) {
// Call delete archive
for (Map.Entry<String, ApplicationTopologyVersion> topologyVersionEntry : version.getTopologyVersions().entrySet()) {
publisher.publishEvent(new BeforeApplicationTopologyVersionDeleted(this, version.getApplicationId(), version.getId(), topologyVersionEntry.getKey()));
csarService.deleteCsar(topologyVersionEntry.getValue().getArchiveId());
}
publisher.publishEvent(new BeforeApplicationVersionDeleted(this, version.getApplicationId(), version.getId()));
alienDAO.delete(ApplicationVersion.class, version.getId());
publisher.publishEvent(new AfterApplicationVersionDeleted(this, version.getApplicationId(), version.getId()));
for (Map.Entry<String, ApplicationTopologyVersion> topologyVersionEntry : version.getTopologyVersions().entrySet()) {
publisher.publishEvent(new AfterApplicationTopologyVersionDeleted(this, version.getApplicationId(), version.getId(), topologyVersionEntry.getKey()));
}
}
Aggregations