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