Commit 2f158643 authored by Christos Tranoris's avatar Christos Tranoris
Browse files

fix for #61

parent ba197b53
Loading
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
@@ -1133,7 +1133,10 @@ public class ServiceRepoService {

              ServiceStateType nextState =  aService.getState();
              List<Resource> rlist = new ArrayList<Resource>();
              rlist.add(res);
              
              for (ResourceRef rref : aService.getSupportingResource()) {
                if (!rref.getId().equals( res.getId())) {
                  Optional<Resource> result = resourceRepo.findByUuid(rref.getId());
                  if (result.isPresent()) {
                    rlist.add( result.get() );
@@ -1143,6 +1146,7 @@ public class ServiceRepoService {
                    }
                  }                  
                }
              }
              
              //copy characteristics, from resource to service

@@ -1180,7 +1184,7 @@ public class ServiceRepoService {
              CharCopyResult result = new CharCopyResult(supd, false);
              
              if ( nextState == ServiceStateType.ACTIVE) {
                if ( !aService.equals(nextState) && nextState == ServiceStateType.ACTIVE) {
                if ( !aService.getState().equals(nextState) && nextState == ServiceStateType.ACTIVE) {
                  result = copyCharacteristicsFromAllResources(aService, supd, rlist);                  
                } else {
                  result = copyCharacteristicsFromResource(aService, supd, res);
+9 −6
Original line number Diff line number Diff line
@@ -884,15 +884,18 @@ public class ServiceOrderRepoService {
		if (depth>10) {
			return result;
		}

		
		
		for (ServiceRef specRel : soiOrigin.getService().getSupportingService() ) {
			if ( !soiOrigin.getService().getName().equals( specRel.getName()) ) {
				result += "\""+ soiOrigin.getService().getId() + "\""+ " -> " + "\""+ specRel.getId() +"\" "+";\r\n";
			//if ( !soiOrigin.getService().getName().equals( specRel.getName()) ) {
				//result += "\""+ soiOrigin.getService().getId() + "\""+ " -> " + "\""+ specRel.getId() +"\" "+";\r\n";
				result += "\""+ specRel.getId() + "\""+ " [label =\""+ specRel.getName() +"\", color = \"#2596be\"]; \r\n";
				org.etsi.osl.tmf.sim638.model.Service aService= serviceRepoService.findByUuid( specRel.getId() );
				if ( aService!= null) {
					result += getServiceGraphNotation( aService,0 );				
				}
			}
			//}
			
		}

@@ -902,7 +905,7 @@ public class ServiceOrderRepoService {
			
		}
		
		result += "\""+ soiOrigin.getService().getId() + "\""+ " [label = \""+ soiOrigin.getService().getName() +"\", color = \"#2596be\"]; \r\n";
		//result += "\""+ soiOrigin.getService().getId() + "\""+ " [label = \"Order "+ soiOrigin.getService().getName() +"\", color = \"#259600\"]; \r\n";
		return result;
	}