Beispiel #1
0
 private boolean isAllServiceInstancesTerminated(List<ServiceInstance> serviceInstances) {
   for (ServiceInstance service : serviceInstances) {
     boolean serviceActive = service.getStatus() == InstanceStatusEnum.ACTIVE;
     if (serviceActive) {
       return false;
     }
   }
   return true;
 }
Beispiel #2
0
  public String saveOrUpdate(ServiceInstance entity) {
    if (entity.isTransient()) {
      serviceInstanciation(entity);
      statusMessages.addFromResourceBundle("save.successful");
    } else {
      getPersistenceService().update(entity);
      statusMessages.addFromResourceBundle("update.successful");
    }

    return back();
  }
Beispiel #3
0
 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;
 }