Exemplo n.º 1
0
 private boolean isAllServiceInstancesTerminated(List<ServiceInstance> serviceInstances) {
   for (ServiceInstance service : serviceInstances) {
     boolean serviceActive = service.getStatus() == InstanceStatusEnum.ACTIVE;
     if (serviceActive) {
       return false;
     }
   }
   return true;
 }
Exemplo n.º 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();
  }
Exemplo n.º 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;
 }