tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r533445 [1/4] - in /incubator/tuscany/java/sca: itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ modules/assembly-xml/src/main/java/...
Date Sat, 28 Apr 2007 23:52:28 GMT
Author: jsdelfino
Date: Sat Apr 28 16:52:22 2007
New Revision: 533445

URL: http://svn.apache.org/viewvc?view=rev&rev=533445
Log:
Changes to make sure that model factories can be switched and the that the runtime does not assume specific factories or implementation classes.

Added:
    incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java   (with props)
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/implementation/java/bean/impl/BeanJavaInterfaceContractImpl.java   (with props)
Modified:
    incubator/tuscany/java/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java
    incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/AssemblyBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentReferenceBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentServiceBuilderImpl.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/BaseArtifactProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ComponentTypeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/CompositeProcessor.java
    incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ConstrainingTypeProcessor.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractPropertyImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractReferenceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractServiceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BaseImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BindingImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CallbackImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentPropertyImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentReferenceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentServiceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentTypeImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeReferenceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeServiceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ConstrainingTypeImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ContractImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/PropertyImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ReferenceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/SCABindingImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ServiceImpl.java
    incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/WireImpl.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIModuleActivator.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/impl/RMIBindingImpl.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/xml/RMIBindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ModuleActivator.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/main/java/org/apache/tuscany/binding/ws/xml/WebServiceBindingProcessor.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/binding/ws/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/binding-ws-xml/src/test/java/org/apache/tuscany/binding/ws/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/binding-ws/src/main/java/org/apache/tuscany/binding/ws/impl/WebServiceBindingImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/contribution/service/impl/ContributionMetadataLoaderImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/contribution/service/impl/ContributionServiceImpl.java
    incubator/tuscany/java/sca/modules/contribution-impl/src/test/java/org/apache/tuscany/contribution/services/ContributionMetadataLoaderTestCase.java
    incubator/tuscany/java/sca/modules/core-databinding/src/test/java/org/apache/tuscany/core/databinding/processor/DataBindingJavaInterfaceProcessorTestCase.java
    incubator/tuscany/java/sca/modules/core-databinding/src/test/java/org/apache/tuscany/core/databinding/wire/DataBindingWirePostProcessorOptimizationTestCase.java
    incubator/tuscany/java/sca/modules/core-databinding/src/test/java/org/apache/tuscany/core/databinding/wire/DataBindingWirePostProcessorTestCase.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/assembly/bean/impl/BeanComponentImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/assembly/bean/impl/BeanReferenceImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/implementation/java/bean/impl/BeanJavaFactory.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/implementation/java/bean/impl/BeanJavaImplementationImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/main/java/org/apache/tuscany/implementation/java/bean/impl/BeanJavaInterfaceImpl.java
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/application/context/TestRuntimeContext.java
    incubator/tuscany/java/sca/modules/core-spring/src/test/java/test/model/variant/VariantRuntimeContext.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/deployer/DeployerImpl.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/DefaultBootstrapper.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryNoBindingsTestCase.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/builder/BuilderRegistryTestCase.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireObjectFactoryTestCase.java
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/wire/WireUtilsTestCase.java
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/databinding/sdo/HelperContextProcessor.java
    incubator/tuscany/java/sca/modules/databinding-sdo/src/main/java/org/apache/tuscany/databinding/sdo/bootstrap/SDODataBindingModuleActivator.java
    incubator/tuscany/java/sca/modules/databinding-sdo/src/test/java/org/apache/tuscany/databinding/sdo/HelperContextProcessorTestCase.java
    incubator/tuscany/java/sca/modules/host-embedded/src/main/java/org/apache/tuscany/host/embedded/impl/SimpleRuntimeImpl.java
    incubator/tuscany/java/sca/modules/host-embedded/src/test/java/org/apache/tuscany/container/crud/CRUDImplementation.java
    incubator/tuscany/java/sca/modules/host-embedded/src/test/java/org/apache/tuscany/container/crud/CRUDImplementationLoader.java
    incubator/tuscany/java/sca/modules/host-embedded/src/test/java/org/apache/tuscany/container/crud/CRUDModuleActivator.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/implementation/java/module/JavaRuntimeModuleActivator.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/JavaComponentBuilderMetadataTestCaseFIXME.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/context/ModelHelper.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/proxy/JDKCallbackInvocationHandlerTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/proxy/JDKInvocationHandlerProxyTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/proxy/JDKInvocationHandlerSerializationTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/proxy/JDKInvocationHandlerTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-runtime/src/test/java/org/apache/tuscany/implementation/java/proxy/JDKProxyTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/BaseJavaClassIntrospectorExtension.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/AbstractPropertyProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/AllowsPassByReferenceProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ConstructorProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ContextProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ConversationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/DestroyProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/EagerInitProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/HeuristicPojoProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/InitProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/main/java/org/apache/tuscany/implementation/java/xml/JavaImplementationProcessor.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/AbstractProcessorTest.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/AbstractPropertyProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/AllowsPassByReferenceProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ConstructorProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ContextProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ConversationProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ConvertTimeMillisTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/DestroyProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/EagerInitProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/HeuristicAndPropertyTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/HeuristicConstructorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/HeuristicPojoProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/HeutisticExtensibleConstructorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/InitProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ModelHelper.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PolicyProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/PropertyProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ReferenceProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ResourceProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ScopeProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceCallbackTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/introspect/impl/ServiceProcessorTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java-xml/src/test/java/org/apache/tuscany/implementation/java/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/implementation/java/impl/JavaImplementationImpl.java
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptArtifactProcessor.java
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptImplementation.java
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptModuleActivator.java
    incubator/tuscany/java/sca/modules/implementation-script/src/main/java/org/apache/tuscany/implementation/script/ScriptPropertyValueObjectFactory.java
    incubator/tuscany/java/sca/modules/interface-java-runtime/src/main/java/org/apache/tuscany/interfacedef/java/module/JavaInterfaceRuntimeModuleActivator.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/introspect/DefaultJavaInterfaceIntrospector.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/main/java/org/apache/tuscany/interfacedef/java/xml/JavaInterfaceProcessor.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/ConversationalIntrospectionTestCase.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/introspection/impl/JavaInterfaceProcessorRegistryImplTestCase.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/interface-java-xml/src/test/java/org/apache/tuscany/interfacedef/java/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceContractImpl.java
    incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/interfacedef/java/impl/JavaInterfaceImpl.java
    incubator/tuscany/java/sca/modules/interface-wsdl-runtime/src/main/java/org/apache/tuscany/interfacedef/wsdl/module/WSDLInterfaceRuntimeModuleActivator.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospector.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperation.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/interfacedef/wsdl/xml/XSDDocumentProcessor.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/DefaultWSDLInterfaceIntrospectorTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WSDLOperationTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/introspect/WrapperStyleOperationTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/ReadTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WSDLTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/interfacedef/wsdl/xml/WriteTestCase.java
    incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLDefinitionImpl.java
    incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceContractImpl.java
    incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/WSDLInterfaceImpl.java
    incubator/tuscany/java/sca/modules/interface-wsdl/src/main/java/org/apache/tuscany/interfacedef/wsdl/impl/XSDefinitionImpl.java
    incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentImpl.java
    incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/IntentMapImpl.java
    incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/policy/impl/PolicySetImpl.java
    incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementation.java
    incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDImplementationProcessor.java
    incubator/tuscany/java/sca/samples/implementation-crud/src/main/java/crud/CRUDModuleActivator.java

