use of org.alien4cloud.alm.service.exceptions.ServiceUsageException in project alien4cloud by alien4cloud.
the class ServiceResourceService method failIdUsed.
private void failIdUsed(String id) {
ServiceUsageRequestEvent serviceUsageRequestEvent = new ServiceUsageRequestEvent(this, id);
publisher.publishEvent(serviceUsageRequestEvent);
Usage[] usages = serviceUsageRequestEvent.getUsages();
if (usages.length > 0) {
throw new ServiceUsageException("Used services cannot be updated or deleted.", usages);
}
}
Aggregations