use of cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnDestination in project perun by CESNET.
the class ServicesManagerBlImpl method blockServiceOnDestination.
@Override
public void blockServiceOnDestination(PerunSession sess, Service service, int destinationId) throws ServiceAlreadyBannedException {
getServicesManagerImpl().blockServiceOnDestination(sess, service.getId(), destinationId);
sess.getPerun().getAuditer().log(sess, new BanServiceOnDestination(service, destinationId));
}
use of cz.metacentrum.perun.audit.events.GeneralServiceManagerEvents.BanServiceOnDestination in project perun by CESNET.
the class ServicesManagerBlImpl method blockAllServicesOnDestination.
@Override
public void blockAllServicesOnDestination(PerunSession sess, int destinationId) throws PrivilegeException, DestinationNotExistsException {
List<Service> services = getServicesManagerImpl().getServicesFromDestination(destinationId);
for (Service service : services) {
try {
getServicesManagerImpl().blockServiceOnDestination(sess, service.getId(), destinationId);
sess.getPerun().getAuditer().log(sess, new BanServiceOnDestination(service, destinationId));
} catch (ServiceAlreadyBannedException e) {
// we ignore, that service was already blocked
}
}
}
Aggregations