Modified: incubator/tuscany/java/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java (original)
+++ incubator/tuscany/java/sca/itest/contribution/src/test/java/org/apache/tuscany/sca/test/contribution/ContributionServiceTestCase.java Sat Apr 28 16:52:22 2007
@@ -74,7 +74,7 @@
     protected void setUp() throws Exception {
         
         // Create default factories
-        AssemblyFactory factory = new DefaultAssemblyFactory();
+        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
         PolicyFactory policyFactory = new DefaultPolicyFactory();
         InterfaceContractMapper mapper = new DefaultInterfaceContractMapper();
         
@@ -88,9 +88,9 @@
         extensionRegistry.addExtensionPoint(URLArtifactProcessorExtensionPoint.class, documentProcessors);
 
         // Register base artifact processors
-        staxProcessors.addExtension(new CompositeProcessor(factory, policyFactory, mapper, staxProcessors));
-        staxProcessors.addExtension(new ComponentTypeProcessor(factory, policyFactory, staxProcessors));
-        staxProcessors.addExtension(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessors));
+        staxProcessors.addExtension(new CompositeProcessor(assemblyFactory, policyFactory, mapper, staxProcessors));
+        staxProcessors.addExtension(new ComponentTypeProcessor(assemblyFactory, policyFactory, staxProcessors));
+        staxProcessors.addExtension(new ConstrainingTypeProcessor(assemblyFactory, policyFactory, staxProcessors));
 
         XMLInputFactory inputFactory = XMLInputFactory.newInstance();
         documentProcessors.addExtension(new CompositeDocumentProcessor(staxProcessors, inputFactory));
@@ -112,7 +112,7 @@
         // Create an artifact resolver and contribution service
         DefaultArtifactResolver artifactResolver = new DefaultArtifactResolver(getClass().getClassLoader());
         this.contributionService = new ContributionServiceImpl(repository, packageProcessors,
-                                                                              documentProcessors, artifactResolver);
+                                                                              documentProcessors, artifactResolver, assemblyFactory);
     }
 
     public void testContributeJAR() throws Exception {

Modified: incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/AssemblyBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/AssemblyBuilderImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/AssemblyBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/AssemblyBuilderImpl.java Sat Apr 28 16:52:22 2007
@@ -56,13 +56,13 @@
 	}
 
 	public ComponentReferenceBuilder reference(String name) {
-		ComponentReferenceBuilderImpl reference = new ComponentReferenceBuilderImpl();
+		ComponentReferenceBuilderImpl reference = new ComponentReferenceBuilderImpl(this);
 		reference.setName(name);
 		return reference;
 	}
 
 	public ComponentServiceBuilder service(String name) {
-		ComponentServiceBuilderImpl service = new ComponentServiceBuilderImpl();
+		ComponentServiceBuilderImpl service = new ComponentServiceBuilderImpl(this);
 		service.setName(name);
 		return service;
 	}

Modified: incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentReferenceBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentReferenceBuilderImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentReferenceBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentReferenceBuilderImpl.java Sat Apr 28 16:52:22 2007
@@ -19,20 +19,25 @@
 
 package org.apache.tuscany.assembly.builder.impl;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
 import org.apache.tuscany.assembly.ComponentService;
 import org.apache.tuscany.assembly.CompositeReference;
 import org.apache.tuscany.assembly.builder.ComponentReferenceBuilder;
 import org.apache.tuscany.assembly.builder.ComponentServiceBuilder;
 import org.apache.tuscany.assembly.impl.ComponentReferenceImpl;
 import org.apache.tuscany.assembly.impl.ComponentServiceImpl;
