use of cz.metacentrum.perun.core.api.exceptions.ServiceAlreadyRemovedException in project perun by CESNET.
the class ServicesManagerImpl method deleteService.
public void deleteService(PerunSession sess, Service service) throws InternalErrorException, ServiceAlreadyRemovedException {
try {
// Delete authz entries for this service
AuthzResolverBlImpl.removeAllAuthzForService(sess, service);
int numAffected = jdbc.update("delete from services where id=?", service.getId());
if (numAffected == 0)
throw new ServiceAlreadyRemovedException("Service: " + service);
} catch (RuntimeException ex) {
throw new InternalErrorException(ex);
}
}
Aggregations