added explicit linking of required to externally required interfaces.
[utils] / system / general / src / main / java / org / wamblee / system / container / Container.java
index 59067f974f2835d6980078ab8b240a518e628d58..dc45dd7d0ef7e1f5d70fd7fecf3cc2abbe1dd4fb 100644 (file)
@@ -33,6 +33,7 @@ import org.wamblee.system.core.SystemAssemblyException;
 import org.wamblee.system.graph.CompositeEdgeFilter;
 import org.wamblee.system.graph.EdgeFilter;
 import org.wamblee.system.graph.component.ComponentGraph;
+import org.wamblee.system.graph.component.ConnectRequiredExternallyRequiredEdgeFilter;
 import org.wamblee.system.graph.component.ConnectRequiredProvidedEdgeFilter;
 import org.wamblee.system.graph.component.RequiredProvidedEdgeFactory;
 
@@ -113,11 +114,17 @@ public class Container extends AbstractComponent<Scope> {
         _edgeFilter.add(new ConnectRequiredProvidedEdgeFilter(aClientComponent, aRequiredInterface, aServerComponent, aProvidedInterface));
     }
     
+    /**
+     * Explicitly connects a externally required interface to an internally required interface. 
+     * @param aComponent Component requiring the interface (must be non-null). 
+     * @param aRequiredInterface Required interface of the component (must be non-null).
+     * @param aExternalRequiredInterface Externally required interface (must be non-null).
+     */
     public void connectExternalRequired(String aComponent, String aRequiredInterface, 
             String aExternalRequiredInterface) {
         checkSealed();
-        // TODO implement. 
-        throw new RuntimeException("not implemented");
+        _edgeFilter.add(new ConnectRequiredExternallyRequiredEdgeFilter(
+                aComponent, aRequiredInterface, aExternalRequiredInterface));
     }
     
     public void connectExternalProvided(String aExternalProvided, String aComponent, String aProvidedInterface) {