use of cz.metacentrum.perun.audit.events.ServicesManagerEvents.DestinationsRemovedFromAllServices in project perun by CESNET.
the class ServicesManagerBlImpl method removeAllDestinations.
@Override
public void removeAllDestinations(PerunSession perunSession, Facility facility) {
List<Destination> destinations = getDestinations(perunSession, facility);
getServicesManagerImpl().removeAllDestinations(perunSession, facility);
// remove destinations from destination table if they are not used anymore
for (Destination destination : destinations) {
try {
this.deleteDestination(perunSession, destination);
} catch (RelationExistsException | DestinationAlreadyRemovedException ex) {
// destination is used by some services and facilities or it is already removed, skip the destination
}
}
getPerunBl().getAuditer().log(perunSession, new DestinationsRemovedFromAllServices(facility));
}
Aggregations