private boolean isAllServiceInstancesTerminated(List<ServiceInstance> serviceInstances) { for (ServiceInstance service : serviceInstances) { boolean serviceActive = service.getStatus() == InstanceStatusEnum.ACTIVE; if (serviceActive) { return false; } } return true; }
public String saveOrUpdate(ServiceInstance entity) { if (entity.isTransient()) { serviceInstanciation(entity); statusMessages.addFromResourceBundle("save.successful"); } else { getPersistenceService().update(entity); statusMessages.addFromResourceBundle("update.successful"); } return back(); }
public String serviceInstanciation(ServiceInstance serviceInstance) { log.info("serviceInstanciation serviceInstanceId:" + serviceInstance.getId()); try { serviceInstanceService.serviceInstanciation(serviceInstance, currentUser); } catch (BusinessException e) { e.printStackTrace(); statusMessages.add(e.getMessage()); } catch (Exception e) { e.printStackTrace(); statusMessages.add(e.getMessage()); } return null; }