tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r411356 [5/6] - in /incubator/tuscany/sandbox/jboynes/sca: commands/launcher/ containers/container.groovy/src/main/java/org/apache/tuscany/container/extension/loader/ containers/container.groovy/src/main/java/org/apache/tuscany/container/gr...
Date Sat, 03 Jun 2006 02:25:09 GMT
Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/AutowireBuilderTestcase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/AutowireBuilderTestcase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/AutowireBuilderTestcase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/AutowireBuilderTestcase.java Fri Jun  2 19:25:01 2006
@@ -12,14 +12,14 @@
 import org.apache.tuscany.core.mock.component.Target;
 import org.apache.tuscany.core.system.builder.SystemBindingBuilder;
 import org.apache.tuscany.core.system.builder.SystemComponentBuilder;
-import org.apache.tuscany.core.system.context.SystemCompositeContext;
-import org.apache.tuscany.core.system.context.SystemCompositeContextImpl;
+import org.apache.tuscany.core.system.context.SystemCompositeComponent;
+import org.apache.tuscany.core.system.context.SystemCompositeComponentImpl;
 import org.apache.tuscany.core.system.model.SystemBinding;
 import org.apache.tuscany.core.system.model.SystemImplementation;
-import org.apache.tuscany.spi.model.BoundReference;
-import org.apache.tuscany.spi.model.Component;
-import org.apache.tuscany.spi.context.AtomicContext;
-import org.apache.tuscany.spi.context.ReferenceContext;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.ComponentDefinition;
+import org.apache.tuscany.spi.context.AtomicComponent;
+import org.apache.tuscany.spi.context.Reference;
 import org.apache.tuscany.spi.context.ScopeContext;
 import org.apache.tuscany.spi.context.WorkContext;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
@@ -45,33 +45,33 @@
         SystemComponentBuilder componentBuilder = new SystemComponentBuilder();
         SystemBindingBuilder bindingBuilder = new SystemBindingBuilder();
 
