X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fgraph%2Fcomponent%2FComponentGraph.java;fp=system%2Fgeneral%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fsystem%2Fgraph%2Fcomponent%2FComponentGraph.java;h=be861f309255da4deb64ed63cd12e63f15ab56da;hb=531559394b56b0dbf817d52c8c596216550a5cbb;hp=15f86557ab2a55dccdec85b2d8604d6b3bfcc07a;hpb=5ec164d27af4ca134b17380552038fb9ca6bc143;p=utils diff --git a/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java b/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java index 15f86557..be861f30 100644 --- a/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java +++ b/system/general/src/main/java/org/wamblee/system/graph/component/ComponentGraph.java @@ -29,10 +29,6 @@ import org.wamblee.system.graph.Edge; import org.wamblee.system.graph.Graph; import org.wamblee.system.graph.Node; - -// TODO info superfluous required interfaces -// TODO check optional external required but mandatory internal. - /** * Represents a component graph and provides the bridge from the * component model to a graph model. The graph model is easier @@ -46,7 +42,7 @@ public class ComponentGraph extends Graph { /** * Constructs an empty component graph. */ - public ComponentGraph() { + public ComponentGraph() { _restriction = new CompositeInterfaceRestriction(); } @@ -62,19 +58,21 @@ public class ComponentGraph extends Graph { * Adds an externally required interface of a container. * This should be called before any components of the container are * added. + * @param aComponent Component requiring the interface. * @param aInterface Required interface. */ - public void addRequiredInterface(RequiredInterface aInterface) { - addNode(new ExternalRequiredInterfaceNode(aInterface)); + public void addRequiredInterface(Component aComponent, RequiredInterface aInterface) { + addNode(new ExternalRequiredInterfaceNode(aComponent, aInterface)); } /** * Adds an externally provided interface of a container. - * This should be called after all components of the container have been added. + * This should be called after all components of the container have been added. + * @param aComponent Component providing the interface. * @param aInterface Provided interface. */ - public void addProvidedInterface(ProvidedInterface aInterface) { - addNode(new ExternalProvidedInterfaceNode(aInterface)); + public void addProvidedInterface(Component aComponent, ProvidedInterface aInterface) { + addNode(new ExternalProvidedInterfaceNode(aComponent, aInterface)); } /** @@ -84,7 +82,7 @@ public class ComponentGraph extends Graph { extend(new RequiredProvidedEdgeFactory()); accept(new ApplyRestrictionsVisitor(this, _restriction)); accept(new CheckRequiredProvidedMultiplicityVisitor(this)); - accept(new CheckExternallyRequiredVisitor()); + accept(new CheckExternallyRequiredVisitor(this)); accept(new CheckExternallyProvidedVisitor(this)); accept(new CheckStartupDependenciesVisitor(this)); }