// Update the wirings
Map<Resource, Wiring> auxwirings = result.getWirings();
for (Entry<Resource, Wiring> entry : auxwirings.entrySet()) {
Resource auxres = entry.getKey();
Resource envres = environment.getResource(auxres.getIdentity());
DefaultWiring envwiring = new DefaultWiring(envres, null, null);
Wiring auxwiring = entry.getValue();
for (Wire auxwire : auxwiring.getProvidedResourceWires(null)) {
Capability auxcap = auxwire.getCapability();
Capability envcap = findTargetCapability(auxcap);
Requirement auxreq = auxwire.getRequirement();
Requirement envreq = findTargetRequirement(auxreq);
envwiring.addProvidedWire(new DefaultWire(envreq, envcap));
}
for (Wire auxwire : auxwiring.getRequiredResourceWires(null)) {
Capability auxcap = auxwire.getCapability();
Capability envcap = findTargetCapability(auxcap);
Requirement auxreq = auxwire.getRequirement();
Requirement envreq = findTargetRequirement(auxreq);
envwiring.addRequiredWire(new DefaultWire(envreq, envcap));
}
AbstractEnvironment absenv = AbstractEnvironment.assertAbstractEnvironment(environment);
absenv.putWiring(envres, envwiring);
}