-        SystemCompositeContext grandParent = new SystemCompositeContextImpl("grandparent", null, null);
-        SystemCompositeContext parent = new SystemCompositeContextImpl("parent", grandParent, grandParent);
+        SystemCompositeComponent grandParent = new SystemCompositeComponentImpl("grandparent", null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl("parent", grandParent, grandParent);
 
-        Component<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
-        AtomicContext targetComponentContext = (AtomicContext) componentBuilder.build(parent, targetComponent, deploymentContext);
-        grandParent.registerContext(targetComponentContext);
+        ComponentDefinition<SystemImplementation> targetComponentDefinition = MockComponentFactory.createTarget();
+        AtomicComponent targetComponentComponent = (AtomicComponent) componentBuilder.build(parent, targetComponentDefinition, deploymentContext);
+        grandParent.register(targetComponentComponent);
 
-        BoundReference<SystemBinding> targetReference = MockComponentFactory.createBoundReference();
-        Component<SystemImplementation> sourceComponent = MockComponentFactory.createSourceWithTargetReference();
+        BoundReferenceDefinition<SystemBinding> targetReferenceDefinition = MockComponentFactory.createBoundReference();
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = MockComponentFactory.createSourceWithTargetReference();
 
 
-        AtomicContext<?> sourceContext = (AtomicContext) componentBuilder.build(parent, sourceComponent, deploymentContext);
-        parent.registerContext(sourceContext);
+        AtomicComponent<?> sourceComponent = (AtomicComponent) componentBuilder.build(parent, sourceComponentDefinition, deploymentContext);
+        parent.register(sourceComponent);
 
-        ReferenceContext targetContext = (ReferenceContext) bindingBuilder.build(parent, targetReference, deploymentContext);
-        parent.registerContext(targetContext);
+        Reference reference = (Reference) bindingBuilder.build(parent, targetReferenceDefinition, deploymentContext);
+        parent.register(reference);
 
-        connector.connect(sourceContext);
+        connector.connect(sourceComponent);
 
         grandParent.start();
         scope.onEvent(new ModuleStart(this, parent));
-        Source source = (Source) parent.getContext("source").getService();
+        Source source = (Source) parent.getChild("source").getService();
         assertNotNull(source);
-        Target target = (Target) parent.getContext("target").getService();
+        Target target = (Target) parent.getChild("target").getService();
         assertNotNull(target);
         assertSame(target, source.getTarget());
-        assertSame(target, grandParent.getContext("target").getService());
+        assertSame(target, grandParent.getChild("target").getService());
         scope.onEvent(new ModuleStop(this, parent));
         grandParent.stop();
         scope.stop();
@@ -88,21 +88,21 @@
 
         SystemComponentBuilder componentBuilder = new SystemComponentBuilder();
 
-        SystemCompositeContext parent = new SystemCompositeContextImpl(null, null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl(null, null, null);
 
-        Component<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
-        AtomicContext targetComponentContext = (AtomicContext) componentBuilder.build(parent, targetComponent, deploymentContext);
-        parent.registerContext(targetComponentContext);
-        Component<SystemImplementation> sourceComponent = MockComponentFactory.createSourceWithTargetAutowire();
+        ComponentDefinition<SystemImplementation> targetComponentDefinition = MockComponentFactory.createTarget();
+        AtomicComponent targetComponentComponent = (AtomicComponent) componentBuilder.build(parent, targetComponentDefinition, deploymentContext);
+        parent.register(targetComponentComponent);
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = MockComponentFactory.createSourceWithTargetAutowire();
 
-        AtomicContext sourceContext = (AtomicContext) componentBuilder.build(parent, sourceComponent, deploymentContext);
-        parent.registerContext(sourceContext);
+        AtomicComponent sourceComponent = (AtomicComponent) componentBuilder.build(parent, sourceComponentDefinition, deploymentContext);
+        parent.register(sourceComponent);
 
         parent.start();
         scope.onEvent(new ModuleStart(this, parent));
-        Source source = (Source) parent.getContext("source").getService();
+        Source source = (Source) parent.getChild("source").getService();
         assertNotNull(source);
-        Target target = (Target) parent.getContext("target").getService();
+        Target target = (Target) parent.getChild("target").getService();
         assertNotNull(target);
         assertSame(target, source.getTarget());
         scope.onEvent(new ModuleStop(this, parent));

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/SystemBuildersTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/SystemBuildersTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/SystemBuildersTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/integration/system/builder/SystemBuildersTestCase.java Fri Jun  2 19:25:01 2006
@@ -12,19 +12,19 @@
 import org.apache.tuscany.core.mock.factories.MockComponentFactory;
 import org.apache.tuscany.core.system.builder.SystemBindingBuilder;
 import org.apache.tuscany.core.system.builder.SystemComponentBuilder;
-import org.apache.tuscany.core.system.context.SystemCompositeContext;
-import org.apache.tuscany.core.system.context.SystemCompositeContextImpl;
+import org.apache.tuscany.core.system.context.SystemCompositeComponent;
+import org.apache.tuscany.core.system.context.SystemCompositeComponentImpl;
 import org.apache.tuscany.core.system.model.SystemBinding;
 import org.apache.tuscany.core.system.model.SystemImplementation;
-import org.apache.tuscany.spi.context.AtomicContext;
-import org.apache.tuscany.spi.context.ReferenceContext;
+import org.apache.tuscany.spi.context.AtomicComponent;
+import org.apache.tuscany.spi.context.Reference;
 import org.apache.tuscany.spi.context.ScopeContext;
-import org.apache.tuscany.spi.context.ServiceContext;
+import org.apache.tuscany.spi.context.Service;
 import org.apache.tuscany.spi.context.WorkContext;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
-import org.apache.tuscany.spi.model.BoundReference;
-import org.apache.tuscany.spi.model.BoundService;
-import org.apache.tuscany.spi.model.Component;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
+import org.apache.tuscany.spi.model.ComponentDefinition;
 
 /**
  * Validates that system builders and the default connector create properly wired contexts
@@ -45,24 +45,24 @@
         Connector connector = new ConnectorImpl();
         SystemComponentBuilder builder = new SystemComponentBuilder();
 
-        SystemCompositeContext parent = new SystemCompositeContextImpl(null, null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl(null, null, null);
 
-        Component<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
-        Component<SystemImplementation> sourceComponent = MockComponentFactory.createSourceWithTargetReference();
+        ComponentDefinition<SystemImplementation> targetComponentDefinition = MockComponentFactory.createTarget();
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = MockComponentFactory.createSourceWithTargetReference();
 
-        AtomicContext<?> sourceContext = (AtomicContext) builder.build(parent, sourceComponent, deploymentContext);
-        AtomicContext<?> targetContext = (AtomicContext) builder.build(parent, targetComponent, deploymentContext);
+        AtomicComponent<?> sourceComponent = (AtomicComponent) builder.build(parent, sourceComponentDefinition, deploymentContext);
+        AtomicComponent<?> targetComponent = (AtomicComponent) builder.build(parent, targetComponentDefinition, deploymentContext);
 
-        parent.registerContext(sourceContext);
-        parent.registerContext(targetContext);
+        parent.register(sourceComponent);
+        parent.register(targetComponent);
 
-        connector.connect(sourceContext);
-        connector.connect(targetContext);
+        connector.connect(sourceComponent);
+        connector.connect(targetComponent);
         parent.start();
         scope.onEvent(new ModuleStart(this, parent));
-        Source source = (Source) parent.getContext("source").getService();
+        Source source = (Source) parent.getChild("source").getService();
         assertNotNull(source);
-        Target target = (Target) parent.getContext("target").getService();
+        Target target = (Target) parent.getChild("target").getService();
         assertNotNull(target);
         assertSame(target, source.getTarget());
         scope.onEvent(new ModuleStop(this, parent));
@@ -82,30 +82,30 @@
         SystemComponentBuilder builder = new SystemComponentBuilder();
         SystemBindingBuilder bindingBuilder = new SystemBindingBuilder();
 
-        SystemCompositeContext grandParent = new SystemCompositeContextImpl("grandparent", null, null);
-        SystemCompositeContext parent = new SystemCompositeContextImpl("parent", grandParent, grandParent);
+        SystemCompositeComponent grandParent = new SystemCompositeComponentImpl("grandparent", null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl("parent", grandParent, grandParent);
 
         // create a context in the grandparent that the reference will be autowired to
-        Component<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
-        AtomicContext targetComponentContext = (AtomicContext) builder.build(parent, targetComponent, deploymentContext);
-        grandParent.registerContext(targetComponentContext);
-
-        BoundReference<SystemBinding> targetReference = MockComponentFactory.createBoundReference();
-        Component<SystemImplementation> sourceComponent = MockComponentFactory.createSourceWithTargetReference();
-
-        AtomicContext<?> sourceContext = (AtomicContext) builder.build(parent, sourceComponent, deploymentContext);
-        ReferenceContext targetContext = (ReferenceContext) bindingBuilder.build(parent, targetReference, deploymentContext);
-
-        parent.registerContext(sourceContext);
-        parent.registerContext(targetContext);
-        connector.connect(targetContext.getInboundWire(), targetContext.getOutboundWire(), true);
-        connector.connect(sourceContext);
-        grandParent.registerContext(parent);
+        ComponentDefinition<SystemImplementation> targetComponentDefinition = MockComponentFactory.createTarget();
+        AtomicComponent targetComponentComponent = (AtomicComponent) builder.build(parent, targetComponentDefinition, deploymentContext);
+        grandParent.register(targetComponentComponent);
+
+        BoundReferenceDefinition<SystemBinding> targetReferenceDefinition = MockComponentFactory.createBoundReference();
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = MockComponentFactory.createSourceWithTargetReference();
+
+        AtomicComponent<?> sourceComponent = (AtomicComponent) builder.build(parent, sourceComponentDefinition, deploymentContext);
+        Reference reference = (Reference) bindingBuilder.build(parent, targetReferenceDefinition, deploymentContext);
+
+        parent.register(sourceComponent);
+        parent.register(reference);
+        connector.connect(reference.getInboundWire(), reference.getOutboundWire(), true);
+        connector.connect(sourceComponent);
+        grandParent.register(parent);
         grandParent.start();
         scope.onEvent(new ModuleStart(this, parent));
-        Source source = (Source) parent.getContext("source").getService();
+        Source source = (Source) parent.getChild("source").getService();
         assertNotNull(source);
-        Target target = (Target) parent.getContext("target").getService();
+        Target target = (Target) parent.getChild("target").getService();
         assertNotNull(target);
         assertSame(target, source.getTarget());
         scope.onEvent(new ModuleStop(this, parent));
@@ -127,26 +127,26 @@
         SystemComponentBuilder builder = new SystemComponentBuilder();
         SystemBindingBuilder bindingBuilder = new SystemBindingBuilder();
 
-        SystemCompositeContext parent = new SystemCompositeContextImpl(null, null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl(null, null, null);
 
-        BoundService<SystemBinding> service = MockComponentFactory.createBoundService();
-        Component<SystemImplementation> component = MockComponentFactory.createTarget();
+        BoundServiceDefinition<SystemBinding> serviceDefinition = MockComponentFactory.createBoundService();
+        ComponentDefinition<SystemImplementation> componentDefinition = MockComponentFactory.createTarget();
 
-        AtomicContext sourceContext = (AtomicContext) builder.build(parent, component, deploymentContext);
-        ServiceContext serviceContext = (ServiceContext) bindingBuilder.build(parent, service, deploymentContext);
+        AtomicComponent sourceComponent = (AtomicComponent) builder.build(parent, componentDefinition, deploymentContext);
+        Service service = (Service) bindingBuilder.build(parent, serviceDefinition, deploymentContext);
 
-        connector.connect(serviceContext.getInboundWire(), serviceContext.getOutboundWire(), true);
-        parent.registerContext(sourceContext);
-        parent.registerContext(serviceContext);
+        connector.connect(service.getInboundWire(), service.getOutboundWire(), true);
+        parent.register(sourceComponent);
+        parent.register(service);
 
-        connector.connect(sourceContext);
-        String serviceName = serviceContext.getOutboundWire().getTargetName().getPortName();
-        connector.connect(serviceContext.getOutboundWire(), sourceContext.getInboundWire(serviceName), parent, true);
+        connector.connect(sourceComponent);
+        String serviceName = service.getOutboundWire().getTargetName().getPortName();
+        connector.connect(service.getOutboundWire(), sourceComponent.getInboundWire(serviceName), parent, true);
         parent.start();
         scope.onEvent(new ModuleStart(this, parent));
-        Target target = (Target) parent.getContext("service").getService();
+        Target target = (Target) parent.getChild("serviceDefinition").getService();
         assertNotNull(target);
-        Target target2 = (Target) parent.getContext("target").getService();
+        Target target2 = (Target) parent.getChild("target").getService();
         assertNotNull(target);
         assertSame(target, target2);
         scope.onEvent(new ModuleStop(this, parent));
@@ -168,19 +168,19 @@
 //        SystemComponentBuilder builder = new SystemComponentBuilder();
 //        SystemBindingBuilder bindingBuilder = new SystemBindingBuilder();
 //
-//        SystemCompositeContext grandParent = new SystemCompositeContextImpl("grandparent", null, null);
-//        SystemCompositeContext parent = new SystemCompositeContextImpl("parent", grandParent, grandParent);
+//        SystemCompositeComponent grandParent = new SystemCompositeComponentImpl("grandparent", null, null);
+//        SystemCompositeComponent parent = new SystemCompositeComponentImpl("parent", grandParent, grandParent);
 //
 //        // create a context in the grandparent that the reference will be autowired to
-//        Component<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
-//        AtomicContext targetComponentContext = (AtomicContext) builder.build(parent, targetComponent, deploymentContext);
+//        ComponentDefinition<SystemImplementation> targetComponent = MockComponentFactory.createTarget();
+//        AtomicComponent targetComponentContext = (AtomicComponent) builder.build(parent, targetComponent, deploymentContext);
 //        grandParent.registerContext(targetComponentContext);
 //
-//        BoundReference<SystemBinding> reference = MockComponentFactory.createBoundReference();
-//        BoundService<SystemBinding> service = MockComponentFactory.createBoundService();
+//        BoundReferenceDefinition<SystemBinding> reference = MockComponentFactory.createBoundReference();
+//        BoundServiceDefinition<SystemBinding> service = MockComponentFactory.createBoundService();
 //
-//        ReferenceContext referenceContext = (ReferenceContext) bindingBuilder.build(parent, reference, deploymentContext);
-//        ServiceContext serviceContext = (ServiceContext) bindingBuilder.build(parent, service, deploymentContext);
+//        Reference referenceContext = (Reference) bindingBuilder.build(parent, reference, deploymentContext);
+//        Service serviceContext = (Service) bindingBuilder.build(parent, service, deploymentContext);
 //
 //        parent.registerContext(referenceContext);
 //        parent.registerContext(serviceContext);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/loader/ServiceLoaderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/loader/ServiceLoaderTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/loader/ServiceLoaderTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/loader/ServiceLoaderTestCase.java Fri Jun  2 19:25:01 2006
@@ -21,7 +21,7 @@
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
-import org.apache.tuscany.spi.model.Service;
+import org.apache.tuscany.spi.model.ServiceDefinition;
 import org.apache.tuscany.spi.model.ServiceContract;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.loader.LoaderException;
@@ -40,26 +40,26 @@
     private Mock mockRegistry;
 
     public void testWithNoInterface() throws LoaderException, XMLStreamException {
-        String name = "service";
+        String name = "serviceDefinition";
         mockReader.expects(once()).method("getName").will(returnValue(AssemblyConstants.SERVICE));
         mockReader.expects(once()).method("getAttributeValue").with(NULL, eq("name")).will(returnValue(name));
         mockReader.expects(once()).method("next").will(returnValue(END_ELEMENT));
-        Service service = loader.load((XMLStreamReader) mockReader.proxy(), null);
-        assertNotNull(service);
-        assertEquals(name, service.getName());
+        ServiceDefinition serviceDefinition = loader.load((XMLStreamReader) mockReader.proxy(), null);
+        assertNotNull(serviceDefinition);
+        assertEquals(name, serviceDefinition.getName());
     }
 
     public void testWithInterface() throws LoaderException, XMLStreamException {
-        String name = "service";
+        String name = "serviceDefinition";
         ServiceContract sc = new ServiceContract(){};
         mockReader.expects(once()).method("getName").will(returnValue(AssemblyConstants.SERVICE));
         mockReader.expects(once()).method("getAttributeValue").with(NULL, eq("name")).will(returnValue(name));
         mockReader.expects(atLeastOnce()).method("next").will(onConsecutiveCalls(returnValue(START_ELEMENT), returnValue(END_ELEMENT)));
         mockRegistry.expects(once()).method("load").with(eq(mockReader.proxy()), eq(deploymentContext)).will(returnValue(sc));
-        Service service = loader.load((XMLStreamReader) mockReader.proxy(), deploymentContext);
-        assertNotNull(service);
-        assertEquals(name, service.getName());
-        assertSame(sc, service.getServiceContract());
+        ServiceDefinition serviceDefinition = loader.load((XMLStreamReader) mockReader.proxy(), deploymentContext);
+        assertNotNull(serviceDefinition);
+        assertEquals(name, serviceDefinition.getName());
+        assertSame(sc, serviceDefinition.getServiceContract());
     }
 
     protected void setUp() throws Exception {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockComponentFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockComponentFactory.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockComponentFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockComponentFactory.java Fri Jun  2 19:25:01 2006
@@ -9,14 +9,14 @@
 import org.apache.tuscany.core.model.PojoComponentType;
 import org.apache.tuscany.core.system.model.SystemBinding;
 import org.apache.tuscany.core.system.model.SystemImplementation;
-import org.apache.tuscany.spi.model.BoundReference;
-import org.apache.tuscany.spi.model.BoundService;
-import org.apache.tuscany.spi.model.Component;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
+import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.JavaServiceContract;
-import org.apache.tuscany.spi.model.Reference;
+import org.apache.tuscany.spi.model.ReferenceDefinition;
 import org.apache.tuscany.spi.model.ReferenceTarget;
 import org.apache.tuscany.spi.model.Scope;
-import org.apache.tuscany.spi.model.Service;
+import org.apache.tuscany.spi.model.ServiceDefinition;
 import org.apache.tuscany.spi.model.ServiceContract;
 
 /**
@@ -27,16 +27,16 @@
     /**
      * Creates a component named "source" with a reference to target/Target
      */
-    public static Component<SystemImplementation> createSourceWithTargetReference() {
+    public static ComponentDefinition<SystemImplementation> createSourceWithTargetReference() {
         SystemImplementation impl = new SystemImplementation();
         PojoComponentType componentType = new PojoComponentType();
         componentType.setLifecycleScope(Scope.MODULE);
-        Reference reference = new Reference();
-        reference.setName("target");
+        ReferenceDefinition referenceDefinition = new ReferenceDefinition();
+        referenceDefinition.setName("target");
         ServiceContract contract = new JavaServiceContract();
         contract.setInterfaceClass(Target.class);
-        reference.setServiceContract(contract);
-        componentType.add(reference);
+        referenceDefinition.setServiceContract(contract);
+        componentType.add(referenceDefinition);
         try {
             componentType.addReferenceMember("target", SourceImpl.class.getMethod("setTarget", Target.class));
         } catch (NoSuchMethodException e) {
@@ -44,35 +44,35 @@
         }
         impl.setComponentType(componentType);
         impl.setImplementationClass(SourceImpl.class);
-        Component<SystemImplementation> sourceComponent = new Component<SystemImplementation>(impl);
-        sourceComponent.setName("source");
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = new ComponentDefinition<SystemImplementation>(impl);
+        sourceComponentDefinition.setName("source");
 
         ReferenceTarget referenceTarget = new ReferenceTarget();
-        referenceTarget.setReference(reference);
+        referenceTarget.setReference(referenceDefinition);
         referenceTarget.setReferenceName("target");
         try {
             referenceTarget.addTarget(new URI("target/Target"));
         } catch (URISyntaxException e) {
             throw new AssertionError(e);
         }
-        sourceComponent.add(referenceTarget);
-        return sourceComponent;
+        sourceComponentDefinition.add(referenceTarget);
+        return sourceComponentDefinition;
     }
 
     /**
      * Creates a component named "source" with an autowire reference to {@link Target}
      */
-    public static Component<SystemImplementation> createSourceWithTargetAutowire() {
+    public static ComponentDefinition<SystemImplementation> createSourceWithTargetAutowire() {
         SystemImplementation impl = new SystemImplementation();
         PojoComponentType componentType = new PojoComponentType();
         componentType.setLifecycleScope(Scope.MODULE);
-        Reference reference = new Reference();
-        reference.setName("target");
-        reference.setAutowire(true);
+        ReferenceDefinition referenceDefinition = new ReferenceDefinition();
+        referenceDefinition.setName("target");
+        referenceDefinition.setAutowire(true);
         ServiceContract contract = new JavaServiceContract();
         contract.setInterfaceClass(Target.class);
-        reference.setServiceContract(contract);
-        componentType.add(reference);
+        referenceDefinition.setServiceContract(contract);
+        componentType.add(referenceDefinition);
         try {
             componentType.addReferenceMember("target", SourceImpl.class.getMethod("setTarget", Target.class));
         } catch (NoSuchMethodException e) {
@@ -80,66 +80,66 @@
         }
         impl.setComponentType(componentType);
         impl.setImplementationClass(SourceImpl.class);
-        Component<SystemImplementation> sourceComponent = new Component<SystemImplementation>(impl);
-        sourceComponent.setName("source");
+        ComponentDefinition<SystemImplementation> sourceComponentDefinition = new ComponentDefinition<SystemImplementation>(impl);
+        sourceComponentDefinition.setName("source");
 
         ReferenceTarget referenceTarget = new ReferenceTarget();
-        referenceTarget.setReference(reference);
+        referenceTarget.setReference(referenceDefinition);
         referenceTarget.setReferenceName("target");
-        sourceComponent.add(referenceTarget);
-        return sourceComponent;
+        sourceComponentDefinition.add(referenceTarget);
+        return sourceComponentDefinition;
     }
 
     /**
      * Creates a component named "target" with a service named "Target"
      */
-    public static Component<SystemImplementation> createTarget() {
+    public static ComponentDefinition<SystemImplementation> createTarget() {
         SystemImplementation impl = new SystemImplementation();
         PojoComponentType componentType = new PojoComponentType();
         componentType.setLifecycleScope(Scope.MODULE);
-        Service targetService = new Service();
-        targetService.setName("Target");
+        ServiceDefinition targetServiceDefinition = new ServiceDefinition();
+        targetServiceDefinition.setName("Target");
         ServiceContract contract = new JavaServiceContract();
         contract.setInterfaceClass(Target.class);
-        targetService.setServiceContract(contract);
-        componentType.add(targetService);
+        targetServiceDefinition.setServiceContract(contract);
+        componentType.add(targetServiceDefinition);
         impl.setComponentType(componentType);
         impl.setImplementationClass(TargetImpl.class);
-        Component<SystemImplementation> targetComponent = new Component<SystemImplementation>(impl);
-        targetComponent.setName("target");
-        return targetComponent;
+        ComponentDefinition<SystemImplementation> targetComponentDefinition = new ComponentDefinition<SystemImplementation>(impl);
+        targetComponentDefinition.setName("target");
+        return targetComponentDefinition;
     }
 
 
-    public static BoundReference<SystemBinding> createBoundReference() {
+    public static BoundReferenceDefinition<SystemBinding> createBoundReference() {
         SystemBinding binding = new SystemBinding();
-        BoundReference<SystemBinding> reference = new BoundReference<SystemBinding>();
-        reference.setBinding(binding);
-        reference.setName("target");
+        BoundReferenceDefinition<SystemBinding> referenceDefinition = new BoundReferenceDefinition<SystemBinding>();
+        referenceDefinition.setBinding(binding);
+        referenceDefinition.setName("target");
         ServiceContract contract = new JavaServiceContract();
         contract.setInterfaceClass(Target.class);
-        reference.setServiceContract(contract);
-        return reference;
+        referenceDefinition.setServiceContract(contract);
+        return referenceDefinition;
     }
 
     /**
      * Creates a bound service with the name "service" that is configured to be wired to a target named
      * "target/Target"
      */
-    public static BoundService<SystemBinding> createBoundService() {
+    public static BoundServiceDefinition<SystemBinding> createBoundService() {
         SystemBinding binding = new SystemBinding();
-        BoundService<SystemBinding> service = new BoundService<SystemBinding>();
-        service.setBinding(binding);
-        service.setName("service");
+        BoundServiceDefinition<SystemBinding> serviceDefinition = new BoundServiceDefinition<SystemBinding>();
+        serviceDefinition.setBinding(binding);
+        serviceDefinition.setName("serviceDefinition");
         ServiceContract contract = new JavaServiceContract();
         contract.setInterfaceClass(Target.class);
-        service.setServiceContract(contract);
+        serviceDefinition.setServiceContract(contract);
         try {
-            service.setTarget(new URI("target/Target"));
+            serviceDefinition.setTarget(new URI("target/Target"));
         } catch (URISyntaxException e) {
             throw new AssertionError(e);
         }
-        return service;
+        return serviceDefinition;
     }
 
 

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockContextFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockContextFactory.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockContextFactory.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/mock/factories/MockContextFactory.java Fri Jun  2 19:25:01 2006
@@ -12,8 +12,8 @@
 import org.apache.tuscany.core.injection.Injector;
 import org.apache.tuscany.core.injection.MethodEventInvoker;
 import org.apache.tuscany.core.injection.PojoObjectFactory;
-import org.apache.tuscany.core.system.context.SystemAtomicContext;
-import org.apache.tuscany.core.system.context.SystemAtomicContextImpl;
+import org.apache.tuscany.core.system.context.SystemAtomicComponent;
+import org.apache.tuscany.core.system.context.SystemAtomicComponentImpl;
 import org.apache.tuscany.core.system.wire.SystemInboundWireImpl;
 import org.apache.tuscany.core.system.wire.SystemOutboundWireImpl;
 import org.apache.tuscany.core.system.wire.SystemOutboundWire;
@@ -23,7 +23,7 @@
 import org.apache.tuscany.core.wire.InvokerInterceptor;
 import org.apache.tuscany.spi.ObjectFactory;
 import org.apache.tuscany.spi.QualifiedName;
-import org.apache.tuscany.spi.context.AtomicContext;
+import org.apache.tuscany.spi.context.AtomicComponent;
 import org.apache.tuscany.spi.context.ScopeContext;
 import org.apache.tuscany.spi.wire.InboundInvocationChain;
 import org.apache.tuscany.spi.wire.InboundWire;
@@ -38,7 +38,7 @@
     private MockContextFactory() {
     }
 
-    public static Map<String, AtomicContext> createWiredContexts(String source, Class<?> sourceClass, ScopeContext sourceScopeCtx,
+    public static Map<String, AtomicComponent> createWiredContexts(String source, Class<?> sourceClass, ScopeContext sourceScopeCtx,
                                                                  String target, Class<?> targetClass, ScopeContext targetScopeCtx) throws NoSuchMethodException {
         List<Class<?>> sourceClasses = new ArrayList<Class<?>>();
         sourceClasses.add(sourceClass);
@@ -46,13 +46,13 @@
     }
 
     /**
-     * Creates source and target {@link AtomicContext}s whose instances are wired together. The wiring
+     * Creates source and target {@link AtomicComponent}s whose instances are wired together. The wiring
      * algorithm searches for the first method on the source with a single parameter type matching an
      * interface implemented by the target.
      *
      * @throws NoSuchMethodException
      */
-    public static Map<String, AtomicContext> createWiredContexts(String source,
+    public static Map<String, AtomicComponent> createWiredContexts(String source,
                                                                  List<Class<?>> sourceInterfaces,
                                                                  Class<?> sourceClass,
                                                                  ScopeContext sourceScopeCtx,
@@ -60,8 +60,8 @@
                                                                  Class<?> targetClass,
                                                                  ScopeContext targetScopeCtx) throws NoSuchMethodException {
 
-        Map<String, AtomicContext> contexts = new HashMap<String, AtomicContext>();
-        SystemAtomicContext targetCtx = createSystemAtomicContext(target, targetScopeCtx, targetClass);//, targetEager, targetInitInvoker, targetDestroyInvoker, null);
+        Map<String, AtomicComponent> contexts = new HashMap<String, AtomicComponent>();
+        SystemAtomicComponent targetCtx = createSystemAtomicContext(target, targetScopeCtx, targetClass);//, targetEager, targetInitInvoker, targetDestroyInvoker, null);
 
         //create target wire
         Method[] sourceMethods = sourceClass.getMethods();
@@ -86,7 +86,7 @@
 
         Map<String, Member> members = new HashMap<String, Member>();
         members.put(setter.getName(), setter);
-        SystemAtomicContext sourceCtx = createSystemAtomicContext(source, sourceScopeCtx, sourceInterfaces, sourceClass, null, members);//, sourceEager, sourceInitInvoker, sourceDestroyInvoker, injectors);
+        SystemAtomicComponent sourceCtx = createSystemAtomicContext(source, sourceScopeCtx, sourceInterfaces, sourceClass, null, members);//, sourceEager, sourceInitInvoker, sourceDestroyInvoker, injectors);
         QualifiedName targetName = new QualifiedName(target);
         SystemOutboundWire wire = new SystemOutboundWireImpl(setter.getName(), targetName, targetClass);
         InboundWire inboundWire = new SystemInboundWireImpl(targetName.getPortName(), targetClass, targetCtx);
@@ -98,17 +98,17 @@
         return contexts;
     }
 
-    public static SystemAtomicContext createSystemAtomicContext(String name, ScopeContext scopeContext, Class<?> clazz) throws NoSuchMethodException {
+    public static SystemAtomicComponent createSystemAtomicContext(String name, ScopeContext scopeContext, Class<?> clazz) throws NoSuchMethodException {
         List<Class<?>> serviceInterfaces = new ArrayList<Class<?>>();
         serviceInterfaces.add(clazz);
         return createSystemAtomicContext(name, scopeContext, serviceInterfaces, clazz);
     }
 
-    public static SystemAtomicContext createSystemAtomicContext(String name, ScopeContext scopeContext, List<Class<?>> interfaces, Class<?> clazz) throws NoSuchMethodException {
+    public static SystemAtomicComponent createSystemAtomicContext(String name, ScopeContext scopeContext, List<Class<?>> interfaces, Class<?> clazz) throws NoSuchMethodException {
         return createSystemAtomicContext(name, scopeContext, interfaces, clazz, null, null);
     }
 
-    public static SystemAtomicContext createSystemAtomicContext(String name,
+    public static SystemAtomicComponent createSystemAtomicContext(String name,
                                                                 ScopeContext scopeContext,
                                                                 List<Class<?>> serviceInterfaces,
                                                                 Class<?> clazz,
@@ -142,7 +142,7 @@
      * @param injectors
      * @throws NoSuchMethodException
      */
-    public static SystemAtomicContextImpl createSystemAtomicContext(String name,
+    public static SystemAtomicComponentImpl createSystemAtomicContext(String name,
                                                                     ScopeContext scopeContext,
                                                                     List<Class<?>> serviceInterfaces,
                                                                     Class<?> clazz,
@@ -151,7 +151,7 @@
                                                                     EventInvoker<Object> destroyInvoker,
                                                                     List<Injector> injectors,
                                                                     Map<String, Member> members) throws NoSuchMethodException {
-        return new SystemAtomicContextImpl(name, null, scopeContext, serviceInterfaces, createObjectFactory(clazz), eagerInit, initInvoker, destroyInvoker, injectors, members);
+        return new SystemAtomicComponentImpl(name, null, scopeContext, serviceInterfaces, createObjectFactory(clazz), eagerInit, initInvoker, destroyInvoker, injectors, members);
     }
 
     public static <T> InboundWire<T> createTargetWireFactory(String serviceName, Class<T> interfaze) {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/AutowireTestCase.java Fri Jun  2 19:25:01 2006
@@ -19,19 +19,19 @@
      * @throws Exception
      */
     public void testAtomicAutowire() throws Exception {
-        SystemCompositeContext<?> parent = new SystemCompositeContextImpl("parent", null, null);
+        SystemCompositeComponent<?> parent = new SystemCompositeComponentImpl("parent", null, null);
         parent.start();
 
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
         interfaces.add(Source2.class);
         Source originalSource = new SourceImpl();
-        Mock mock = mock(SystemAtomicContext.class);
+        Mock mock = mock(SystemAtomicComponent.class);
         mock.stubs().method("getName").will(returnValue("source"));
         mock.stubs().method("getService").will(returnValue(originalSource));
         mock.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context = (SystemAtomicContext) mock.proxy();
-        parent.registerContext(context);
+        SystemAtomicComponent context = (SystemAtomicComponent) mock.proxy();
+        parent.register(context);
 
         Source source = parent.resolveInstance(Source.class);
         assertNotNull(source);
@@ -44,7 +44,7 @@
      * Tests autowiring to a service context which is wired to an atomic context.
      */
     public void testServiceAutowire() throws Exception {
-        SystemCompositeContext<?> parent = new SystemCompositeContextImpl("parent", null, null);
+        SystemCompositeComponent<?> parent = new SystemCompositeComponentImpl("parent", null, null);
         parent.start();
 
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
@@ -52,20 +52,20 @@
         interfaces.add(Source2.class);
 
         Source serviceSource = new SourceImpl();
-        Mock mock = mock(SystemServiceContext.class);
+        Mock mock = mock(SystemService.class);
         mock.stubs().method("getName").will(returnValue("service"));
         mock.stubs().method("getService").will(returnValue(serviceSource));
         mock.stubs().method("getInterface").will(returnValue(Source.class));
-        SystemServiceContext serviceContext = (SystemServiceContext) mock.proxy();
-        parent.registerContext(serviceContext);
+        SystemService serviceContext = (SystemService) mock.proxy();
+        parent.register(serviceContext);
 
         Source atomicSource = new SourceImpl();
-        Mock mock2 = mock(SystemAtomicContext.class);
+        Mock mock2 = mock(SystemAtomicComponent.class);
         mock2.stubs().method("getName").will(returnValue("source"));
         mock2.stubs().method("getService").will(returnValue(atomicSource));
         mock2.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context = (SystemAtomicContext) mock2.proxy();
-        parent.registerContext(context);
+        SystemAtomicComponent context = (SystemAtomicComponent) mock2.proxy();
+        parent.register(context);
 
         Source source = parent.resolveExternalInstance(Source.class);
         assertSame(serviceSource, source);
@@ -77,16 +77,16 @@
      * Tests autowiring to a reference
      */
     public void testReferenceAutowire() throws Exception {
-        SystemCompositeContext<?> parent = new SystemCompositeContextImpl("parent", null, null);
+        SystemCompositeComponent<?> parent = new SystemCompositeComponentImpl("parent", null, null);
         parent.start();
 
         Source refSource = new SourceImpl();
-        Mock mock = mock(SystemReferenceContext.class);
+        Mock mock = mock(SystemReference.class);
         mock.stubs().method("getName").will(returnValue("service"));
         mock.stubs().method("getService").will(returnValue(refSource));
         mock.stubs().method("getInterface").will(returnValue(Source.class));
-        SystemReferenceContext referenceContext = (SystemReferenceContext) mock.proxy();
-        parent.registerContext(referenceContext);
+        SystemReference referenceContext = (SystemReference) mock.proxy();
+        parent.register(referenceContext);
 
         Source source = parent.resolveInstance(Source.class);
         assertNotNull(source);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/ChildLocateTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/ChildLocateTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/ChildLocateTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/ChildLocateTestCase.java Fri Jun  2 19:25:01 2006
@@ -11,20 +11,20 @@
 //         WorkContext workContext = new WorkContextImpl();
 //         ModuleScopeContext scopeContext = new ModuleScopeContext(workContext);
 //         scopeContext.start();
-//         SystemCompositeContext parent = new SystemCompositeContextImpl("parent", null, null);
-//         SystemCompositeContext child1 = new SystemCompositeContextImpl("child1", null, null);
+//         SystemCompositeComponent parent = new SystemCompositeComponentImpl("parent", null, null);
+//         SystemCompositeComponent child1 = new SystemCompositeComponentImpl("child1", null, null);
 //         child1.setParent(parent);
 //         parent.registerContext(child1);
 //         parent.start();
-//         SystemAtomicContext context = MockContextFactory.createSystemAtomicContext("source", SourceImpl.class);
+//         SystemAtomicComponent context = MockContextFactory.createSystemAtomicContext("source", SourceImpl.class);
 //         scopeContext.register(context);
 //         context.setScopeContext(scopeContext);
 //         scopeContext.publish(new ModuleStart(this, parent));
 //
 //         assertNotNull(source);
-//         CompositeContext composite1 = (CompositeContext) parent.getContext("child1");
-//         CompositeContext composite2 = (CompositeContext) composite1.getContext("child2");
-//         AtomicContext ctx2 = (AtomicContext) composite2.getContext("source");
+//         CompositeComponent composite1 = (CompositeComponent) parent.getContext("child1");
+//         CompositeComponent composite2 = (CompositeComponent) composite1.getContext("child2");
+//         AtomicComponent ctx2 = (AtomicComponent) composite2.getContext("source");
 //         Source source2 = (Source) ctx2.getInstance();
 //         assertSame(source, source2);
 //         scopeContext.onEvent(new ModuleStop(this, parent));
@@ -33,12 +33,12 @@
 /////
 
 //        system.start();
-//        Component compositeComponent = MockContextFactory.createCompositeComponent("system.child");
+//        ComponentDefinition compositeComponent = MockContextFactory.createCompositeComponent("system.child");
 //        system.registerModelObject(compositeComponent);
-//        CompositeContext childContext = (CompositeContext) system.getContext("system.child");
+//        CompositeComponent childContext = (CompositeComponent) system.getContext("system.child");
 //        Assert.assertNotNull(childContext);
 //
-//        Component component = factory.createSystemComponent("TestService1", ModuleScopeSystemComponent.class, ModuleScopeSystemComponentImpl.class, Scope.MODULE);
+//        ComponentDefinition component = factory.createSystemComponent("TestService1", ModuleScopeSystemComponent.class, ModuleScopeSystemComponentImpl.class, Scope.MODULE);
 //        EntryPoint ep = MockContextFactory.createEPSystemBinding("TestService1EP", ModuleScopeSystemComponent.class, "TestService1", component);
 //        childContext.registerModelObject(component);
 //        childContext.registerModelObject(ep);

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/CompositePropagationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/CompositePropagationTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/CompositePropagationTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/CompositePropagationTestCase.java Fri Jun  2 19:25:01 2006
@@ -3,17 +3,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.tuscany.core.context.WorkContextImpl;
-import org.apache.tuscany.core.context.event.ModuleStart;
-import org.apache.tuscany.core.context.event.ModuleStop;
-import org.apache.tuscany.core.context.scope.ModuleScopeContext;
-import org.apache.tuscany.core.injection.EventInvoker;
-import org.apache.tuscany.core.injection.MethodEventInvoker;
-import org.apache.tuscany.core.mock.component.ModuleScopeInitDestroyComponent;
 import org.apache.tuscany.core.mock.component.Source;
-import org.apache.tuscany.core.mock.factories.MockContextFactory;
-import org.apache.tuscany.spi.context.AtomicContext;
-import org.apache.tuscany.spi.context.WorkContext;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
@@ -24,31 +14,31 @@
  */
 public class CompositePropagationTestCase extends MockObjectTestCase {
 
-    private SystemCompositeContext parent;
-    private SystemCompositeContext child1;
-    private SystemCompositeContext child2;
+    private SystemCompositeComponent parent;
+    private SystemCompositeComponent child1;
+    private SystemCompositeComponent child2;
 
     public void testLifecyclePropagation() throws NoSuchMethodException {
         parent.start();
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
-        Mock mock = mock(SystemAtomicContext.class);
+        Mock mock = mock(SystemAtomicComponent.class);
         mock.stubs().method("getName").will(returnValue("source"));
         mock.expects(once()).method("stop");
         mock.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context = (SystemAtomicContext) mock.proxy();
-        child2.registerContext(context);
+        SystemAtomicComponent context = (SystemAtomicComponent) mock.proxy();
+        child2.register(context);
         parent.stop();
     }
 
 
     protected void setUp() throws Exception {
         super.setUp();
-        parent = new SystemCompositeContextImpl("parent", null, null);
-        child1 = new SystemCompositeContextImpl("child1", parent, null);
-        child2 = new SystemCompositeContextImpl("child2", child1, null);
-        child1.registerContext(child2);
-        parent.registerContext(child1);
+        parent = new SystemCompositeComponentImpl("parent", null, null);
+        child1 = new SystemCompositeComponentImpl("child1", parent, null);
+        child2 = new SystemCompositeComponentImpl("child2", child1, null);
+        child1.register(child2);
+        parent.register(child1);
     }
 
     protected void tearDown() throws Exception {

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/DuplicateRegistrationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/DuplicateRegistrationTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/DuplicateRegistrationTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/DuplicateRegistrationTestCase.java Fri Jun  2 19:25:01 2006
@@ -14,20 +14,20 @@
 public class DuplicateRegistrationTestCase extends MockObjectTestCase {
 
     public void testDuplicateRegistration() throws Exception {
-        SystemCompositeContext parent = new SystemCompositeContextImpl(null, null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl(null, null, null);
         parent.start();
 
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
-        Mock mock = mock(SystemAtomicContext.class);
+        Mock mock = mock(SystemAtomicComponent.class);
         mock.stubs().method("getName").will(returnValue("source"));
         mock.expects(once()).method("stop");
         mock.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context1 = (SystemAtomicContext) mock.proxy();
-        SystemAtomicContext context2 = (SystemAtomicContext) mock.proxy();
-        parent.registerContext(context1);
+        SystemAtomicComponent context1 = (SystemAtomicComponent) mock.proxy();
+        SystemAtomicComponent context2 = (SystemAtomicComponent) mock.proxy();
+        parent.register(context1);
         try {
-            parent.registerContext(context2);
+            parent.register(context2);
             fail();
         } catch (DuplicateNameException e) {
             // ok

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicComponentTestCase.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicContextTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicComponentTestCase.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicComponentTestCase.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicContextTestCase.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicContextTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemAtomicComponentTestCase.java Fri Jun  2 19:25:01 2006
@@ -9,13 +9,13 @@
 /**
  * @version $$Rev$$ $$Date$$
  */
-public class SystemAtomicContextTestCase extends TestCase {
+public class SystemAtomicComponentTestCase extends TestCase {
 
     EventInvoker<Object> initInvoker;
 
     public void testContextCreationAndInit() throws Exception {
         ObjectFactory<Foo> factory = new PojoObjectFactory<Foo>(Foo.class.getConstructor((Class[]) null), null);
-        SystemAtomicContext context = new SystemAtomicContextImpl("foo", null, null, Foo.class, factory, false, initInvoker, null, null, null);
+        SystemAtomicComponent context = new SystemAtomicComponentImpl("foo", null, null, Foo.class, factory, false, initInvoker, null, null, null);
         Foo foo = (Foo) context.createInstance().getInstance();
         assertNotNull(foo);
         assertTrue(foo.initialized);

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentResolutionTestCase.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextResolutionTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentResolutionTestCase.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentResolutionTestCase.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextResolutionTestCase.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextResolutionTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentResolutionTestCase.java Fri Jun  2 19:25:01 2006
@@ -5,28 +5,28 @@
 
 import org.apache.tuscany.core.mock.component.Source;
 import org.apache.tuscany.core.mock.component.SourceImpl;
-import org.apache.tuscany.spi.context.AtomicContext;
+import org.apache.tuscany.spi.context.AtomicComponent;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
 /**
  * @version $$Rev$$ $$Date$$
  */
-public class SystemCompositeContextResolutionTestCase extends MockObjectTestCase {
+public class SystemCompositeComponentResolutionTestCase extends MockObjectTestCase {
 
     public void testContextResolution() throws NoSuchMethodException {
-        SystemCompositeContext parent = new SystemCompositeContextImpl("foo", null, null);
+        SystemCompositeComponent parent = new SystemCompositeComponentImpl("foo", null, null);
         parent.start();
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
         Source originalSource = new SourceImpl();
-        Mock mock = mock(SystemAtomicContext.class);
+        Mock mock = mock(SystemAtomicComponent.class);
         mock.stubs().method("getName").will(returnValue("source"));
         mock.stubs().method("getService").will(returnValue(originalSource));
         mock.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context = (SystemAtomicContext) mock.proxy();
-        parent.registerContext(context);
-        AtomicContext ctx = (AtomicContext) parent.getContext("source");
+        SystemAtomicComponent context = (SystemAtomicComponent) mock.proxy();
+        parent.register(context);
+        AtomicComponent ctx = (AtomicComponent) parent.getChild("source");
         Source source = (Source) ctx.getService();
         assertNotNull(source);
     }

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextTestCase.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeContextTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java Fri Jun  2 19:25:01 2006
@@ -19,14 +19,14 @@
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
-import org.apache.tuscany.core.context.AutowireContext;
-import org.apache.tuscany.spi.context.CompositeContext;
+import org.apache.tuscany.core.context.AutowireComponent;
+import org.apache.tuscany.spi.context.CompositeComponent;
 
 /**
  * @version $Rev$ $Date$
  */
-public class SystemCompositeContextTestCase extends MockObjectTestCase {
-    private SystemCompositeContextImpl<?> context;
+public class SystemCompositeComponentTestCase extends MockObjectTestCase {
+    private SystemCompositeComponentImpl<?> context;
     private Mock parent;
     private Mock autowire;
 
@@ -36,8 +36,8 @@
     }
 
     public void testResolveToSelf() {
-        assertSame(context, context.resolveInstance(CompositeContext.class));
-        assertSame(context, context.resolveInstance(SystemCompositeContext.class));
+        assertSame(context, context.resolveInstance(CompositeComponent.class));
+        assertSame(context, context.resolveInstance(SystemCompositeComponent.class));
     }
 
     public void testResolvedByAutowire() {
@@ -49,9 +49,9 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        parent = mock(CompositeContext.class);
-        autowire = mock(AutowireContext.class);
-        context = new SystemCompositeContextImpl("test", (CompositeContext) parent.proxy(), (AutowireContext) autowire.proxy());
+        parent = mock(CompositeComponent.class);
+        autowire = mock(AutowireComponent.class);
+        context = new SystemCompositeComponentImpl("test", (CompositeComponent) parent.proxy(), (AutowireComponent) autowire.proxy());
     }
 
     public static interface Foo {

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeComponentTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeLifecycleTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeLifecycleTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeLifecycleTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemCompositeLifecycleTestCase.java Fri Jun  2 19:25:01 2006
@@ -5,7 +5,7 @@
 
 import org.apache.tuscany.core.mock.component.Source;
 import org.apache.tuscany.core.mock.component.SourceImpl;
-import org.apache.tuscany.spi.context.AtomicContext;
+import org.apache.tuscany.spi.context.AtomicComponent;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
@@ -15,35 +15,35 @@
 public class SystemCompositeLifecycleTestCase extends MockObjectTestCase {
 
     public void testLifecycle() throws Exception {
-        SystemCompositeContext composite = new SystemCompositeContextImpl("foo", null, null);
+        SystemCompositeComponent composite = new SystemCompositeComponentImpl("foo", null, null);
         composite.start();
-        assertNull(composite.getContext("nothtere"));
+        assertNull(composite.getChild("nothtere"));
         composite.stop();
         composite.start();
-        assertNull(composite.getContext("nothtere"));
+        assertNull(composite.getChild("nothtere"));
         composite.stop();
     }
 
     public void testRestart() throws NoSuchMethodException {
-        SystemCompositeContext composite = new SystemCompositeContextImpl("foo", null, null);
+        SystemCompositeComponent composite = new SystemCompositeComponentImpl("foo", null, null);
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
         Source originalSource = new SourceImpl();
-        Mock mock = mock(SystemAtomicContext.class);
+        Mock mock = mock(SystemAtomicComponent.class);
         mock.expects(atLeastOnce()).method("start");
         mock.expects(atLeastOnce()).method("stop");
         mock.stubs().method("getName").will(returnValue("source"));
         mock.stubs().method("getService").will(returnValue(originalSource));
         mock.stubs().method("getServiceInterfaces").will(returnValue(interfaces));
-        SystemAtomicContext context = (SystemAtomicContext) mock.proxy();
-        composite.registerContext(context);
+        SystemAtomicComponent context = (SystemAtomicComponent) mock.proxy();
+        composite.register(context);
 
-        AtomicContext ctx = (AtomicContext) composite.getContext("source");
+        AtomicComponent ctx = (AtomicComponent) composite.getChild("source");
         Source source = (Source) ctx.getService();
         assertNotNull(source);
         composite.stop();
         composite.start();
-        ctx = (AtomicContext) composite.getContext("source");
+        ctx = (AtomicComponent) composite.getChild("source");
         Source source2 = (Source) ctx.getService();
         assertNotNull(source2);
         composite.stop();

Modified: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/context/SystemObjectRegistrationTestCase.java Fri Jun  2 19:25:01 2006
@@ -11,12 +11,12 @@
  * @version $Rev$ $Date$
  */
 public class SystemObjectRegistrationTestCase extends TestCase {
-    private SystemCompositeContext<?> systemContext;
+    private SystemCompositeComponent<?> systemContext;
 
     public void testRegistration() throws Exception {
         MockComponent instance = new MockComponent();
         systemContext.registerJavaObject("foo", MockComponent.class, instance);
-        MockComponent resolvedInstance = (MockComponent)systemContext.getContext("foo").getService();
+        MockComponent resolvedInstance = (MockComponent)systemContext.getChild("foo").getService();
         assertSame(instance, resolvedInstance);
     }
 
@@ -40,7 +40,7 @@
 
     protected void setUp() throws Exception {
         super.setUp();
-        systemContext = new SystemCompositeContextImpl(null, null, null);
+        systemContext = new SystemCompositeComponentImpl(null, null, null);
         systemContext.start();
         systemContext.publish(new ModuleStart(this,null));
     }

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicComponentWireInvocationTestCase.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicContextWireInvocationTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicComponentWireInvocationTestCase.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicComponentWireInvocationTestCase.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicContextWireInvocationTestCase.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicContextWireInvocationTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/AtomicComponentWireInvocationTestCase.java Fri Jun  2 19:25:01 2006
@@ -12,7 +12,7 @@
 import org.apache.tuscany.core.mock.component.Target;
 import org.apache.tuscany.core.mock.component.TargetImpl;
 import org.apache.tuscany.core.mock.factories.MockContextFactory;
-import org.apache.tuscany.core.system.context.SystemAtomicContext;
+import org.apache.tuscany.core.system.context.SystemAtomicComponent;
 import org.apache.tuscany.spi.QualifiedName;
 import org.apache.tuscany.spi.wire.OutboundWire;
 import org.jmock.Mock;
@@ -23,7 +23,7 @@
  *
  * @version $$Rev$$ $$Date$$
  */
-public class AtomicContextWireInvocationTestCase extends MockObjectTestCase {
+public class AtomicComponentWireInvocationTestCase extends MockObjectTestCase {
 
     public void testWireResolution() throws NoSuchMethodException {
         ModuleScopeContext scope = new ModuleScopeContext(null);
@@ -36,7 +36,7 @@
         members.put("setTarget", SourceImpl.class.getMethod("setTarget", Target.class));
         List<Class<?>> interfaces = new ArrayList<Class<?>>();
         interfaces.add(Source.class);
-        SystemAtomicContext sourceContext = MockContextFactory.createSystemAtomicContext("source", scope, interfaces, SourceImpl.class, null, members);
+        SystemAtomicComponent sourceContext = MockContextFactory.createSystemAtomicContext("source", scope, interfaces, SourceImpl.class, null, members);
         OutboundWire<Target> outboundWire = new SystemOutboundWireImpl<Target>("setTarget", new QualifiedName("service"), Target.class);
         outboundWire.setTargetWire(inboundWire);
         sourceContext.addOutboundWire(outboundWire);

Copied: incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceComponentWireTestCase.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceContextWireTestCase.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceComponentWireTestCase.java?p2=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceComponentWireTestCase.java&p1=incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceContextWireTestCase.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceContextWireTestCase.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/core2/src/test/java/org/apache/tuscany/core/system/wire/SystemServiceComponentWireTestCase.java Fri Jun  2 19:25:01 2006
@@ -2,8 +2,8 @@
 
 import org.apache.tuscany.core.mock.component.Target;
 import org.apache.tuscany.core.mock.component.TargetImpl;
-import org.apache.tuscany.core.system.context.SystemServiceContext;
-import org.apache.tuscany.core.system.context.SystemServiceContextImpl;
+import org.apache.tuscany.core.system.context.SystemService;
+import org.apache.tuscany.core.system.context.SystemServiceImpl;
 import org.jmock.Mock;
 import org.jmock.MockObjectTestCase;
 
@@ -13,7 +13,7 @@
  *
  * @version $$Rev$$ $$Date$$
  */
-public class SystemServiceContextWireTestCase extends MockObjectTestCase {
+public class SystemServiceComponentWireTestCase extends MockObjectTestCase {
 
     public void testServiceContext() throws NoSuchMethodException {
         Target target = new TargetImpl();
@@ -22,7 +22,7 @@
         SystemOutboundWire<Target> outboundWire = (SystemOutboundWire<Target>) mockWire.proxy();
 
         SystemInboundWire<Target> wire = new SystemInboundWireImpl<Target>("Target", Target.class);
-        SystemServiceContext<Target> serviceContext = new SystemServiceContextImpl<Target>("service", null);
+        SystemService<Target> serviceContext = new SystemServiceImpl<Target>("service", null);
         serviceContext.setInboundWire(wire);
         serviceContext.setOutboundWire(outboundWire);
         wire.setTargetWire(outboundWire);

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/LICENSE.txt
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/LICENSE.txt?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/LICENSE.txt (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/LICENSE.txt Fri Jun  2 19:25:01 2006
@@ -137,7 +137,7 @@
       with Licensor regarding such Contributions.
 
    6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
+      names, trademarks, serviceDefinition marks, or product names of the Licensor,
       except as required for reasonable and customary use in describing the
       origin of the Work and reproducing the content of the NOTICE file.
 

Copied: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ContextNames.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java?p2=incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java&p1=incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ContextNames.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ContextNames.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java Fri Jun  2 19:25:01 2006
@@ -17,31 +17,31 @@
 package org.apache.tuscany.spi.bootstrap;
 
 /**
- * Class that defines the names of well known contexts.
+ * Class that defines the names of well known component
  *
  * @version $Rev$ $Date$
  */
-public final class ContextNames {
-    private ContextNames() {
+public final class ComponentNames {
+    private ComponentNames() {
     }
 
     /**
-     * The name of the context that forms the root of the runtime tree.
+     * The name of the component that forms the root of the runtime tree.
      */
     public static final String TUSCANY_RUNTIME = "tuscany.runtime";
 
     /**
-     * The name of the context that forms the root of the application context tree.
+     * The name of the component that forms the root of the application context tree.
      */
     public static final String TUSCANY_ROOT = "tuscany.root";
 
     /**
-     * The name of the context that form the root of the system context tree.
+     * The name of the component that form the root of the system context tree.
      */
     public static final String TUSCANY_SYSTEM = "tuscany.system";
 
     /**
-     * The name of the context that contains the deployer.
+     * The name of the component that contains the deployer.
      */
     public static final String TUSCANY_DEPLOYER = "tuscany.deployer";
 }

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/ComponentNames.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Copied: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java (from r411328, incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeContext.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java?p2=incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java&p1=incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeContext.java&r1=411328&r2=411356&rev=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeContext.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java Fri Jun  2 19:25:01 2006
@@ -16,7 +16,7 @@
  */
 package org.apache.tuscany.spi.bootstrap;
 
-import org.apache.tuscany.spi.context.CompositeContext;
+import org.apache.tuscany.spi.context.CompositeComponent;
 import org.apache.tuscany.spi.deployer.Deployer;
 
 /**
@@ -24,27 +24,27 @@
  *
  * @version $Rev$ $Date$
  */
-public interface RuntimeContext<S extends CompositeContext> extends CompositeContext<Void> {
+public interface RuntimeComponent<S extends CompositeComponent> extends CompositeComponent<Void> {
     /**
-     * Returns the context that forms the root of the user component tree.
-     * All user components will managed by contexts that are children of this root.
+     * Returns the component that forms the root of the user component tree. All user components will be
+     * managed by composites that are children of this root.
      *
      * @return the root of the user component tree
      */
-    CompositeContext getRootContext();
+    CompositeComponent getRootComponent();
 
     /**
-     * Returns the context that forms the root of the system component tree.
-     * All system components, components that provide system services needed by the
-     * Tuscany runtime itself, will be managed by contexts that are children of this root.
+     * Returns the component that forms the root of the system component tree. All system components,
+     * components that provide system services needed by the Tuscany runtime itself, will be managed by
+     * composites that are children of this root.
      *
      * @return the root of the system component tree
      */
-    S getSystemContext();
+    S getSystemComponent();
 
     /**
-     * Returns the deployer for this runtime.
-     * This interface can be used to deploy new SCA bundles to the runtime.
+     * Returns the deployer for this runtime. This interface can be used to deploy new SCA bundles to the
+     * runtime.
      *
      * @return the deployer for this runtime
      */

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/bootstrap/RuntimeComponent.java
------------------------------------------------------------------------------
    svn:keywords = Rev,Date

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/BindingBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/BindingBuilder.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/BindingBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/BindingBuilder.java Fri Jun  2 19:25:01 2006
@@ -16,22 +16,22 @@
  */
 package org.apache.tuscany.spi.builder;
 
-import org.apache.tuscany.spi.context.CompositeContext;
-import org.apache.tuscany.spi.context.Context;
+import org.apache.tuscany.spi.context.CompositeComponent;
+import org.apache.tuscany.spi.context.SCAObject;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.model.Binding;
-import org.apache.tuscany.spi.model.BoundReference;
-import org.apache.tuscany.spi.model.BoundService;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
 
 /**
  * Responsible for processing a service or reference in an assembly configured with a particular binding. The
- * builder will create and return corresponding {@link org.apache.tuscany.spi.context.ServiceContext} or
- * {@link org.apache.tuscany.spi.context.ReferenceContext}
+ * builder will create and return corresponding {@link org.apache.tuscany.spi.context.Service} or
+ * {@link org.apache.tuscany.spi.context.Reference}
  *
  * @version $Rev$ $Date$
  */
 public interface BindingBuilder<B extends Binding> {
-    Context build(CompositeContext parent, BoundService<B> boundService, DeploymentContext deploymentContext);
+    SCAObject build(CompositeComponent parent, BoundServiceDefinition<B> boundServiceDefinition, DeploymentContext deploymentContext);
 
-    Context build(CompositeContext parent, BoundReference<B> boundReference, DeploymentContext deploymentContext);
+    SCAObject build(CompositeComponent parent, BoundReferenceDefinition<B> boundReferenceDefinition, DeploymentContext deploymentContext);
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/Builder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/Builder.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/Builder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/Builder.java Fri Jun  2 19:25:01 2006
@@ -17,38 +17,38 @@
 package org.apache.tuscany.spi.builder;
 
 import org.apache.tuscany.spi.model.Implementation;
-import org.apache.tuscany.spi.model.Component;
+import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.Binding;
-import org.apache.tuscany.spi.model.BoundService;
-import org.apache.tuscany.spi.model.BoundReference;
-import org.apache.tuscany.spi.context.Context;
-import org.apache.tuscany.spi.context.CompositeContext;
-import org.apache.tuscany.spi.context.ComponentContext;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.context.SCAObject;
+import org.apache.tuscany.spi.context.CompositeComponent;
+import org.apache.tuscany.spi.context.Component;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 
 /**
- * Service interface that builds runtime contexts from model objects.
+ * Implementations build <code>SCAObject</code> types from model objects.
  *
  * @version $Rev$ $Date$
  */
 public interface Builder {
     /**
-     * Build a component context from a component definition.
+     * Builds a <code>Component</code> context from a <code>ComponentDefinition</code>
      *
-     * @param parent the context that will be the parent of the newly build context
-     * @param component the definition of the component
+     * @param parent the composite that will be the parent of the newly built component
+     * @param componentDefinition the component definition as parsed from an SCA assembly
      * @param deploymentContext the current deployment context
-     * @return a newly created component context
+     * @return a newly created component
      */
-    <I extends Implementation<?>> ComponentContext<?> build(CompositeContext<?> parent, Component<I> component, DeploymentContext deploymentContext);
+    <I extends Implementation<?>> Component<?> build(CompositeComponent<?> parent, ComponentDefinition<I> componentDefinition, DeploymentContext deploymentContext);
 
     /**
      * TODO: JavaDoc this when we know if we will still register Services as contexts 
      */
-    <B extends Binding> Context build(CompositeContext parent, BoundService<B> boundService, DeploymentContext deploymentContext);
+    <B extends Binding> SCAObject build(CompositeComponent parent, BoundServiceDefinition<B> boundServiceDefinition, DeploymentContext deploymentContext);
 
     /**
      * TODO: JavaDoc this when we know if we will still register References as contexts
      */
-    <B extends Binding> Context build(CompositeContext parent, BoundReference<B> boundReference, DeploymentContext deploymentContext);
+    <B extends Binding> SCAObject build(CompositeComponent parent, BoundReferenceDefinition<B> boundReferenceDefinition, DeploymentContext deploymentContext);
 }

Modified: incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/ComponentBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/ComponentBuilder.java?rev=411356&r1=411355&r2=411356&view=diff
==============================================================================
--- incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/ComponentBuilder.java (original)
+++ incubator/tuscany/sandbox/jboynes/sca/spi/src/main/java/org/apache/tuscany/spi/builder/ComponentBuilder.java Fri Jun  2 19:25:01 2006
@@ -16,18 +16,18 @@
  */
 package org.apache.tuscany.spi.builder;
 
-import org.apache.tuscany.spi.context.ComponentContext;
-import org.apache.tuscany.spi.context.CompositeContext;
+import org.apache.tuscany.spi.context.Component;
+import org.apache.tuscany.spi.context.CompositeComponent;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
-import org.apache.tuscany.spi.model.Component;
+import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.Implementation;
 
 /**
- * Responsible for building a {@link ComponentContext} from an atomic or composite component configured in an
+ * Responsible for building a {@link Component} from an atomic or composite component configured in an
  * assembly
  *
  * @version $Rev$ $Date$
  */
 public interface ComponentBuilder<I extends Implementation<?>> {
-    ComponentContext<?> build(CompositeContext<?> parent, Component<I> component, DeploymentContext deploymentContext) throws BuilderConfigException;
+    Component<?> build(CompositeComponent<?> parent, ComponentDefinition<I> componentDefinition, DeploymentContext deploymentContext) throws BuilderConfigException;
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message