private boolean isWireReinjection(LogicalReference logicalReference) { Multiplicity multiplicity = logicalReference.getDefinition().getMultiplicity(); if (multiplicity == Multiplicity.ZERO_N || multiplicity == Multiplicity.ONE_N) { for (LogicalWire wire : logicalReference.getWires()) { LogicalComponent<?> targetComponent = wire.getTarget().getParent(); // check the source and target sides since a target may have been added or removed if (wire.getState() == LogicalState.NEW || wire.getState() == LogicalState.MARKED || targetComponent.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.MARKED) { return true; } } } return false; }
private boolean isWireReinjection(LogicalReference logicalReference, boolean incremental) { Multiplicity multiplicity = logicalReference.getDefinition().getMultiplicity(); if (incremental && multiplicity == Multiplicity.ZERO_N || multiplicity == Multiplicity.ONE_N) { for (LogicalWire wire : logicalReference.getWires()) { LogicalComponent<?> targetComponent = wire.getTarget().getLeafComponent(); // check the source and target sides since a target may have been added or removed if (wire.getState() == LogicalState.NEW || wire.getState() == LogicalState.MARKED || targetComponent.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.MARKED) { return true; } } } return false; }
private boolean isWireReinjection(LogicalReference logicalReference) { Multiplicity multiplicity = logicalReference.getDefinition().getMultiplicity(); if (multiplicity == Multiplicity.ZERO_N || multiplicity == Multiplicity.ONE_N) { for (LogicalWire wire : logicalReference.getWires()) { LogicalComponent<?> targetComponent = wire.getTarget().getParent(); // check the source and target sides since a target may have been added or removed if (wire.getState() == LogicalState.NEW || wire.getState() == LogicalState.MARKED || targetComponent.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.MARKED) { return true; } } } return false; }
for (Iterator<LogicalWire> it = wires.getValue().iterator(); it.hasNext(); ) { LogicalWire wire = it.next(); if (MARKED == wire.getState()) { it.remove();
for (Iterator<LogicalWire> it = wires.getValue().iterator(); it.hasNext(); ) { LogicalWire wire = it.next(); if (MARKED == wire.getState()) { it.remove();
for (Iterator<LogicalWire> it = wires.getValue().iterator(); it.hasNext();) { LogicalWire wire = it.next(); if (LogicalState.MARKED == wire.getState()) { it.remove();
wires.stream().filter(wire -> NEW == wire.getState()).forEach(wire -> wire.setState(PROVISIONED));
wires.stream().filter(wire -> NEW == wire.getState()).forEach(wire -> wire.setState(PROVISIONED));
if (MARKED == wire.getState()) { continue;
if (MARKED == wire.getState()) { continue;
LogicalService service = wire.getTarget(); LogicalComponent<?> targetComponent = service.getLeafComponent(); if (!reinjection && (wire.getState() == LogicalState.PROVISIONED && targetComponent.getState() != LogicalState.MARKED && incremental)) { continue; if (targetComponent.getState() == LogicalState.MARKED || wire.getState() == LogicalState.MARKED) { attach = false; PhysicalWireDefinition pwd = wireGenerator.generateWire(wire); detachCommand.setPhysicalWireDefinition(pwd); command.add(detachCommand); } else if ((reinjection && targetComponent.getState() == LogicalState.NEW) || !incremental || wire.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.NEW) { PhysicalWireDefinition pwd = wireGenerator.generateWire(wire);
if (LogicalState.MARKED == wire.getState()) { continue;
LogicalService service = wire.getTarget(); LogicalComponent<?> targetComponent = service.getParent(); if (!reinjection && (wire.getState() == LogicalState.PROVISIONED && targetComponent.getState() != LogicalState.MARKED)) { continue; if (targetComponent.getState() == LogicalState.MARKED || wire.getState() == LogicalState.MARKED) { attach = false; PhysicalWire physicalWire; detachCommand.setPhysicalWireDefinition(physicalWire); command.add(detachCommand); } else if ((reinjection && targetComponent.getState() == LogicalState.NEW) || wire.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.NEW) { PhysicalWire physicalWire;
LogicalService service = wire.getTarget(); LogicalComponent<?> targetComponent = service.getParent(); if (!reinjection && (wire.getState() == LogicalState.PROVISIONED && targetComponent.getState() != LogicalState.MARKED)) { continue; if (targetComponent.getState() == LogicalState.MARKED || wire.getState() == LogicalState.MARKED) { attach = false; PhysicalWire physicalWire; detachCommand.setPhysicalWireDefinition(physicalWire); command.add(detachCommand); } else if ((reinjection && targetComponent.getState() == LogicalState.NEW) || wire.getState() == LogicalState.NEW || targetComponent.getState() == LogicalState.NEW) { PhysicalWire physicalWire;
if (LogicalState.NEW == wire.getState()) { wire.setState(LogicalState.PROVISIONED);