-import org.apache.tuscany.assembly.impl.CompositeReferenceImpl;
 
 public class ComponentReferenceBuilderImpl extends ComponentReferenceImpl implements ComponentReferenceBuilder {
 	
 	private CompositeReference compositeReference;
+        private AssemblyFactory assemblyFactory;
+        
+        protected ComponentReferenceBuilderImpl(AssemblyFactory assemblyFactory) {
+            this.assemblyFactory = assemblyFactory;
+        }
 	
 	public ComponentReferenceBuilder wiredTo(String target) {
-		ComponentService componentService = new ComponentServiceImpl();
+		ComponentService componentService = assemblyFactory.createComponentService();
 		componentService.setUnresolved(true);
 		componentService.setName(target);
 		getTargets().add(componentService);
@@ -50,13 +55,13 @@
 	}
 	
 	public ComponentReferenceBuilderImpl promotedAs(String promoted) {
-		compositeReference = new CompositeReferenceImpl();
+		compositeReference = assemblyFactory.createCompositeReference();
 		compositeReference.setName(promoted);
 		return this;
 	}
 
 	public ComponentReferenceBuilderImpl promoted() {
-		compositeReference = new CompositeReferenceImpl();
+		compositeReference = assemblyFactory.createCompositeReference();
 		compositeReference.setName(getName());
 		return this;
 	}

Modified: incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentServiceBuilderImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentServiceBuilderImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentServiceBuilderImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-java-dsl/src/main/java/org/apache/tuscany/assembly/builder/impl/ComponentServiceBuilderImpl.java Sat Apr 28 16:52:22 2007
@@ -19,14 +19,19 @@
 
 package org.apache.tuscany.assembly.builder.impl;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
 import org.apache.tuscany.assembly.CompositeService;
 import org.apache.tuscany.assembly.builder.ComponentServiceBuilder;
 import org.apache.tuscany.assembly.impl.ComponentServiceImpl;
-import org.apache.tuscany.assembly.impl.CompositeServiceImpl;
 
 public class ComponentServiceBuilderImpl extends ComponentServiceImpl implements ComponentServiceBuilder {
 	
 	private CompositeService compositeService;
+        private AssemblyFactory assemblyFactory;
+        
+        protected ComponentServiceBuilderImpl(AssemblyFactory assemblyFactory) {
+            this.assemblyFactory = assemblyFactory;
+        }
 	
 	public ComponentServiceBuilderImpl typedBy(Class interfaceClass) {
 		//FIXME support for Java interfaces 
@@ -34,13 +39,13 @@
 	}
 	
 	public ComponentServiceBuilderImpl promotedAs(String promoted) {
-		compositeService = new CompositeServiceImpl();
+		compositeService = assemblyFactory.createCompositeService();
 		compositeService.setName(promoted);
 		return this;
 	}
 
 	public ComponentServiceBuilderImpl promoted() {
-		compositeService = new CompositeServiceImpl();
+		compositeService = assemblyFactory.createCompositeService();
 		compositeService.setName(getName());
 		return this;
 	}

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/BaseArtifactProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/BaseArtifactProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/BaseArtifactProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/BaseArtifactProcessor.java Sat Apr 28 16:52:22 2007
@@ -74,7 +74,7 @@
  */
 public abstract class BaseArtifactProcessor implements Constants {
 
-    protected AssemblyFactory factory;
+    protected AssemblyFactory assemblyFactory;
     protected PolicyFactory policyFactory;
     protected StAXArtifactProcessorExtension<Object> extensionProcessor;
 
@@ -96,7 +96,7 @@
      */
     @SuppressWarnings("unchecked")
     public BaseArtifactProcessor(AssemblyFactory factory, PolicyFactory policyFactory, StAXArtifactProcessorExtension extensionProcessor) {
-        this.factory = factory;
+        this.assemblyFactory = factory;
         this.policyFactory = policyFactory;
         this.extensionProcessor = (StAXArtifactProcessorExtension<Object>)extensionProcessor;
     }
@@ -261,7 +261,7 @@
         ComponentService target = null;
         if (value != null) {
             for (StringTokenizer tokens = new StringTokenizer(value); tokens.hasMoreTokens();) {
-                target = factory.createComponentService();
+                target = assemblyFactory.createComponentService();
                 target.setUnresolved(true);
                 target.setName(tokens.nextToken());
                 reference.getTargets().add(target);
@@ -293,7 +293,7 @@
     protected ConstrainingType getConstrainingType(XMLStreamReader reader) {
         QName constrainingTypeName = getQName(reader, "constrainingType");
         if (constrainingTypeName != null) {
-            ConstrainingType constrainingType = factory.createConstrainingType();
+            ConstrainingType constrainingType = assemblyFactory.createConstrainingType();
             constrainingType.setName(constrainingTypeName);
             constrainingType.setUnresolved(true);
             return constrainingType;

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ComponentTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ComponentTypeProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ComponentTypeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ComponentTypeProcessor.java Sat Apr 28 16:52:22 2007
@@ -87,14 +87,14 @@
                         if (Constants.COMPONENT_TYPE_QNAME.equals(name)) {
     
                             // Read a <componentType>
-                            componentType = factory.createComponentType();
+                            componentType = assemblyFactory.createComponentType();
                             componentType.setConstrainingType(getConstrainingType(reader));
                             readPolicies(componentType, reader);
     
                         } else if (Constants.SERVICE_QNAME.equals(name)) {
     
                             // Read a <service>
-                            service = factory.createService();
+                            service = assemblyFactory.createService();
                             contract = service;
                             service.setName(getString(reader, Constants.NAME));
                             componentType.getServices().add(service);
@@ -102,7 +102,7 @@
     
                         } else if (Constants.REFERENCE_QNAME.equals(name)) {
                             // Read a <reference>
-                            reference = factory.createReference();
+                            reference = assemblyFactory.createReference();
                             contract = reference;
                             reference.setName(getString(reader, Constants.NAME));
                             reference.setWiredByImpl(getBoolean(reader, Constants.WIRED_BY_IMPL));
@@ -114,7 +114,7 @@
                         } else if (Constants.PROPERTY_QNAME.equals(name)) {
     
                             // Read a <property>
-                            property = factory.createProperty();
+                            property = assemblyFactory.createProperty();
                             readPolicies(property, reader);
                             readProperty(property, reader);
                             componentType.getProperties().add(property);
@@ -122,14 +122,14 @@
                         } else if (Constants.CALLBACK_QNAME.equals(name)) {
     
                             // Read a <callback>
-                            callback = factory.createCallback();
+                            callback = assemblyFactory.createCallback();
                             contract.setCallback(callback);
                             readPolicies(callback, reader);
     
                         } else if (OPERATION.equals(name)) {
     
                             // Read an <operation>
-                            Operation operation = factory.createOperation();
+                            Operation operation = assemblyFactory.createOperation();
                             operation.setName(getString(reader, NAME));
                             operation.setUnresolved(true);
                             if (callback != null) {

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/CompositeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/CompositeProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/CompositeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/CompositeProcessor.java Sat Apr 28 16:52:22 2007
@@ -111,7 +111,7 @@
                         if (COMPOSITE_QNAME.equals(name)) {
     
                             // Read a <composite>
-                            composite = factory.createComposite();
+                            composite = assemblyFactory.createComposite();
                             composite.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
                             composite.setAutowire(getBoolean(reader, AUTOWIRE));
                             composite.setLocal(getBoolean(reader, LOCAL));
@@ -121,7 +121,7 @@
                         } else if (INCLUDE_QNAME.equals(name)) {
     
                             // Read an <include>
-                            include = factory.createComposite();
+                            include = assemblyFactory.createComposite();
                             include.setUnresolved(true);
                             composite.getIncludes().add(include);
     
@@ -129,7 +129,7 @@
                             if (component != null) {
     
                                 // Read a <component><service>
-                                componentService = factory.createComponentService();
+                                componentService = assemblyFactory.createComponentService();
                                 contract = componentService;
                                 componentService.setName(getString(reader, NAME));
                                 component.getServices().add(componentService);
@@ -137,11 +137,11 @@
                             } else {
     
                                 // Read a <composite><service>
-                                compositeService = factory.createCompositeService();
+                                compositeService = assemblyFactory.createCompositeService();
                                 contract = compositeService;
                                 compositeService.setName(getString(reader, NAME));
     
-                                ComponentService promoted = factory.createComponentService();
+                                ComponentService promoted = assemblyFactory.createComponentService();
                                 promoted.setUnresolved(true);
                                 promoted.setName(getString(reader, PROMOTE));
                                 compositeService.setPromotedService(promoted);
@@ -153,7 +153,7 @@
                         } else if (REFERENCE_QNAME.equals(name)) {
                             if (component != null) {
                                 // Read a <component><reference>
-                                componentReference = factory.createComponentReference();
+                                componentReference = assemblyFactory.createComponentReference();
                                 contract = componentReference;
                                 componentReference.setName(getString(reader, NAME));
                                 readMultiplicity(componentReference, reader);
@@ -164,7 +164,7 @@
                                 readPolicies(contract, reader);
                             } else {
                                 // Read a <composite><reference>
-                                compositeReference = factory.createCompositeReference();
+                                compositeReference = assemblyFactory.createCompositeReference();
                                 contract = compositeReference;
                                 compositeReference.setName(getString(reader, NAME));
                                 readMultiplicity(compositeReference, reader);
@@ -178,7 +178,7 @@
                         } else if (PROPERTY_QNAME.equals(name)) {
                             if (component != null) {
                                 // Read a <component><property>
-                                componentProperty = factory.createComponentProperty();
+                                componentProperty = assemblyFactory.createComponentProperty();
                                 property = componentProperty;
                                 componentProperty.setSource(getString(reader, SOURCE));
                                 componentProperty.setFile(getString(reader, FILE));
@@ -188,7 +188,7 @@
                             } else {
     
                                 // Read a <composite><property>
-                                property = factory.createProperty();
+                                property = assemblyFactory.createProperty();
                                 readPolicies(property, reader);
                                 readProperty(property, reader);
                                 composite.getProperties().add(property);
@@ -197,7 +197,7 @@
                         } else if (COMPONENT_QNAME.equals(name)) {
     
                             // Read a <component>
-                            component = factory.createComponent();
+                            component = assemblyFactory.createComponent();
                             component.setName(getString(reader, NAME));
                             component.setConstrainingType(getConstrainingType(reader));
                             composite.getComponents().add(component);
@@ -206,13 +206,13 @@
                         } else if (WIRE_QNAME.equals(name)) {
     
                             // Read a <wire>
-                            wire = factory.createWire();
-                            ComponentReference source = factory.createComponentReference();
+                            wire = assemblyFactory.createWire();
+                            ComponentReference source = assemblyFactory.createComponentReference();
                             source.setUnresolved(true);
                             source.setName(getString(reader, SOURCE));
                             wire.setSource(source);
     
-                            ComponentService target = factory.createComponentService();
+                            ComponentService target = assemblyFactory.createComponentService();
                             target.setUnresolved(true);
                             target.setName(getString(reader, TARGET));
                             wire.setTarget(target);
@@ -223,14 +223,14 @@
                         } else if (CALLBACK_QNAME.equals(name)) {
     
                             // Read a <callback>
-                            callback = factory.createCallback();
+                            callback = assemblyFactory.createCallback();
                             contract.setCallback(callback);
                             readPolicies(callback, reader);
     
                         } else if (OPERATION_QNAME.equals(name)) {
     
                             // Read an <operation>
-                            Operation operation = factory.createOperation();
+                            Operation operation = assemblyFactory.createOperation();
                             operation.setName(getString(reader, NAME));
                             operation.setUnresolved(true);
                             if (callback != null) {
@@ -241,7 +241,7 @@
                         } else if (IMPLEMENTATION_COMPOSITE_QNAME.equals(name)) {
                             
                             // Read an implementation.composite
-                            Composite implementation = factory.createComposite();
+                            Composite implementation = assemblyFactory.createComposite();
                             implementation.setName(getQName(reader, NAME));
                             implementation.setUnresolved(true);
                             component.setImplementation(implementation);
@@ -486,7 +486,7 @@
     public void wire(Composite composite) throws ContributionWireException {
         
         // Process the composite configuration
-        CompositeUtil compositeUtil = new CompositeUtil(factory, interfaceContractMapper);
+        CompositeUtil compositeUtil = new CompositeUtil(assemblyFactory, interfaceContractMapper);
 
         List<Base> problems = new ArrayList<Base>() {
             private static final long serialVersionUID = 4819831446590718923L;
@@ -547,7 +547,7 @@
         ComponentReference promoted = null;
         if (value != null) {
             for (StringTokenizer tokens = new StringTokenizer(value); tokens.hasMoreTokens();) {
-                promoted = factory.createComponentReference();
+                promoted = assemblyFactory.createComponentReference();
                 promoted.setUnresolved(true);
                 promoted.setName(tokens.nextToken());
                 reference.getPromotedReferences().add(promoted);

Modified: incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ConstrainingTypeProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ConstrainingTypeProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ConstrainingTypeProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/assembly/xml/ConstrainingTypeProcessor.java Sat Apr 28 16:52:22 2007
@@ -80,14 +80,14 @@
                         
                         // Read a <constrainingType>
                         if (Constants.CONSTRAINING_TYPE_QNAME.equals(name)) {
-                            constrainingType = factory.createConstrainingType();
+                            constrainingType = assemblyFactory.createConstrainingType();
                             constrainingType.setName(new QName(getString(reader, TARGET_NAMESPACE), getString(reader, NAME)));
                             readIntents(constrainingType, reader);
     
                         } else if (Constants.SERVICE_QNAME.equals(name)) {
                             
                             // Read a <service>
-                            abstractService = factory.createAbstractService();
+                            abstractService = assemblyFactory.createAbstractService();
                             abstractContract = abstractService;
                             abstractService.setName(getString(reader, Constants.NAME));
                             constrainingType.getServices().add(abstractService);
@@ -96,7 +96,7 @@
                         } else if (Constants.REFERENCE_QNAME.equals(name)) {
                             
                             // Read a <reference>
-                            abstractReference = factory.createAbstractReference();
+                            abstractReference = assemblyFactory.createAbstractReference();
                             abstractContract = abstractReference;
                             abstractReference.setName(getString(reader, Constants.NAME));
                             readMultiplicity(abstractReference, reader);
@@ -106,7 +106,7 @@
                         } else if (Constants.PROPERTY_QNAME.equals(name)) {
                             
                             // Read a <property>
-                            abstractProperty = factory.createAbstractProperty();
+                            abstractProperty = assemblyFactory.createAbstractProperty();
                             readAbstractProperty(abstractProperty, reader);
                             constrainingType.getProperties().add(abstractProperty);
                             readIntents(abstractProperty, reader);
@@ -114,7 +114,7 @@
                         } else if (OPERATION.equals(name)) {
     
                             // Read an <operation>
-                            Operation operation = factory.createOperation();
+                            Operation operation = assemblyFactory.createOperation();
                             operation.setName(getString(reader, NAME));
                             operation.setUnresolved(true);
                             readIntents(abstractContract, operation, reader);

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractPropertyImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractPropertyImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractPropertyImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractPropertyImpl.java Sat Apr 28 16:52:22 2007
@@ -44,14 +44,14 @@
     /**
      * Constructs a new abstract property.
      */
-    public AbstractPropertyImpl() {
+    protected AbstractPropertyImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public AbstractPropertyImpl(AbstractProperty other) {
+    protected AbstractPropertyImpl(AbstractProperty other) {
         super(other);
         value = other.getValue();
         many = other.isMany();

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractReferenceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractReferenceImpl.java Sat Apr 28 16:52:22 2007
@@ -32,14 +32,14 @@
     /**
      * Constructs a new abstract reference.
      */
-    public AbstractReferenceImpl() {
+    protected AbstractReferenceImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public AbstractReferenceImpl(AbstractReference other) {
+    protected AbstractReferenceImpl(AbstractReference other) {
         super(other);
         multiplicity = other.getMultiplicity();
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractServiceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/AbstractServiceImpl.java Sat Apr 28 16:52:22 2007
@@ -30,14 +30,14 @@
     /**
      * Constructs a new abstract service.
      */
-    public AbstractServiceImpl() {
+    protected AbstractServiceImpl() {
     }
     
     /**
      * Copy constructor.
      * @param service
      */
-    public AbstractServiceImpl(AbstractService other) {
+    protected AbstractServiceImpl(AbstractService other) {
         super(other);
     }
 

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BaseImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BaseImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BaseImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BaseImpl.java Sat Apr 28 16:52:22 2007
@@ -37,14 +37,14 @@
     /**
      * Constructs a new base model object.
      */
-    public BaseImpl() {
+    protected BaseImpl() {
     }
 
     /**
      * Copy constructor
      * @param other
      */
-    public BaseImpl(Base other) {
+    protected BaseImpl(Base other) {
         unresolved = other.isUnresolved();
         extensions.addAll(other.getExtensions());
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BindingImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/BindingImpl.java Sat Apr 28 16:52:22 2007
@@ -35,6 +35,9 @@
     private String uri;
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private List<Intent> requiredIntents = new ArrayList<Intent>();
+    
+    protected BindingImpl() {
+    }
 
     public String getName() {
         return name;

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CallbackImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CallbackImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CallbackImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CallbackImpl.java Sat Apr 28 16:52:22 2007
@@ -37,6 +37,9 @@
     private List<Binding> bindings = new ArrayList<Binding>();
     private List<PolicySet> policySets = new ArrayList<PolicySet>();
     private List<Intent> requiredIntents = new ArrayList<Intent>();
+    
+    protected CallbackImpl() {
+    }
 
     public List<Binding> getBindings() {
         return bindings;

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentImpl.java Sat Apr 28 16:52:22 2007
@@ -27,7 +27,6 @@
 import org.apache.tuscany.assembly.ComponentService;
 import org.apache.tuscany.assembly.ConstrainingType;
 import org.apache.tuscany.assembly.Implementation;
-import org.apache.tuscany.assembly.util.Visitable;
 import org.apache.tuscany.assembly.util.Visitor;
 import org.apache.tuscany.policy.Intent;
 import org.apache.tuscany.policy.PolicySet;
@@ -51,10 +50,10 @@
     /**
      * Constructs a new component.
      */
-    public ComponentImpl() {
+    protected ComponentImpl() {
     }
     
-    public ComponentImpl(Component other) {
+    protected ComponentImpl(Component other) {
         super(other);
         
         // Copy ComponentImpl attributes

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentPropertyImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentPropertyImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentPropertyImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentPropertyImpl.java Sat Apr 28 16:52:22 2007
@@ -31,32 +31,32 @@
     private String file;
     private Property property;
     private String source;
-
-    public Object getValue() {
-        if (super.getValue() == null && property != null) {
-            return property.getValue();
-        } else {
-            return super.getValue();
-        }
-    }
- 
+    
     /**
      * Constructs a new component property.
      */
-    public ComponentPropertyImpl() {
+    protected ComponentPropertyImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public ComponentPropertyImpl(ComponentProperty other) {
+    protected ComponentPropertyImpl(ComponentProperty other) {
         super(other);
         file = other.getFile();
         property = other.getProperty();
         source = other.getSource();
     }
 
+    public Object getValue() {
+        if (super.getValue() == null && property != null) {
+            return property.getValue();
+        } else {
+            return super.getValue();
+        }
+    }
+ 
     public String getFile() {
         return file;
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentReferenceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentReferenceImpl.java Sat Apr 28 16:52:22 2007
@@ -39,14 +39,14 @@
     /**
      * Constructs a new component reference.
      */
-    public ComponentReferenceImpl() {
+    protected ComponentReferenceImpl() {
     }
 
     /**
      * Copy constructor.
      * @param other
      */
-    public ComponentReferenceImpl(ComponentReference other) {
+    protected ComponentReferenceImpl(ComponentReference other) {
         super(other);
         reference = other.getReference();
         autowire = other.isAutowire();

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentServiceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentServiceImpl.java Sat Apr 28 16:52:22 2007
@@ -38,14 +38,14 @@
     /**
      * Constructs a new component service.
      */
-    public ComponentServiceImpl() {
+    protected ComponentServiceImpl() {
     }
 
     /**
      * Copy constructor.
      * @param other
      */
-    public ComponentServiceImpl(ComponentService other) {
+    protected ComponentServiceImpl(ComponentService other) {
         super(other);
         service = other.getService();
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentTypeImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentTypeImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ComponentTypeImpl.java Sat Apr 28 16:52:22 2007
@@ -47,14 +47,14 @@
     /**
      * Constructs a new component type.
      */
-    public ComponentTypeImpl() {
+    protected ComponentTypeImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public ComponentTypeImpl(ComponentType other) {
+    protected ComponentTypeImpl(ComponentType other) {
         super(other);
         uri = other.getURI();
         constrainingType = other.getConstrainingType();

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeImpl.java Sat Apr 28 16:52:22 2007
@@ -45,14 +45,14 @@
     /**
      * Constructs a new composite.
      */
-    public CompositeImpl() {
+    protected CompositeImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public CompositeImpl(Composite other) {
+    protected CompositeImpl(Composite other) {
         
         // Copy BaseImpl attributes
         setUnresolved(other.isUnresolved());

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeReferenceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeReferenceImpl.java Sat Apr 28 16:52:22 2007
@@ -36,14 +36,14 @@
     /**
      * Constructs a new composite reference.
      */
-    public CompositeReferenceImpl() {
+    protected CompositeReferenceImpl() {
     }
 
     /**
      * Copy constructor.
      * @param other
      */
-    public CompositeReferenceImpl(CompositeReference other) {
+    protected CompositeReferenceImpl(CompositeReference other) {
         super(other);
         promotedReferences.addAll(other.getPromotedReferences());
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeServiceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/CompositeServiceImpl.java Sat Apr 28 16:52:22 2007
@@ -33,14 +33,14 @@
     /**
      * Constructs a new composite service.
      */
-    public CompositeServiceImpl() {
+    protected CompositeServiceImpl() {
     }
 
     /**
      * Copy constructor.
      * @param other
      */
-    public CompositeServiceImpl(CompositeService other) {
+    protected CompositeServiceImpl(CompositeService other) {
         super(other);
         promotedService = other.getPromotedService();
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ConstrainingTypeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ConstrainingTypeImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ConstrainingTypeImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ConstrainingTypeImpl.java Sat Apr 28 16:52:22 2007
@@ -41,6 +41,12 @@
     private List<AbstractReference> references = new ArrayList<AbstractReference>();
     private List<AbstractService> services = new ArrayList<AbstractService>();
     private List<Intent> requiredIntents = new ArrayList<Intent>();
+    
+    /**
+     * Constructs a new ConstrainingType
+     */
+    protected ConstrainingTypeImpl() {
+    }
 
     public QName getName() {
         return name;

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ContractImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ContractImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ContractImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ContractImpl.java Sat Apr 28 16:52:22 2007
@@ -33,7 +33,7 @@
     /**
      * Constructs a new contract.
      */
-    public ContractImpl() {
+    protected ContractImpl() {
     }
     
     /**

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/PropertyImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/PropertyImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/PropertyImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/PropertyImpl.java Sat Apr 28 16:52:22 2007
@@ -36,13 +36,13 @@
     /**
      * Constructs a new property.
      */
-    public PropertyImpl() {
+    protected PropertyImpl() {
     }
     
     /**
      * Copy constructor.
      */
-    public PropertyImpl(Property other) {
+    protected PropertyImpl(Property other) {
         super(other);
         policySets.addAll(other.getPolicySets());
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ReferenceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ReferenceImpl.java Sat Apr 28 16:52:22 2007
@@ -43,14 +43,14 @@
     /**
      * Constructs a new reference.
      */
-    public ReferenceImpl() {
+    protected ReferenceImpl() {
     }
     
     /**
      * Copy constructor.
      * @param reference
      */
-    public ReferenceImpl(Reference other) {
+    protected ReferenceImpl(Reference other) {
         super(other);
         bindings.addAll(other.getBindings());
         wiredByImpl = other.isWiredByImpl();

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/SCABindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/SCABindingImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/SCABindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/SCABindingImpl.java Sat Apr 28 16:52:22 2007
@@ -30,6 +30,12 @@
     
     private Component component;
     
+    /**
+     * Constructs a new SCA binding.
+     */
+    protected SCABindingImpl() {
+    }
+    
     public Component getComponent() {
         return component;
     }

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ServiceImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/ServiceImpl.java Sat Apr 28 16:52:22 2007
@@ -40,14 +40,14 @@
     /**
      * Constructs a new service.
      */
-    public ServiceImpl() {
+    protected ServiceImpl() {
     }
     
     /**
      * Copy constructor.
      * @param other
      */
-    public ServiceImpl(Service other) {
+    protected ServiceImpl(Service other) {
         super(other);
         bindings.addAll(other.getBindings());
         policySets.addAll(other.getPolicySets());

Modified: incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/WireImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/WireImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/WireImpl.java (original)
+++ incubator/tuscany/java/sca/modules/assembly/src/main/java/org/apache/tuscany/assembly/impl/WireImpl.java Sat Apr 28 16:52:22 2007
@@ -41,14 +41,14 @@
     /**
      * Constructs a new wire.
      */
-    public WireImpl() {
+    protected WireImpl() {
     }
 
     /**
      * Copy constructor.
      * @param wire
      */
-    public WireImpl(Wire other) {
+    protected WireImpl(Wire other) {
         super(other);
         source = other.getSource();
         target = other.getTarget();

Added: incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java?view=auto&rev=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java (added)
+++ incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java Sat Apr 28 16:52:22 2007
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.assembly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.assembly.util.CompositeUtil;
+import org.apache.tuscany.interfacedef.impl.DefaultInterfaceContractMapper;
+
+import junit.framework.TestCase;
+
+public class CompositeUtilTestCase extends TestCase {
+    
+    private CompositeUtil compositeUtil;
+    private AssemblyFactory factory;
+    private List<Base> problems;
+    
+    protected void setUp() throws Exception {
+        factory = new DefaultAssemblyFactory();
+        compositeUtil = new CompositeUtil(factory, new DefaultInterfaceContractMapper());
+        problems = new ArrayList<Base>();
+    }
+    
+    protected void tearDown() throws Exception {
+        compositeUtil = null;
+        factory = null;
+        problems = null;
+    }
+    
+    public void testFuseIncludes() {
+        Composite c1 = factory.createComposite();
+        c1.setName(new QName("http://foo", "C1"));
+        Component a = factory.createComponent();
+        a.setName("a");
+        c1.getComponents().add(a);
+        CompositeService s = factory.createCompositeService();
+        s.setName("s");
+        c1.getServices().add(s);
+        CompositeReference r = factory.createCompositeReference();
+        r.setName("r");
+        c1.getReferences().add(r);
+
+        Composite c2 = factory.createComposite();
+        c2.setName(new QName("http://foo", "C2"));
+        c1.getIncludes().add(c2);
+        Component b = factory.createComponent();
+        b.setName("b");
+        c2.getComponents().add(b);
+        
+        Composite c = factory.createComposite();
+        c.setName(new QName("http://foo", "C"));
+        c.getIncludes().add(c1);
+        
+        compositeUtil.fuseIncludes(c, problems);
+        
+        assertTrue(c.getComponents().get(0).getName().equals("a"));
+        assertTrue(c.getComponents().get(1).getName().equals("b"));
+        assertTrue(c.getServices().get(0).getName().equals("s"));
+        assertTrue(c.getReferences().get(0).getName().equals("r"));
+    }
+    
+    public void testExpandComposites() {
+        Composite c1 = factory.createComposite();
+        c1.setName(new QName("http://foo", "C1"));
+        Component a = factory.createComponent();
+        a.setName("a");
+        c1.getComponents().add(a);
+        CompositeService s = factory.createCompositeService();
+        s.setName("s");
+        c1.getServices().add(s);
+        CompositeReference r = factory.createCompositeReference();
+        r.setName("r");
+        c1.getReferences().add(r);
+
+        Composite c2 = factory.createComposite();
+        c2.setName(new QName("http://foo", "C2"));
+        Component b = factory.createComponent();
+        b.setName("b");
+        c2.getComponents().add(b);
+        
+        Composite c = factory.createComposite();
+        c.setName(new QName("http://foo", "C"));
+        Component x = factory.createComponent();
+        x.setName("x");
+        x.setImplementation(c1);
+        c.getComponents().add(x);
+        Component y = factory.createComponent();
+        y.setName("y");
+        y.setImplementation(c2);
+        c.getComponents().add(y);
+        Component z = factory.createComponent();
+        z.setName("z");
+        z.setImplementation(c1);
+        c.getComponents().add(z);
+        
+        compositeUtil.expandComposites(c, problems);
+        
+        assertTrue(c.getComponents().get(0).getImplementation() != c1);
+        assertTrue(c.getComponents().get(1).getImplementation() != c2);
+        assertTrue(c.getComponents().get(2).getImplementation() != c1);
+
+        Composite i = (Composite)c.getComponents().get(0).getImplementation();
+        assertTrue(i.getComponents().get(0) != a);
+        assertTrue(i.getComponents().get(0).getName().equals("a"));
+        assertTrue(i.getServices().get(0).getName().equals("s"));
+        assertTrue(i.getServices().get(0) != s);
+        assertTrue(i.getReferences().get(0).getName().equals("r"));
+        assertTrue(i.getReferences().get(0) != r);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/assembly/src/test/java/org/apache/tuscany/assembly/CompositeUtilTestCase.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -21,10 +21,15 @@
 
 import java.util.Map;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.binding.rmi.impl.DefaultRMIBindingFactory;
 import org.apache.tuscany.binding.rmi.xml.RMIBindingProcessor;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
+import org.apache.tuscany.policy.PolicyFactory;
+import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 import org.apache.tuscany.rmi.DefaultRMIHostExtensionPoint;
 import org.apache.tuscany.rmi.RMIHostExtensionPoint;
 import org.apache.tuscany.spi.builder.BuilderRegistry;
@@ -37,7 +42,11 @@
 
         StAXArtifactProcessorExtensionPoint artifactProcessorRegistry = 
             extensionPointRegistry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        artifactProcessorRegistry.addExtension(new RMIBindingProcessor());
+        RMIBindingFactory rmiFactory = new DefaultRMIBindingFactory();
+        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
+        PolicyFactory policyFactory = new DefaultPolicyFactory();
+        artifactProcessorRegistry.addExtension(
+                                               new RMIBindingProcessor(assemblyFactory, policyFactory, rmiFactory));
 
         RMIHostExtensionPoint rmiHost = 
             extensionPointRegistry.getExtensionPoint(RMIHostExtensionPoint.class);

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/impl/RMIBindingImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/impl/RMIBindingImpl.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/impl/RMIBindingImpl.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/impl/RMIBindingImpl.java Sat Apr 28 16:52:22 2007
@@ -27,10 +27,11 @@
  */
 public class RMIBindingImpl extends BindingImpl implements RMIBinding, RMIBindingConstants {
     private String host;
-
     private String port;
-
     private String serviceName;
+    
+    protected RMIBindingImpl() {
+    }
 
     public String getURI() {
         return host + COLON + port + serviceName;

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/xml/RMIBindingProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/xml/RMIBindingProcessor.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/xml/RMIBindingProcessor.java (original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/binding/rmi/xml/RMIBindingProcessor.java Sat Apr 28 16:52:22 2007
@@ -27,13 +27,11 @@
 import javax.xml.stream.XMLStreamWriter;
 
 import org.apache.tuscany.assembly.AssemblyFactory;
-import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
 import org.apache.tuscany.assembly.xml.BaseArtifactProcessor;
 import org.apache.tuscany.assembly.xml.Constants;
 import org.apache.tuscany.binding.rmi.RMIBinding;
 import org.apache.tuscany.binding.rmi.RMIBindingConstants;
 import org.apache.tuscany.binding.rmi.RMIBindingFactory;
-import org.apache.tuscany.binding.rmi.impl.DefaultRMIBindingFactory;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtension;
 import org.apache.tuscany.contribution.resolver.ArtifactResolver;
 import org.apache.tuscany.contribution.service.ContributionReadException;
@@ -41,7 +39,6 @@
 import org.apache.tuscany.contribution.service.ContributionWireException;
 import org.apache.tuscany.contribution.service.ContributionWriteException;
 import org.apache.tuscany.policy.PolicyFactory;
-import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 
 public class RMIBindingProcessor extends BaseArtifactProcessor implements
     StAXArtifactProcessorExtension<RMIBinding>, RMIBindingConstants {
@@ -53,12 +50,6 @@
                                RMIBindingFactory rmiBindingFactory) {
         super(assemblyFactory, policyFactory, null);
         this.rmiBindingFactory = rmiBindingFactory;
-    }
-
-    public RMIBindingProcessor() {
-        this(new DefaultAssemblyFactory(), new DefaultPolicyFactory(),
-             new DefaultRMIBindingFactory());
-
     }
 
     public RMIBinding read(XMLStreamReader reader) throws ContributionReadException {

Modified: incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ModuleActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ModuleActivator.java?view=diff&rev=533445&r1=533444&r2=533445
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ModuleActivator.java (original)
+++ incubator/tuscany/java/sca/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ModuleActivator.java Sat Apr 28 16:52:22 2007
@@ -21,11 +21,21 @@
 
 import java.util.Map;
 
+import org.apache.tuscany.assembly.AssemblyFactory;
+import org.apache.tuscany.assembly.impl.DefaultAssemblyFactory;
+import org.apache.tuscany.binding.ws.WebServiceBindingFactory;
+import org.apache.tuscany.binding.ws.impl.DefaultWebServiceBindingFactory;
 import org.apache.tuscany.binding.ws.xml.WebServiceBindingProcessor;
 import org.apache.tuscany.contribution.processor.StAXArtifactProcessorExtensionPoint;
 import org.apache.tuscany.core.ExtensionPointRegistry;
 import org.apache.tuscany.core.ModuleActivator;
 import org.apache.tuscany.http.ServletHostExtensionPoint;
+import org.apache.tuscany.interfacedef.wsdl.WSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.impl.DefaultWSDLFactory;
+import org.apache.tuscany.interfacedef.wsdl.introspect.DefaultWSDLInterfaceIntrospector;
+import org.apache.tuscany.interfacedef.wsdl.introspect.WSDLInterfaceIntrospector;
+import org.apache.tuscany.policy.PolicyFactory;
+import org.apache.tuscany.policy.impl.DefaultPolicyFactory;
 import org.apache.tuscany.spi.builder.BuilderRegistry;
 
 public class Axis2ModuleActivator implements ModuleActivator {
@@ -35,7 +45,14 @@
     public void start(ExtensionPointRegistry extensionPointRegistry) {
 
         StAXArtifactProcessorExtensionPoint artifactProcessorRegistry = extensionPointRegistry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-        artifactProcessorRegistry.addExtension(new WebServiceBindingProcessor());
+        AssemblyFactory assemblyFactory = new DefaultAssemblyFactory();
+        PolicyFactory policyFactory = new DefaultPolicyFactory();
+        WebServiceBindingFactory wsFactory = new DefaultWebServiceBindingFactory();
+        WSDLFactory wsdlFactory = new DefaultWSDLFactory();
+        WSDLInterfaceIntrospector introspector = new DefaultWSDLInterfaceIntrospector(wsdlFactory);
+        artifactProcessorRegistry.addExtension(new WebServiceBindingProcessor(
+                                                                              assemblyFactory, policyFactory, wsFactory,
+                                                                              wsdlFactory, introspector));
 
         ServletHostExtensionPoint servletHost = extensionPointRegistry.getExtensionPoint(ServletHostExtensionPoint.class);
         



---------------------------------------------------------------------
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