summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-06 08:32:38 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2008-10-06 08:32:38 +0000
commit9fb2fb275d3f69a287ac4f1c7d55190fb7a7bb3b (patch)
tree40a3b6e43c677e8e9321921b95668eba4c75163a /branches/sca-equinox/modules
parent4f6fd64d654fec9afb231dd41af9c7d6e41d382f (diff)
Work in progress. Started to clean up cross-bundle dependencies on ContributionService implementation class, the various CompositeBuilder implementation classes and the ContributionDependencyBuilder implementation class. Added extension points for ContributionBuilders and CompositeBuilders to have them discovered and loaded by the Equinox ServiceDiscovery like other extension points. Moved injection of monitors and SCA definitions to the build methods instead of the constructors to remove references to these implementation constructors. Simplified NodeImpl a bit to remove references to other runtime implementation classes.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@702000 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules')
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java8
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java4
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java8
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java10
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java8
-rw-r--r--branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteNamespacesTestCase.java4
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java13
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilderExtensionPoint.java51
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java145
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultEndpointBuilder.java4
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/EndpointBuilder.java4
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java287
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java94
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java20
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java17
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java17
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java13
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java18
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java8
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java73
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java21
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java90
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java9
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java33
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java13
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java13
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java8
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java13
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java17
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java8
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java8
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java17
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder35
-rw-r--r--branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint18
-rw-r--r--branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java4
-rw-r--r--branches/sca-equinox/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingProviderFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataBindingProviderFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-gdata-runtime/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GDataBindingProviderFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingProviderFactory.java4
-rw-r--r--branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java4
-rw-r--r--branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java4
-rw-r--r--branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java6
-rw-r--r--branches/sca-equinox/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java8
-rw-r--r--branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCABindingProviderFactory.java2
-rw-r--r--branches/sca-equinox/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java8
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/basic/Axis2BasicAuthenticationPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java6
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java4
-rw-r--r--branches/sca-equinox/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java10
-rw-r--r--branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java6
-rw-r--r--branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java6
-rw-r--r--branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java6
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportListener.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java4
-rw-r--r--branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java4
-rw-r--r--branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ArtifactModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java4
-rw-r--r--branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java7
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java5
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java22
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java18
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java10
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java10
-rw-r--r--branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java10
-rw-r--r--branches/sca-equinox/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java4
-rw-r--r--branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java4
-rw-r--r--branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java4
-rw-r--r--branches/sca-equinox/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java4
-rw-r--r--branches/sca-equinox/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java4
-rw-r--r--branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java53
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java6
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java44
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java16
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployedCompositeCollectionImpl.java6
-rw-r--r--branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java4
-rw-r--r--branches/sca-equinox/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java13
-rw-r--r--branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java (renamed from branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java)9
-rw-r--r--branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/FactoryExtensionPoint.java (renamed from branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/ModelFactoryExtensionPoint.java)4
-rw-r--r--branches/sca-equinox/modules/extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.FactoryExtensionPoint (renamed from branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint)2
-rw-r--r--branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java3
-rw-r--r--branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java6
-rw-r--r--branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java6
-rw-r--r--branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java6
-rw-r--r--branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java4
-rw-r--r--branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELFactoryImpl.java4
-rw-r--r--branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-ejb/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java8
-rw-r--r--branches/sca-equinox/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java4
-rw-r--r--branches/sca-equinox/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java12
-rw-r--r--branches/sca-equinox/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementationActivator.java4
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java41
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder18
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java43
-rw-r--r--branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java8
-rw-r--r--branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationFactoryImpl.java4
-rw-r--r--branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationFactory.java4
-rw-r--r--branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java4
-rw-r--r--branches/sca-equinox/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java4
-rw-r--r--branches/sca-equinox/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java9
-rw-r--r--branches/sca-equinox/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java6
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java9
-rw-r--r--branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/DefaultWSDLFactory.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLFactoryImpl.java4
-rw-r--r--branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java4
-rw-r--r--branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java491
-rw-r--r--branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java157
-rw-r--r--branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java67
-rw-r--r--branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java22
-rw-r--r--branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/jsr250/JSR250Activator.java4
-rw-r--r--branches/sca-equinox/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java43
-rw-r--r--branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java8
-rw-r--r--branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java8
-rw-r--r--branches/sca-equinox/modules/workspace-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilder18
-rw-r--r--branches/sca-equinox/modules/workspace-impl/src/test/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderTestCase.java7
-rw-r--r--branches/sca-equinox/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java4
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilder.java (renamed from branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionDependencyBuilder.java)23
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderException.java45
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderExtensionPoint.java51
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/DefaultContributionBuilderExtensionPoint.java139
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java5
-rw-r--r--branches/sca-equinox/modules/workspace/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint18
-rw-r--r--branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessor.java4
-rw-r--r--branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java4
-rw-r--r--branches/sca-equinox/modules/xsd-xml/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java4
188 files changed, 1806 insertions, 1277 deletions
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java
index b07c91d1b3..55ce667256 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeDocumentProcessor.java
@@ -31,13 +31,13 @@ import javax.xml.stream.XMLStreamReader;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.monitor.Monitor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A componentType processor.
@@ -65,7 +65,7 @@ public class ComponentTypeDocumentProcessor extends BaseAssemblyProcessor implem
* @param modelFactories
* @param staxProcessor
*/
- public ComponentTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ComponentTypeDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor staxProcessor,
Monitor monitor) {
super(null, null, staxProcessor, monitor);
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
index d0d11cd02b..166bba8757 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeModelResolver.java
@@ -25,9 +25,9 @@ import java.util.Map;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A Model Resolver for ComponentType models.
@@ -38,7 +38,7 @@ public class ComponentTypeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<String, ComponentType> map = new HashMap<String, ComponentType>();
- public ComponentTypeModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public ComponentTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
}
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
index 9727b89aab..7fc43c6fe5 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ComponentTypeProcessor.java
@@ -36,13 +36,13 @@ import org.apache.tuscany.sca.assembly.Extensible;
import org.apache.tuscany.sca.assembly.Property;
import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.Service;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.OperationImpl;
@@ -76,7 +76,7 @@ public class ComponentTypeProcessor extends BaseAssemblyProcessor implements StA
* @param modelFactories
* @param extensionProcessor
*/
- public ComponentTypeProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ComponentTypeProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor) {
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
index bc74773d85..2469281131 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeDocumentProcessor.java
@@ -37,13 +37,13 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.PolicySet;
@@ -97,7 +97,7 @@ public class CompositeDocumentProcessor extends BaseAssemblyProcessor implements
* @param modelFactories
* @param staxProcessor
*/
- public CompositeDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public CompositeDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor staxProcessor, Monitor monitor) {
super(null, null, staxProcessor, monitor);
this.inputFactory = modelFactories.getFactory(ValidatingXMLInputFactory.class);
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
index 72744259f6..62ed95cb01 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeModelResolver.java
@@ -27,9 +27,9 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A Model Resolver for Composite models.
@@ -41,7 +41,7 @@ public class CompositeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<QName, Composite> map = new HashMap<QName, Composite>();
- public CompositeModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public CompositeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
}
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
index 09ec7664ce..0a98b8235a 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/CompositeProcessor.java
@@ -57,7 +57,6 @@ import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.Wire;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
@@ -66,6 +65,7 @@ import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -117,7 +117,7 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
* @param extensionProcessor
* @param monitor
*/
- private CompositeProcessor(ModelFactoryExtensionPoint modelFactories,
+ private CompositeProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor extensionProcessor,
StAXAttributeProcessor extensionAttributeProcessor,
Monitor monitor) {
@@ -1195,8 +1195,8 @@ public class CompositeProcessor extends BaseAssemblyProcessor implements StAXArt
* @param extensionPoints
* @return
*/
- private static ModelFactoryExtensionPoint modelFactories(ExtensionPointRegistry extensionPoints) {
- return extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ private static FactoryExtensionPoint modelFactories(ExtensionPointRegistry extensionPoints) {
+ return extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
}
/**
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java
index aa4980fcb6..aa1135ef13 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConfiguredOperationProcessor.java
@@ -28,12 +28,12 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ConfiguredOperation;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.policy.PolicyFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -49,7 +49,7 @@ public class ConfiguredOperationProcessor implements StAXArtifactProcessor<Confi
private PolicyFactory policyFactory;
private Monitor monitor;
- public ConfiguredOperationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ConfiguredOperationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java
index 4c5d6f8f49..3900a2663b 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeDocumentProcessor.java
@@ -30,13 +30,13 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -65,7 +65,7 @@ public class ConstrainingTypeDocumentProcessor extends BaseAssemblyProcessor imp
* @param modelFactories
* @param staxProcessor
*/
- public ConstrainingTypeDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ConstrainingTypeDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor staxProcessor,
Monitor monitor) {
super(null, null, staxProcessor, monitor);
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
index 7dd95e3944..d73ce5ab66 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeModelResolver.java
@@ -27,9 +27,9 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A Model Resolver for ConstrainingType models.
@@ -41,7 +41,7 @@ public class ConstrainingTypeModelResolver implements ModelResolver {
private Contribution contribution;
private Map<QName, ConstrainingType> map = new HashMap<QName, ConstrainingType>();
- public ConstrainingTypeModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public ConstrainingTypeModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
}
diff --git a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java
index 334b6c6b97..a1414aaa2a 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/ConstrainingTypeProcessor.java
@@ -33,12 +33,12 @@ import org.apache.tuscany.sca.assembly.AbstractReference;
import org.apache.tuscany.sca.assembly.AbstractService;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.impl.OperationImpl;
@@ -70,7 +70,7 @@ public class ConstrainingTypeProcessor extends BaseAssemblyProcessor implements
* @param modelFactories
* @param extensionProcessor
*/
- public ConstrainingTypeProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ConstrainingTypeProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor extensionProcessor,
Monitor monitor) {
super(modelFactories.getFactory(AssemblyFactory.class),
diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java
index cb99113fe0..6e9fc28cef 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/BuildPolicyTestCase.java
@@ -35,7 +35,6 @@ import org.apache.tuscany.sca.assembly.OperationsConfigurator;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultURLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -44,6 +43,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensi
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -70,7 +70,7 @@ public class BuildPolicyTestCase extends TestCase {
@Override
public void setUp() throws Exception {
DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
@@ -83,7 +83,7 @@ public class BuildPolicyTestCase extends TestCase {
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, monitor);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
URLArtifactProcessorExtensionPoint documentProcessors = new DefaultURLArtifactProcessorExtensionPoint(extensionPoints);
documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
@@ -111,7 +111,7 @@ public class BuildPolicyTestCase extends TestCase {
documentProcessor.resolve(definitions, resolver);
documentProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, monitor);
}
public void testPolicyIntentInheritance() throws Exception {
diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java
index e316babb2d..76c5ce7839 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WireTestCase.java
@@ -34,7 +34,6 @@ import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -43,6 +42,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensi
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -76,14 +76,14 @@ public class WireTestCase extends TestCase {
MonitorFactory monitorFactory = new DefaultMonitorFactory();
monitor = monitorFactory.createMonitor();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, monitor);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
@@ -111,7 +111,7 @@ public class WireTestCase extends TestCase {
policyDefinitionsProcessor.resolve(scaDefns, resolver);
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, monitor);
assertEquals(composite.getConstrainingType(), constrainingType);
assertEquals(composite.getComponents().get(0).getConstrainingType(), constrainingType);
@@ -138,7 +138,7 @@ public class WireTestCase extends TestCase {
policyDefinitionsProcessor.resolve(scaDefns, resolver);
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, monitor);
assertEquals(composite.getComponents().get(2).getImplementation(), nestedComposite);
}
diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java
index eb49d7dcd1..ce08121afa 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteAllTestCase.java
@@ -38,7 +38,6 @@ import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -46,6 +45,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensi
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -77,7 +77,7 @@ public class WriteAllTestCase extends TestCase {
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
resolver = new DefaultModelResolver();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = new TestSCABindingFactoryImpl();
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
@@ -88,7 +88,7 @@ public class WriteAllTestCase extends TestCase {
MonitorFactory monitorFactory = new DefaultMonitorFactory();
monitor = monitorFactory.createMonitor();
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, monitor);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
@@ -126,7 +126,7 @@ public class WriteAllTestCase extends TestCase {
policyDefinitionsProcessor.resolve(scaDefns, resolver);
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, monitor);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
staxProcessor.write(composite, bos);
}
diff --git a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteNamespacesTestCase.java b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteNamespacesTestCase.java
index 5188b1c91a..bfa8c96f6a 100644
--- a/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteNamespacesTestCase.java
+++ b/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/WriteNamespacesTestCase.java
@@ -33,11 +33,11 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* Test writing SCA XML assemblies.
@@ -52,7 +52,7 @@ public class WriteNamespacesTestCase extends TestCase {
@Override
public void setUp() throws Exception {
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
//outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
inputFactory = modelFactories.getFactory(XMLInputFactory.class);
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java
index cf38894702..0d4f091b1e 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilder.java
@@ -20,6 +20,8 @@
package org.apache.tuscany.sca.assembly.builder;
import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A builder that handles the configuration of the components inside a
@@ -28,13 +30,22 @@ import org.apache.tuscany.sca.assembly.Composite;
* @version $Rev$ $Date$
*/
public interface CompositeBuilder {
+
+ /**
+ * Returns the ID of the builder.
+ *
+ * @return
+ */
+ String getID();
/**
* Build a composite.
*
* @param composite
+ * @param definitions
+ * @param monitor
* @throws CompositeBuilderException
*/
- void build(Composite composite) throws CompositeBuilderException;
+ void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException;
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilderExtensionPoint.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilderExtensionPoint.java
new file mode 100644
index 0000000000..a2d6b34db5
--- /dev/null
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/CompositeBuilderExtensionPoint.java
@@ -0,0 +1,51 @@
+/*
+ * 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.sca.assembly.builder;
+
+/**
+ * An extension point for Composite builders.
+ *
+ * @version $Rev: $ $Date: $
+ */
+public interface CompositeBuilderExtensionPoint {
+
+ /**
+ * Adds a composite builder.
+ *
+ * @param compositeBuilder
+ */
+ void addCompositeBuilder(CompositeBuilder compositeBuilder);
+
+ /**
+ * Removes a composite builder.
+ *
+ * @param compositeBuilder
+ */
+ void removeCompositeBuilder(CompositeBuilder compositeBuilder);
+
+ /**
+ * Returns the composite builder with the given id.
+ *
+ * @param id
+ * @return
+ */
+ CompositeBuilder getCompositeBuilder(String id);
+
+}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java
new file mode 100644
index 0000000000..46b6769e6e
--- /dev/null
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultCompositeBuilderExtensionPoint.java
@@ -0,0 +1,145 @@
+/*
+ * 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.sca.assembly.builder;
+
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.UtilityExtensionPoint;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
+import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ * Default implementation of a provider factory extension point.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultCompositeBuilderExtensionPoint implements CompositeBuilderExtensionPoint {
+
+ private ExtensionPointRegistry registry;
+ private final Map<String, CompositeBuilder> builders = new HashMap<String, CompositeBuilder>();
+ private boolean loaded;
+
+ public DefaultCompositeBuilderExtensionPoint(ExtensionPointRegistry registry) {
+ this.registry = registry;
+ }
+
+ public void addCompositeBuilder(CompositeBuilder builder) {
+ builders.put(builder.getID(), builder);
+ }
+
+ public void removeCompositeBuilder(CompositeBuilder builder) {
+ builders.remove(builder.getID());
+ }
+
+ public CompositeBuilder getCompositeBuilder(String id) {
+ loadBuilders();
+ return builders.get(id);
+ }
+
+ /**
+ * Load builders declared under META-INF/services.
+ */
+ private void loadBuilders() {
+ if (loaded)
+ return;
+
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+
+ UtilityExtensionPoint utils = registry.getExtensionPoint(UtilityExtensionPoint.class);
+ InterfaceContractMapper mapper = utils.getUtility(InterfaceContractMapper.class);
+
+ // Get the provider factory service declarations
+ Set<ServiceDeclaration> builderDeclarations;
+ ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
+ try {
+ builderDeclarations = serviceDiscovery.getServiceDeclarations(CompositeBuilder.class.getName());
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+
+ for (ServiceDeclaration builderDeclaration : builderDeclarations) {
+ Map<String, String> attributes = builderDeclaration.getAttributes();
+ String id = attributes.get("id");
+
+ CompositeBuilder builder = new LazyCompositeBuilder(id, builderDeclaration, this, factories, mapper);
+ builders.put(id, builder);
+ }
+ }
+
+ /**
+ * A wrapper around a composite builder allowing lazy
+ * loading and initialization of implementation providers.
+ */
+ private static class LazyCompositeBuilder implements CompositeBuilder {
+
+ private FactoryExtensionPoint factories;
+ private InterfaceContractMapper mapper;
+ private String id;
+ private ServiceDeclaration builderDeclaration;
+ private CompositeBuilder builder;
+ private CompositeBuilderExtensionPoint builders;
+
+ private LazyCompositeBuilder(String id, ServiceDeclaration factoryDeclaration,
+ CompositeBuilderExtensionPoint builders, FactoryExtensionPoint factories, InterfaceContractMapper mapper) {
+ this.id = id;
+ this.builderDeclaration = factoryDeclaration;
+ this.builders = builders;
+ this.factories = factories;
+ this.mapper = mapper;
+ }
+
+ public String getID() {
+ return id;
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ getBuilder().build(composite, definitions, monitor);
+ }
+
+ private CompositeBuilder getBuilder() {
+ if (builder == null) {
+ try {
+ Class<CompositeBuilder> builderClass = (Class<CompositeBuilder>)builderDeclaration.loadClass();
+ try {
+ Constructor<CompositeBuilder> constructor = builderClass.getConstructor(FactoryExtensionPoint.class, InterfaceContractMapper.class);
+ builder = constructor.newInstance(factories, mapper);
+ } catch (NoSuchMethodException e) {
+ Constructor<CompositeBuilder> constructor = builderClass.getConstructor(CompositeBuilderExtensionPoint.class, FactoryExtensionPoint.class, InterfaceContractMapper.class);
+ builder = constructor.newInstance(builders, factories, mapper);
+ }
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ return builder;
+ }
+
+ }
+
+}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultEndpointBuilder.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultEndpointBuilder.java
index 9743117174..5d4055fc8e 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultEndpointBuilder.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/DefaultEndpointBuilder.java
@@ -28,7 +28,7 @@ import org.apache.tuscany.sca.monitor.Monitor;
* @version $Rev$ $Date$
*/
public class DefaultEndpointBuilder extends EndpointBuilderImpl {
- public DefaultEndpointBuilder (Monitor monitor){
- super(monitor);
+ public DefaultEndpointBuilder (){
+ super();
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/EndpointBuilder.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/EndpointBuilder.java
index eb2977d87a..e98be49551 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/EndpointBuilder.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/EndpointBuilder.java
@@ -20,6 +20,7 @@
package org.apache.tuscany.sca.assembly.builder;
import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A builder that handles the configuration of reference endpoints
@@ -34,7 +35,8 @@ public interface EndpointBuilder {
* Build an endpoint.
*
* @param endpoint
+ * @param monitor
*/
- void build(Endpoint endpoint);
+ void build(Endpoint endpoint, Monitor monitor);
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
index cba46e7f5e..77d621c931 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseConfigurationBuilderImpl.java
@@ -68,9 +68,7 @@ public abstract class BaseConfigurationBuilderImpl {
private AssemblyFactory assemblyFactory;
private SCABindingFactory scaBindingFactory;
- private Monitor monitor;
private InterfaceContractMapper interfaceContractMapper;
- private SCADefinitions policyDefinitions;
private DocumentBuilderFactory documentBuilderFactory;
private TransformerFactory transformerFactory;
@@ -78,28 +76,23 @@ public abstract class BaseConfigurationBuilderImpl {
SCABindingFactory scaBindingFactory,
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
this.assemblyFactory = assemblyFactory;
this.scaBindingFactory = scaBindingFactory;
this.documentBuilderFactory = documentBuilderFactory;
this.transformerFactory = transformerFactory;
this.interfaceContractMapper = interfaceContractMapper;
- this.policyDefinitions = policyDefinitions;
- this.monitor = monitor;
}
/**
* Configure components in the composite.
*
* @param composite
- * @param problems
+ * @param monitor
*/
- protected void configureComponents(Composite composite) throws CompositeBuilderException {
- configureComponents(composite, null);
+ protected void configureComponents(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ configureComponents(composite, null, monitor);
configureSourcedProperties(composite, null);
- //configureBindingURIs(composite, null, null);
}
/**
@@ -109,7 +102,7 @@ public abstract class BaseConfigurationBuilderImpl {
* @param uri
* @param problems
*/
- private void configureComponents(Composite composite, String uri) {
+ private void configureComponents(Composite composite, String uri, SCADefinitions definitions, Monitor monitor) {
String parentURI = uri;
// Process nested composites recursively
@@ -128,7 +121,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (implementation instanceof Composite) {
// Process nested composite
- configureComponents((Composite)implementation, componentURI);
+ configureComponents((Composite)implementation, componentURI, definitions, monitor);
}
}
@@ -139,52 +132,18 @@ public abstract class BaseConfigurationBuilderImpl {
// Create default SCA binding
if (service.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
service.getBindings().add(scaBinding);
}
-/*
- // Initialize binding names and URIs
- for (Binding binding : service.getBindings()) {
-
- // Binding name defaults to the service name
- if (binding.getName() == null) {
- binding.setName(service.getName());
- }
- }
-
- if (service.getCallback() != null) {
- for (Binding binding : service.getCallback().getBindings()) {
- if (binding.getName() == null) {
- binding.setName(service.getName());
- }
- }
- }
-*/
}
// Initialize reference bindings
for (Reference reference : composite.getReferences()) {
// Create default SCA binding
if (reference.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
reference.getBindings().add(scaBinding);
}
-/*
- // Set binding names
- for (Binding binding : reference.getBindings()) {
- if (binding.getName() == null) {
- binding.setName(reference.getName());
- }
- }
-
- if (reference.getCallback() != null) {
- for (Binding binding : reference.getCallback().getBindings()) {
- if (binding.getName() == null) {
- binding.setName(reference.getName());
- }
- }
- }
-*/
}
// Initialize all component services and references
@@ -193,7 +152,7 @@ public abstract class BaseConfigurationBuilderImpl {
// Index all components and check for duplicates
if (components.containsKey(component.getName())) {
- error("DuplicateComponentName", component, composite.getName().toString(), component.getName());
+ error(monitor, "DuplicateComponentName", component, composite.getName().toString(), component.getName());
} else {
components.put(component.getName(), component);
}
@@ -214,28 +173,27 @@ public abstract class BaseConfigurationBuilderImpl {
indexImplementationPropertiesServicesAndReferences(component,
services,
references,
- properties);
+ properties,
+ monitor);
// Index component services, references and properties
// Also check for duplicates
- Map<String, ComponentService> componentServices =
- new HashMap<String, ComponentService>();
- Map<String, ComponentReference> componentReferences =
- new HashMap<String, ComponentReference>();
- Map<String, ComponentProperty> componentProperties =
- new HashMap<String, ComponentProperty>();
+ Map<String, ComponentService> componentServices = new HashMap<String, ComponentService>();
+ Map<String, ComponentReference> componentReferences = new HashMap<String, ComponentReference>();
+ Map<String, ComponentProperty> componentProperties = new HashMap<String, ComponentProperty>();
indexComponentPropertiesServicesAndReferences(component,
componentServices,
componentReferences,
- componentProperties);
+ componentProperties,
+ monitor);
// Reconcile component services/references/properties and
// implementation services/references and create component
// services/references/properties for the services/references
// declared by the implementation
- reconcileServices(component, services, componentServices);
- reconcileReferences(component, references, componentReferences);
- reconcileProperties(component, properties, componentProperties);
+ reconcileServices(component, services, componentServices, monitor);
+ reconcileReferences(component, references, componentReferences, monitor);
+ reconcileProperties(component, properties, componentProperties, monitor);
// Configure or create callback services for component's references
// with callbacks
@@ -245,36 +203,14 @@ public abstract class BaseConfigurationBuilderImpl {
// with callbacks
configureCallbackReferences(component, componentReferences);
- // Create self references to the component's services
-// if (!(component.getImplementation() instanceof Composite)) {
-// createSelfReferences(component);
-// }
-
// Initialize service bindings
for (ComponentService componentService : component.getServices()) {
// Create default SCA binding
if (componentService.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
componentService.getBindings().add(scaBinding);
}
-/*
- // Set binding names
- for (Binding binding : componentService.getBindings()) {
-
- // Binding name defaults to the service name
- if (binding.getName() == null) {
- binding.setName(componentService.getName());
- }
- }
- if (componentService.getCallback() != null) {
- for (Binding binding : componentService.getCallback().getBindings()) {
- if (binding.getName() == null) {
- binding.setName(componentService.getName());
- }
- }
- }
-*/
}
// Initialize reference bindings
@@ -282,24 +218,9 @@ public abstract class BaseConfigurationBuilderImpl {
// Create default SCA binding
if (componentReference.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
componentReference.getBindings().add(scaBinding);
}
-/*
- // Set binding names
- for (Binding binding : componentReference.getBindings()) {
- if (binding.getName() == null) {
- binding.setName(componentReference.getName());
- }
- }
- if (componentReference.getCallback() != null) {
- for (Binding binding : componentReference.getCallback().getBindings()) {
- if (binding.getName() == null) {
- binding.setName(componentReference.getName());
- }
- }
- }
-*/
}
}
}
@@ -307,11 +228,12 @@ public abstract class BaseConfigurationBuilderImpl {
/**
* Report a warning.
*
+ * @param monitor
* @param problems
* @param message
* @param model
*/
- private void warning(String message, Object model, String... messageParameters) {
+ private void warning(Monitor monitor, String message, Object model, String... messageParameters) {
if (monitor != null) {
Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
@@ -321,11 +243,12 @@ public abstract class BaseConfigurationBuilderImpl {
/**
* Report a error.
*
+ * @param monitor
* @param problems
* @param message
* @param model
*/
- private void error(String message, Object model, String... messageParameters) {
+ private void error(Monitor monitor, String message, Object model, String... messageParameters) {
if (monitor != null) {
Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, (Object[])messageParameters);
monitor.problem(problem);
@@ -343,7 +266,8 @@ public abstract class BaseConfigurationBuilderImpl {
*/
private void reconcileProperties(Component component,
Map<String, Property> properties,
- Map<String, ComponentProperty> componentProperties) {
+ Map<String, ComponentProperty> componentProperties,
+ Monitor monitor) {
// Connect component properties to their properties
for (ComponentProperty componentProperty : component.getProperties()) {
@@ -351,7 +275,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (property != null) {
componentProperty.setProperty(property);
} else {
- warning("PropertyNotFound", component, component.getName(), componentProperty.getName());
+ warning(monitor, "PropertyNotFound", component, component.getName(), componentProperty.getName());
}
}
@@ -378,7 +302,7 @@ public abstract class BaseConfigurationBuilderImpl {
// Check that a component property does not override the
// mustSupply attribute
if (!property.isMustSupply() && componentProperty.isMustSupply()) {
- warning("PropertyMustSupplyIncompatible", component, component.getName(), componentProperty.getName());
+ warning(monitor, "PropertyMustSupplyIncompatible", component, component.getName(), componentProperty.getName());
}
// Default to the mustSupply attribute specified on the property
@@ -397,14 +321,14 @@ public abstract class BaseConfigurationBuilderImpl {
// Check that a value is supplied
if (componentProperty.getValue() == null && property.isMustSupply()) {
- warning("PropertyMustSupplyNull", component, component.getName(), componentProperty.getName());
+ warning(monitor, "PropertyMustSupplyNull", component, component.getName(), componentProperty.getName());
}
// Check that a a component property does not override the
// many attribute
if (!property.isMany() && componentProperty.isMany()) {
- warning("PropertyOverrideManyAttribute", component, component.getName(), componentProperty.getName());
+ warning(monitor, "PropertyOverrideManyAttribute", component, component.getName(), componentProperty.getName());
}
// Default to the many attribute defined on the property
@@ -420,7 +344,7 @@ public abstract class BaseConfigurationBuilderImpl {
// Check that a type or element are specified
if (componentProperty.getXSDElement() == null && componentProperty.getXSDType() == null) {
- warning("NoTypeForComponentProperty", component, component.getName(), componentProperty.getName());
+ warning(monitor, "NoTypeForComponentProperty", component, component.getName(), componentProperty.getName());
}
}
}
@@ -433,11 +357,12 @@ public abstract class BaseConfigurationBuilderImpl {
* @param component
* @param references
* @param componentReferences
- * @param problems
+ * @param monitor
*/
private void reconcileReferences(Component component,
Map<String, Reference> references,
- Map<String, ComponentReference> componentReferences) {
+ Map<String, ComponentReference> componentReferences,
+ Monitor monitor) {
// Connect each component reference to the corresponding reference
for (ComponentReference componentReference : component.getReferences()) {
@@ -449,7 +374,7 @@ public abstract class BaseConfigurationBuilderImpl {
componentReference.setReference(reference);
} else {
if (!componentReference.getName().startsWith("$self$.")) {
- error("ReferenceNotFound", component, component.getName(), componentReference.getName());
+ error(monitor, "ReferenceNotFound", component, component.getName(), componentReference.getName());
}
}
}
@@ -477,7 +402,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (!ReferenceConfigurationUtil.isValidMultiplicityOverride(reference.getMultiplicity(),
componentReference
.getMultiplicity())) {
- warning("ReferenceIncompatibleMultiplicity", component, component.getName(), componentReference.getName());
+ warning(monitor, "ReferenceIncompatibleMultiplicity", component, component.getName(), componentReference.getName());
}
} else {
componentReference.setMultiplicity(reference.getMultiplicity());
@@ -490,7 +415,7 @@ public abstract class BaseConfigurationBuilderImpl {
.getInterfaceContract())) {
if (!interfaceContractMapper.isCompatible(componentReference.getInterfaceContract(),
interfaceContract)) {
- warning("ReferenceIncompatibleComponentInterface", component, component.getName(), componentReference.getName());
+ warning(monitor, "ReferenceIncompatibleComponentInterface", component, component.getName(), componentReference.getName());
}
}
} else {
@@ -535,11 +460,12 @@ public abstract class BaseConfigurationBuilderImpl {
* @param component
* @param services
* @param componentServices
- * @param problems
+ * @param monitor
*/
private void reconcileServices(Component component,
Map<String, Service> services,
- Map<String, ComponentService> componentServices) {
+ Map<String, ComponentService> componentServices,
+ Monitor monitor) {
// Connect each component service to the corresponding service
for (ComponentService componentService : component.getServices()) {
@@ -550,7 +476,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (service != null) {
componentService.setService(service);
} else {
- warning("ServiceNotFoundForComponentService", component, component.getName(), componentService.getName());
+ warning(monitor, "ServiceNotFoundForComponentService", component, component.getName(), componentService.getName());
}
}
@@ -579,7 +505,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (interfaceContract != null && !componentService.getInterfaceContract().equals(interfaceContract)) {
if (!interfaceContractMapper.isCompatible(componentService.getInterfaceContract(),
interfaceContract)) {
- warning("ServiceIncompatibleComponentInterface", component, component.getName(), componentService.getName());
+ warning(monitor, "ServiceIncompatibleComponentInterface", component, component.getName(), componentService.getName());
}
}
} else {
@@ -610,24 +536,25 @@ public abstract class BaseConfigurationBuilderImpl {
private void indexComponentPropertiesServicesAndReferences(Component component,
Map<String, ComponentService> componentServices,
Map<String, ComponentReference> componentReferences,
- Map<String, ComponentProperty> componentProperties) {
+ Map<String, ComponentProperty> componentProperties,
+ Monitor monitor) {
for (ComponentService componentService : component.getServices()) {
if (componentServices.containsKey(componentService.getName())) {
- warning("DuplicateComponentServiceName", component, component.getName(), componentService.getName());
+ warning(monitor, "DuplicateComponentServiceName", component, component.getName(), componentService.getName());
} else {
componentServices.put(componentService.getName(), componentService);
}
}
for (ComponentReference componentReference : component.getReferences()) {
if (componentReferences.containsKey(componentReference.getName())) {
- warning("DuplicateComponentReferenceName", component, component.getName(), componentReference.getName());
+ warning(monitor, "DuplicateComponentReferenceName", component, component.getName(), componentReference.getName());
} else {
componentReferences.put(componentReference.getName(), componentReference);
}
}
for (ComponentProperty componentProperty : component.getProperties()) {
if (componentProperties.containsKey(componentProperty.getName())) {
- warning("DuplicateComponentPropertyName", component, component.getName(), componentProperty.getName());
+ warning(monitor, "DuplicateComponentPropertyName", component, component.getName(), componentProperty.getName());
} else {
componentProperties.put(componentProperty.getName(), componentProperty);
}
@@ -638,17 +565,18 @@ public abstract class BaseConfigurationBuilderImpl {
private void indexImplementationPropertiesServicesAndReferences(Component component,
Map<String, Service> services,
Map<String, Reference> references,
- Map<String, Property> properties) {
+ Map<String, Property> properties,
+ Monitor monitor) {
// First check that the component has a resolved implementation
Implementation implementation = component.getImplementation();
if (implementation == null) {
// A component must have an implementation
- warning("NoComponentImplementation", component, component.getName());
+ warning(monitor, "NoComponentImplementation", component, component.getName());
} else if (implementation.isUnresolved()) {
// The implementation must be fully resolved
- warning("UnresolvedComponentImplementation", component, component.getName(), implementation.getURI());
+ warning(monitor, "UnresolvedComponentImplementation", component, component.getName(), implementation.getURI());
} else {
@@ -656,21 +584,21 @@ public abstract class BaseConfigurationBuilderImpl {
// duplicates
for (Property property : implementation.getProperties()) {
if (properties.containsKey(property.getName())) {
- warning("DuplicateImplementationPropertyName", component, component.getName(), property.getName());
+ warning(monitor, "DuplicateImplementationPropertyName", component, component.getName(), property.getName());
} else {
properties.put(property.getName(), property);
}
}
for (Service service : implementation.getServices()) {
if (services.containsKey(service.getName())) {
- warning("DuplicateImplementationServiceName", component, component.getName(), service.getName());
+ warning(monitor, "DuplicateImplementationServiceName", component, component.getName(), service.getName());
} else {
services.put(service.getName(), service);
}
}
for (Reference reference : implementation.getReferences()) {
if (references.containsKey(reference.getName())) {
- warning("DuplicateImplementationReferenceName", component, component.getName(), reference.getName());
+ warning(monitor, "DuplicateImplementationReferenceName", component, component.getName(), reference.getName());
} else {
references.put(reference.getName(), reference);
}
@@ -850,7 +778,7 @@ public abstract class BaseConfigurationBuilderImpl {
return null;
}
- private SCABinding createSCABinding() {
+ private SCABinding createSCABinding(SCADefinitions definitions) {
SCABinding scaBinding = scaBindingFactory.createSCABinding();
// mark the bindings that are added automatically so that they can
@@ -859,8 +787,8 @@ public abstract class BaseConfigurationBuilderImpl {
((AutomaticBinding)scaBinding).setIsAutomatic(true);
}
- if ( policyDefinitions != null ) {
- for ( IntentAttachPointType attachPointType : policyDefinitions.getBindingTypes() ) {
+ if ( definitions != null ) {
+ for ( IntentAttachPointType attachPointType : definitions.getBindingTypes() ) {
if ( attachPointType.getName().equals(BINDING_SCA_QNAME)) {
((IntentAttachPoint)scaBinding).setType(attachPointType);
}
@@ -875,9 +803,9 @@ public abstract class BaseConfigurationBuilderImpl {
*
* @param composite the composite to be configured
*/
- protected void configureBindingURIsAndNames(Composite composite) throws CompositeBuilderException {
- configureBindingURIs(composite, null, null);
- configureBindingNames(composite);
+ protected void configureBindingURIsAndNames(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ configureBindingURIs(composite, null, definitions, null, monitor);
+ configureBindingNames(composite, monitor);
}
/**
@@ -888,8 +816,10 @@ public abstract class BaseConfigurationBuilderImpl {
* @param composite the composite to be configured
* @param defaultBindings list of default binding configurations
*/
- protected void configureBindingURIs(Composite composite, List<Binding> defaultBindings) throws CompositeBuilderException {
- configureBindingURIs(composite, null, defaultBindings);
+ protected void configureBindingURIs(Composite composite,
+ SCADefinitions definitions, List<Binding> defaultBindings,
+ Monitor monitor) throws CompositeBuilderException {
+ configureBindingURIs(composite, null, definitions, defaultBindings, monitor);
}
/**
@@ -912,7 +842,9 @@ public abstract class BaseConfigurationBuilderImpl {
* @param uri the path to the composite provided through any nested composite component implementations
* @param defaultBindings list of default binding configurations
*/
- private void configureBindingURIs(Composite composite, String uri, List<Binding> defaultBindings) throws CompositeBuilderException {
+ private void configureBindingURIs(Composite composite, String uri,
+ SCADefinitions definitions, List<Binding> defaultBindings,
+ Monitor monitor) throws CompositeBuilderException {
String parentComponentURI = uri;
@@ -932,7 +864,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (implementation instanceof Composite) {
// Process nested composite
- configureBindingURIs((Composite)implementation, componentURI, defaultBindings);
+ configureBindingURIs((Composite)implementation, componentURI, definitions, defaultBindings, monitor);
}
}
@@ -943,14 +875,14 @@ public abstract class BaseConfigurationBuilderImpl {
// Create default SCA binding
if (service.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
service.getBindings().add(scaBinding);
}
// Initialize binding names and URIs
for (Binding binding : service.getBindings()) {
- constructBindingName(service, binding);
- constructBindingURI(parentComponentURI, composite, service, binding, defaultBindings);
+ constructBindingName(service, binding, monitor);
+ constructBindingURI(parentComponentURI, composite, service, binding, defaultBindings, monitor);
}
}
@@ -964,7 +896,8 @@ public abstract class BaseConfigurationBuilderImpl {
indexImplementationPropertiesServicesAndReferences(component,
services,
references,
- properties);
+ properties,
+ monitor);
// Index component services, references and properties
// Also check for duplicates
@@ -977,29 +910,30 @@ public abstract class BaseConfigurationBuilderImpl {
indexComponentPropertiesServicesAndReferences(component,
componentServices,
componentReferences,
- componentProperties);
+ componentProperties,
+ monitor);
// Reconcile component services/references/properties and
// implementation services/references and create component
// services/references/properties for the services/references
// declared by the implementation
- reconcileServices(component, services, componentServices);
- reconcileReferences(component, references, componentReferences);
- reconcileProperties(component, properties, componentProperties);
+ reconcileServices(component, services, componentServices, monitor);
+ reconcileReferences(component, references, componentReferences, monitor);
+ reconcileProperties(component, properties, componentProperties, monitor);
for (ComponentService service : component.getServices()) {
// Create default SCA binding
if (service.getBindings().isEmpty()) {
- SCABinding scaBinding = createSCABinding();
+ SCABinding scaBinding = createSCABinding(definitions);
service.getBindings().add(scaBinding);
}
// Initialize binding names and URIs
for (Binding binding : service.getBindings()) {
- constructBindingName(service, binding);
- constructBindingURI(component, service, binding, defaultBindings);
+ constructBindingName(service, binding, monitor);
+ constructBindingURI(component, service, binding, defaultBindings, monitor);
}
}
}
@@ -1010,7 +944,7 @@ public abstract class BaseConfigurationBuilderImpl {
* separate from configureBindingURIs() because configureBindingURIs() is called
* by NodeConfigurationServiceImpl as well as by CompositeBuilderImpl.
*/
- private void configureBindingNames(Composite composite) {
+ private void configureBindingNames(Composite composite, Monitor monitor) {
// Process nested composites recursively
for (Component component : composite.getComponents()) {
@@ -1019,7 +953,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (implementation instanceof Composite) {
// Process nested composite
- configureBindingNames((Composite)implementation);
+ configureBindingNames((Composite)implementation, monitor);
}
}
@@ -1028,7 +962,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (service.getCallback() != null) {
for (Binding binding : service.getCallback().getBindings()) {
- constructBindingName(service, binding);
+ constructBindingName(service, binding, monitor);
}
}
}
@@ -1037,12 +971,12 @@ public abstract class BaseConfigurationBuilderImpl {
for (Reference reference : composite.getReferences()) {
for (Binding binding : reference.getBindings()) {
- constructBindingName(reference, binding);
+ constructBindingName(reference, binding, monitor);
}
if (reference.getCallback() != null) {
for (Binding binding : reference.getCallback().getBindings()) {
- constructBindingName(reference, binding);
+ constructBindingName(reference, binding, monitor);
}
}
}
@@ -1055,7 +989,7 @@ public abstract class BaseConfigurationBuilderImpl {
if (service.getCallback() != null) {
for (Binding binding : service.getCallback().getBindings()) {
- constructBindingName(service, binding);
+ constructBindingName(service, binding, monitor);
}
}
}
@@ -1065,12 +999,12 @@ public abstract class BaseConfigurationBuilderImpl {
// Initialize binding names
for (Binding binding : reference.getBindings()) {
- constructBindingName(reference, binding);
+ constructBindingName(reference, binding, monitor);
}
if (reference.getCallback() != null) {
for (Binding binding : reference.getCallback().getBindings()) {
- constructBindingName(reference, binding);
+ constructBindingName(reference, binding, monitor);
}
}
}
@@ -1084,7 +1018,7 @@ public abstract class BaseConfigurationBuilderImpl {
* @param contract the service or reference
* @param binding
*/
- private void constructBindingName(Contract contract, Binding binding) {
+ private void constructBindingName(Contract contract, Binding binding, Monitor monitor) {
// set the default binding name if one is required
// if there is no name on the binding then set it to the service or reference name
@@ -1103,7 +1037,7 @@ public abstract class BaseConfigurationBuilderImpl {
continue;
}
if (binding.getName().equals(otherBinding.getName())) {
- warning(contract instanceof Service ? "MultipleBindingsForService" : "MultipleBindingsForReference",
+ warning(monitor, contract instanceof Service ? "MultipleBindingsForService" : "MultipleBindingsForReference",
binding, contract.getName(), binding.getName());
}
}
@@ -1121,12 +1055,13 @@ public abstract class BaseConfigurationBuilderImpl {
* @param binding
* @param defaultBindings
*/
- private void constructBindingURI(String parentComponentURI, Composite composite, Service service, Binding binding, List<Binding> defaultBindings)
+ private void constructBindingURI(String parentComponentURI, Composite composite, Service service,
+ Binding binding, List<Binding> defaultBindings, Monitor monitor)
throws CompositeBuilderException{
// This is a composite service so there is no component to provide a component URI
// The path to this composite (through nested composites) is used.
boolean includeBindingName = composite.getServices().size() != 1;
- constructBindingURI(parentComponentURI, service, binding, includeBindingName, defaultBindings);
+ constructBindingURI(parentComponentURI, service, binding, includeBindingName, defaultBindings, monitor);
}
/**
@@ -1139,10 +1074,11 @@ public abstract class BaseConfigurationBuilderImpl {
* @param binding the binding for which the URI is being constructed
* @param defaultBindings the list of default binding configurations
*/
- private void constructBindingURI(Component component, Service service, Binding binding, List<Binding> defaultBindings)
+ private void constructBindingURI(Component component, Service service,
+ Binding binding, List<Binding> defaultBindings, Monitor monitor)
throws CompositeBuilderException{
boolean includeBindingName = component.getServices().size() != 1;
- constructBindingURI(component.getURI(), service, binding, includeBindingName, defaultBindings);
+ constructBindingURI(component.getURI(), service, binding, includeBindingName, defaultBindings, monitor);
}
/**
@@ -1155,7 +1091,8 @@ public abstract class BaseConfigurationBuilderImpl {
* @param defaultBindings the list of default binding configurations
* @throws CompositeBuilderException
*/
- private void constructBindingURI(String componentURIString, Service service, Binding binding, boolean includeBindingName, List<Binding> defaultBindings)
+ private void constructBindingURI(String componentURIString, Service service, Binding binding,
+ boolean includeBindingName, List<Binding> defaultBindings, Monitor monitor)
throws CompositeBuilderException{
try {
@@ -1196,28 +1133,6 @@ public abstract class BaseConfigurationBuilderImpl {
}
// calculate the base URI
-
- // get the protocol for this binding/URI
-/* some code that allows binding specific code to run. Being discussed on ML
- BindingURICalculator uriCalculator = bindingURICalcualtorExtensionPoint.getBindingURICalculator(binding);
-
- if (uriCalculator != null){
- String protocol = uriCalculator.getProtocol(binding);
-
- // find the default binding with the right protocol
- Binding defaultBinding = nodeInfo.getBindingDefault(binding, protocol);
-
- if (defaultBinding != null){
- baseURI = new URI(defaultBinding.getURI());
- } else {
- baseURI = null;
- }
-
- } else {
- baseURI = null;
- }
-*/
- // as a simpler alternative to the above commented out code.
URI baseURI = null;
if (defaultBindings != null) {
for (Binding defaultBinding : defaultBindings){
@@ -1230,7 +1145,7 @@ public abstract class BaseConfigurationBuilderImpl {
binding.setURI(constructBindingURI(baseURI, componentURI, bindingURI, includeBindingName, bindingName));
} catch (URISyntaxException ex) {
- error("URLSyntaxException", binding, componentURIString, service.getName(), binding.getName());
+ error(monitor, "URLSyntaxException", binding, componentURIString, service.getName(), binding.getName());
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
index b05ec7e24e..b026eb0811 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/BaseWireBuilderImpl.java
@@ -58,19 +58,15 @@ import org.apache.tuscany.sca.policy.util.PolicyComputationUtils;
*/
class BaseWireBuilderImpl {
- private Monitor monitor;
- private AssemblyFactory assemblyFactory;
private EndpointFactory endpointFactory;
private InterfaceContractMapper interfaceContractMapper;
private EndpointBuilder endpointBuilder;
- protected BaseWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper, Monitor monitor) {
- this.assemblyFactory = assemblyFactory;
+ protected BaseWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper) {
this.endpointFactory = endpointFactory;
this.interfaceContractMapper = interfaceContractMapper;
- this.monitor = monitor;
- this.endpointBuilder = new DefaultEndpointBuilder(monitor);
+ this.endpointBuilder = new DefaultEndpointBuilder();
}
@@ -80,13 +76,13 @@ class BaseWireBuilderImpl {
*
* @param composite
*/
- protected void wireComponentReferences(Composite composite) {
+ protected void wireComponentReferences(Composite composite, Monitor monitor) {
// Wire nested composites recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- wireComponentReferences((Composite)implementation);
+ wireComponentReferences((Composite)implementation, monitor);
}
}
@@ -105,10 +101,10 @@ class BaseWireBuilderImpl {
//computePolicies(composite);
// Connect component references as described in wires
- connectWires(composite, componentServices, componentReferences);
+ connectWires(composite, componentServices, componentReferences, monitor);
// Connect component references to their targets
- connectComponentReferences(composite, components, componentServices, componentReferences);
+ connectComponentReferences(composite, components, componentServices, componentReferences, monitor);
// Validate that references are wired or promoted, according
// to their multiplicity
@@ -127,10 +123,10 @@ class BaseWireBuilderImpl {
}
}
if (!promoted && !componentReference.isCallback()) {
- warning("ReferenceWithoutTargets", composite, composite.getName().toString(), componentReference.getName());
+ warning(monitor, "ReferenceWithoutTargets", composite, composite.getName().toString(), componentReference.getName());
}
} else {
- warning("TooManyReferenceTargets", composite, componentReference.getName());
+ warning(monitor, "TooManyReferenceTargets", composite, componentReference.getName());
}
}
}
@@ -206,7 +202,7 @@ class BaseWireBuilderImpl {
* @param message
* @param model
*/
- private void warning(String message, Object model, String... messageParameters) {
+ private void warning(Monitor monitor, String message, Object model, String... messageParameters) {
if (monitor != null) {
Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
@@ -220,7 +216,7 @@ class BaseWireBuilderImpl {
* @param message
* @param model
*/
- private void error(String message, Object model, Exception ex) {
+ private void error(Monitor monitor, String message, Object model, Exception ex) {
if (monitor != null) {
Problem problem = null;
problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, ex);
@@ -235,12 +231,12 @@ class BaseWireBuilderImpl {
* @param componentServices
* @param problems
*/
- protected void connectCompositeReferencesAndServices(Composite composite){
+ protected void connectCompositeReferencesAndServices(Composite composite, Monitor monitor){
// Wire nested composites recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- connectCompositeReferencesAndServices((Composite)implementation);
+ connectCompositeReferencesAndServices((Composite)implementation, monitor);
}
}
@@ -252,8 +248,8 @@ class BaseWireBuilderImpl {
// Connect composite services and references to the component
// services and references that they promote
- connectCompositeServices(composite, components, componentServices);
- connectCompositeReferences(composite, componentReferences);
+ connectCompositeServices(composite, components, componentServices, monitor);
+ connectCompositeReferences(composite, componentReferences, monitor);
}
/**
@@ -265,7 +261,8 @@ class BaseWireBuilderImpl {
*/
private void connectCompositeServices(Composite composite,
Map<String, Component> components,
- Map<String, ComponentService> componentServices) {
+ Map<String, ComponentService> componentServices,
+ Monitor monitor) {
// Propagate interfaces from inner composite components' services to
// their component services
@@ -316,12 +313,12 @@ class BaseWireBuilderImpl {
// Check the compositeServiceInterfaceContract and promotedServiceInterfaceContract
boolean isCompatible = interfaceContractMapper.isCompatible(compositeServiceInterfaceContract, promotedServiceInterfaceContract);
if(!isCompatible){
- warning("ServiceInterfaceNotSubSet", compositeService, promotedServiceName);
+ warning(monitor, "ServiceInterfaceNotSubSet", compositeService, promotedServiceName);
}
}
} else {
- warning("PromotedServiceNotFound", composite, composite.getName().toString(), promotedServiceName);
+ warning(monitor, "PromotedServiceNotFound", composite, composite.getName().toString(), promotedServiceName);
}
}
}
@@ -335,7 +332,8 @@ class BaseWireBuilderImpl {
* @param componentReferences
* @param problems
*/
- private void connectCompositeReferences(Composite composite, Map<String, ComponentReference> componentReferences) {
+ private void connectCompositeReferences(Composite composite,
+ Map<String, ComponentReference> componentReferences, Monitor monitor) {
// Propagate interfaces from inner composite components' references to
// their component references
@@ -379,11 +377,11 @@ class BaseWireBuilderImpl {
// Check the compositeInterfaceContract and componentInterfaceContract
boolean isCompatible = interfaceContractMapper.isCompatible(compositeReferenceInterfaceContract, componentReferenceInterfaceContract);
if (!isCompatible) {
- warning("ReferenceInterfaceNotSubSet", compositeReference, componentReferenceName);
+ warning(monitor, "ReferenceInterfaceNotSubSet", compositeReference, componentReferenceName);
}
}
} else {
- warning("PromotedReferenceNotFound", composite, composite.getName().toString(), componentReferenceName);
+ warning(monitor, "PromotedReferenceNotFound", composite, composite.getName().toString(), componentReferenceName);
}
}
}
@@ -393,7 +391,8 @@ class BaseWireBuilderImpl {
private List<Endpoint> createComponentReferenceTargets(Composite composite,
Map<String, Component> components,
Map<String, ComponentService> componentServices,
- ComponentReference componentReference) {
+ ComponentReference componentReference,
+ Monitor monitor) {
List<Endpoint> endpoints = new ArrayList<Endpoint>();
@@ -436,7 +435,7 @@ class BaseWireBuilderImpl {
if (multiplicity == Multiplicity.ONE_N || multiplicity == Multiplicity.ONE_ONE) {
if (endpoints.size() == 0) {
- warning("NoComponentReferenceTarget", componentReference, componentReference.getName());
+ warning(monitor, "NoComponentReferenceTarget", componentReference, componentReference.getName());
}
}
@@ -446,7 +445,7 @@ class BaseWireBuilderImpl {
// binding elements with target endpoints specified via the target attribute
for (Binding binding : componentReference.getBindings()) {
if (binding.getURI() != null) {
- warning("ReferenceEndPointMixWithTarget", composite, componentReference.getName());
+ warning(monitor, "ReferenceEndPointMixWithTarget", composite, componentReference.getName());
}
}
@@ -485,7 +484,7 @@ class BaseWireBuilderImpl {
// see if an sca binding is associated with a resolved target or not
componentService.setUnresolved(false);
} else {
- warning("ReferenceIncompatibleInterface", composite, composite.getName().toString(),
+ warning(monitor, "ReferenceIncompatibleInterface", composite, composite.getName().toString(),
componentReference.getName(), componentService.getName());
}
} else {
@@ -503,7 +502,7 @@ class BaseWireBuilderImpl {
// The bindings will be cloned back into the reference when the
// target is finally resolved.
- warning("ComponentReferenceTargetNotFound", composite,
+ warning(monitor, "ComponentReferenceTargetNotFound", composite,
composite.getName().toString(), componentService.getName());
}
}
@@ -546,7 +545,7 @@ class BaseWireBuilderImpl {
// see if an sca binding is associated with a resolved target or not
componentService.setUnresolved(false);
} else {
- warning("ComponentIncompatibleInterface", composite,
+ warning(monitor, "ComponentIncompatibleInterface", composite,
componentReference.getName(), componentService.getName());
}
} else {
@@ -565,7 +564,7 @@ class BaseWireBuilderImpl {
endpoint.getCandidateBindings().addAll(componentReference.getBindings());
endpoints.add(endpoint);
- warning("ComponentReferenceTargetNotFound", composite,
+ warning(monitor, "ComponentReferenceTargetNotFound", composite,
composite.getName().toString(), componentService.getName());
}
}
@@ -633,7 +632,7 @@ class BaseWireBuilderImpl {
endpoint.getCandidateBindings().add(binding);
endpoints.add(endpoint);
} else {
- warning("ReferenceIncompatibleInterface",
+ warning(monitor, "ReferenceIncompatibleInterface",
composite,
composite.getName().toString(),
componentReference.getName(),
@@ -668,14 +667,16 @@ class BaseWireBuilderImpl {
private void connectComponentReferences(Composite composite,
Map<String, Component> components,
Map<String, ComponentService> componentServices,
- Map<String, ComponentReference> componentReferences){
+ Map<String, ComponentReference> componentReferences,
+ Monitor monitor){
for (ComponentReference componentReference : componentReferences.values()) {
List<Endpoint> endpoints = createComponentReferenceTargets(composite,
components,
componentServices,
- componentReference);
+ componentReference,
+ monitor);
componentReference.getEndpoints().addAll(endpoints);
@@ -691,7 +692,7 @@ class BaseWireBuilderImpl {
if (endpointsRequireAutomaticResolution) {
for(Endpoint endpoint : endpoints){
- endpointBuilder.build(endpoint);
+ endpointBuilder.build(endpoint, monitor);
}
// TODO - The following step ensures that the reference binding list remains
@@ -890,7 +891,8 @@ class BaseWireBuilderImpl {
*/
private void connectWires(Composite composite,
Map<String, ComponentService> componentServices,
- Map<String, ComponentReference> componentReferences) {
+ Map<String, ComponentReference> componentReferences,
+ Monitor monitor) {
// For each wire, resolve the source reference, the target service, and
// add it to the list of targets of the reference
@@ -908,7 +910,7 @@ class BaseWireBuilderImpl {
if (resolvedReference != null) {
wire.setSource(resolvedReference);
} else {
- warning("WireSourceNotFound", composite, source.getName());
+ warning(monitor, "WireSourceNotFound", composite, source.getName());
}
} else {
resolvedReference = wire.getSource();
@@ -921,7 +923,7 @@ class BaseWireBuilderImpl {
if (resolvedService != null) {
wire.setTarget(target);
} else {
- warning("WireTargetNotFound", composite, source.getName());
+ warning(monitor, "WireTargetNotFound", composite, source.getName());
}
} else {
resolvedService = wire.getTarget();
@@ -939,7 +941,7 @@ class BaseWireBuilderImpl {
//resolvedReference.getTargets().add(resolvedService);
resolvedReference.getTargets().add(wire.getTarget());
} else {
- warning("WireIncompatibleInterface", composite, source.getName(), target.getName());
+ warning(monitor, "WireIncompatibleInterface", composite, source.getName(), target.getName());
}
}
}
@@ -969,13 +971,13 @@ class BaseWireBuilderImpl {
}
- protected void computePolicies(Composite composite) {
+ protected void computePolicies(Composite composite, Monitor monitor) {
// compute policies recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- computePolicies((Composite)implementation);
+ computePolicies((Composite)implementation, monitor);
}
}
@@ -992,7 +994,7 @@ class BaseWireBuilderImpl {
try {
PolicyConfigurationUtil.computeImplementationIntentsAndPolicySets(implemenation, component);
} catch ( Exception e ) {
- error("PolicyRelatedException", implemenation, e);
+ error(monitor, "PolicyRelatedException", implemenation, e);
//throw new RuntimeException(e);
}
@@ -1032,7 +1034,7 @@ class BaseWireBuilderImpl {
PolicyConfigurationUtil.determineApplicableBindingPolicySets(componentService, null);
} catch ( Exception e ) {
- error("PolicyRelatedException", componentService, e);
+ error(monitor, "PolicyRelatedException", componentService, e);
//throw new RuntimeException(e);
}
}
@@ -1063,7 +1065,7 @@ class BaseWireBuilderImpl {
false);
}
} catch ( Exception e ) {
- error("PolicyRelatedException", componentReference, e);
+ error(monitor, "PolicyRelatedException", componentReference, e);
//throw new RuntimeException(e);
}
}
@@ -1083,7 +1085,7 @@ class BaseWireBuilderImpl {
PolicyConfigurationUtil.computeBindingIntentsAndPolicySets(service);
PolicyConfigurationUtil.determineApplicableBindingPolicySets(service, null);
} catch ( Exception e ) {
- error("PolicyRelatedException", service, e);
+ error(monitor, "PolicyRelatedException", service, e);
//throw new RuntimeException(e);
}
@@ -1108,7 +1110,7 @@ class BaseWireBuilderImpl {
PolicyConfigurationUtil.computeBindingIntentsAndPolicySets(reference);
PolicyConfigurationUtil.determineApplicableBindingPolicySets(reference, null);
} catch ( Exception e ) {
- error("PolicyRelatedException", reference, e);
+ error(monitor, "PolicyRelatedException", reference, e);
//throw new RuntimeException(e);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java
index 0643421a45..cbd53187c4 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentConfigurationBuilderImpl.java
@@ -41,28 +41,28 @@ public class ComponentConfigurationBuilderImpl extends BaseConfigurationBuilderI
@Deprecated
public ComponentConfigurationBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
super(assemblyFactory, scaBindingFactory,
null, null,
- interfaceContractMapper, policyDefinitions, monitor);
+ interfaceContractMapper);
}
public ComponentConfigurationBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
super(assemblyFactory, scaBindingFactory,
documentBuilderFactory, transformerFactory,
- interfaceContractMapper, policyDefinitions, monitor);
+ interfaceContractMapper);
+ }
+
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentConfigurationBuilder";
}
- public void build(Composite composite) throws CompositeBuilderException {
- configureComponents(composite);
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ configureComponents(composite, definitions, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java
index 4913705e91..d289bd3749 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceBindingBuilderImpl.java
@@ -27,6 +27,7 @@ import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -36,17 +37,19 @@ import org.apache.tuscany.sca.monitor.Monitor;
* @version $Rev$ $Date$
*/
public class ComponentReferenceBindingBuilderImpl implements CompositeBuilder {
- private Monitor monitor;
- public ComponentReferenceBindingBuilderImpl(Monitor monitor) {
- this.monitor = monitor;
+ public ComponentReferenceBindingBuilderImpl() {
}
- public void build(Composite composite) throws CompositeBuilderException {
- buildReferenceBindings(composite);
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ buildReferenceBindings(composite, monitor);
}
- private void buildReferenceBindings(Composite composite) {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentReferenceBindingBuilder";
+ }
+
+ private void buildReferenceBindings(Composite composite, Monitor monitor) {
// find all the component reference bindings (starting at top level)
for (Component component : composite.getComponents()) {
@@ -63,7 +66,7 @@ public class ComponentReferenceBindingBuilderImpl implements CompositeBuilder {
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- buildReferenceBindings((Composite)implementation);
+ buildReferenceBindings((Composite)implementation, monitor);
}
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java
index c0702c87b3..61921a4df9 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferencePromotionWireBuilderImpl.java
@@ -35,6 +35,7 @@ import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -45,16 +46,18 @@ import org.apache.tuscany.sca.monitor.Monitor;
public class ComponentReferencePromotionWireBuilderImpl implements CompositeBuilder {
private AssemblyFactory assemblyFactory;
private EndpointFactory endpointFactory;
- private Monitor monitor;
- public ComponentReferencePromotionWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, Monitor monitor) {
+ public ComponentReferencePromotionWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory) {
this.assemblyFactory = assemblyFactory;
this.endpointFactory = endpointFactory;
- this.monitor = monitor;
}
- public void build(Composite composite) throws CompositeBuilderException {
- wireCompositeReferences(composite);
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ wireCompositeReferences(composite, monitor);
+ }
+
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentReferencePromotionWireBuilder";
}
/**
@@ -63,13 +66,13 @@ public class ComponentReferencePromotionWireBuilderImpl implements CompositeBuil
* @param composite
* @param problems
*/
- private void wireCompositeReferences(Composite composite) {
+ private void wireCompositeReferences(Composite composite, Monitor monitor) {
// Process nested composites recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- wireCompositeReferences((Composite)implementation);
+ wireCompositeReferences((Composite)implementation, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
index 927330b139..9fe08f9730 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentReferenceWireBuilderImpl.java
@@ -24,6 +24,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.EndpointFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -34,11 +35,15 @@ import org.apache.tuscany.sca.monitor.Monitor;
*/
public class ComponentReferenceWireBuilderImpl extends BaseWireBuilderImpl implements CompositeBuilder {
- public ComponentReferenceWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper, Monitor monitor) {
- super(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
+ public ComponentReferenceWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper) {
+ super(assemblyFactory, endpointFactory, interfaceContractMapper);
}
- public void build(Composite composite) throws CompositeBuilderException {
- wireComponentReferences(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentReferenceWireBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ wireComponentReferences(composite, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java
index 12ea86eac3..a98522b2bf 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServiceBindingBuilderImpl.java
@@ -24,11 +24,11 @@ import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.builder.BindingBuilder;
import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -38,23 +38,25 @@ import org.apache.tuscany.sca.monitor.Monitor;
* @version $Rev$ $Date$
*/
public class ComponentServiceBindingBuilderImpl implements CompositeBuilder {
- private Monitor monitor;
- public ComponentServiceBindingBuilderImpl(Monitor monitor) {
- this.monitor = monitor;
+ public ComponentServiceBindingBuilderImpl() {
}
- public void build(Composite composite) throws CompositeBuilderException {
- buildServiceBindings(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentServiceBindingBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ buildServiceBindings(composite, monitor);
}
- private void buildServiceBindings(Composite composite) {
+ private void buildServiceBindings(Composite composite, Monitor monitor) {
// build bindings recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- buildServiceBindings((Composite)implementation);
+ buildServiceBindings((Composite)implementation, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
index d73286f7ab..282de1fbde 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/ComponentServicePromotionBuilderImpl.java
@@ -28,6 +28,8 @@ import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A composite builder that handles the creation of promoted services.
@@ -41,7 +43,11 @@ public class ComponentServicePromotionBuilderImpl implements CompositeBuilder {
this.assemblyFactory = assemblyFactory;
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentServicePromotionBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process nested composites recursively
configureNestedCompositeServices(composite);
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java
new file mode 100644
index 0000000000..9f618ecb51
--- /dev/null
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingConfigurationBuilderImpl.java
@@ -0,0 +1,73 @@
+/*
+ * 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.sca.assembly.builder.impl;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.AssemblyFactory;
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.SCABindingFactory;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ * A composite builder that performs any additional building steps that
+ * composite service bindings may need. Used for WSDL generation.
+ *
+ * @version $Rev$ $Date$
+ */
+public class CompositeBindingConfigurationBuilderImpl extends BaseConfigurationBuilderImpl implements CompositeBuilder {
+
+ public CompositeBindingConfigurationBuilderImpl(FactoryExtensionPoint factories, InterfaceContractMapper mapper) {
+ super(factories.getFactory(AssemblyFactory.class),
+ factories.getFactory(SCABindingFactory.class),
+ null, null,
+ mapper);
+ }
+
+ public CompositeBindingConfigurationBuilderImpl(AssemblyFactory assemblyFactory,
+ SCABindingFactory scaBindingFactory,
+ InterfaceContractMapper interfaceContractMapper) {
+ super(assemblyFactory,
+ scaBindingFactory,
+ null, null,
+ interfaceContractMapper);
+ }
+
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeServiceBindingBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ List<Binding> defaultBindings = null;
+ for (Object x: composite.getExtensions()) {
+ if (x instanceof List) {
+ defaultBindings = (List<Binding>)x;
+ }
+ }
+ configureBindingURIs(composite, definitions, defaultBindings, monitor);
+ }
+
+}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java
index 85af173c0d..030eb76eae 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBindingURIBuilderImpl.java
@@ -41,28 +41,27 @@ public class CompositeBindingURIBuilderImpl extends BaseConfigurationBuilderImpl
@Deprecated
public CompositeBindingURIBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
super(assemblyFactory, scaBindingFactory,
null, null,
- interfaceContractMapper, policyDefinitions, monitor);
+ interfaceContractMapper);
}
public CompositeBindingURIBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
super(assemblyFactory, scaBindingFactory,
- documentBuilderFactory, transformerFactory,
- interfaceContractMapper, policyDefinitions, monitor);
+ documentBuilderFactory, transformerFactory, interfaceContractMapper);
}
- public void build(Composite composite) throws CompositeBuilderException {
- configureBindingURIsAndNames(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeBindingURIBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ configureBindingURIsAndNames(composite, definitions, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
index 282fe032ba..2225e81e4b 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderImpl.java
@@ -30,7 +30,7 @@ import org.apache.tuscany.sca.assembly.EndpointFactory;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -60,6 +60,16 @@ public class CompositeBuilderImpl implements CompositeBuilder {
private CompositeBuilder componentServiceBindingBuilder;
private CompositeBuilder componentReferenceBindingBuilder;
+ public CompositeBuilderImpl(FactoryExtensionPoint factories, InterfaceContractMapper mapper) {
+ this(factories.getFactory(AssemblyFactory.class),
+ factories.getFactory(EndpointFactory.class),
+ factories.getFactory(SCABindingFactory.class),
+ factories.getFactory(IntentAttachPointTypeFactory.class),
+ factories.getFactory(DocumentBuilderFactory.class),
+ factories.getFactory(TransformerFactory.class),
+ mapper);
+ }
+
/**
* Constructs a new composite builder.
*
@@ -76,11 +86,9 @@ public class CompositeBuilderImpl implements CompositeBuilder {
EndpointFactory endpointFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
this(assemblyFactory, endpointFactory, scaBindingFactory, intentAttachPointTypeFactory,
- null, null, interfaceContractMapper, policyDefinitions, monitor);
+ null, null, interfaceContractMapper);
}
/**
@@ -98,10 +106,9 @@ public class CompositeBuilderImpl implements CompositeBuilder {
public CompositeBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory,
- null, null, interfaceContractMapper, null, monitor);
+ null, null, interfaceContractMapper);
}
/**
@@ -120,10 +127,9 @@ public class CompositeBuilderImpl implements CompositeBuilder {
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory,
- documentBuilderFactory, transformerFactory, interfaceContractMapper, null, monitor);
+ documentBuilderFactory, transformerFactory, interfaceContractMapper);
}
/**
@@ -143,77 +149,79 @@ public class CompositeBuilderImpl implements CompositeBuilder {
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
if (endpointFactory == null){
endpointFactory = new DefaultEndpointFactory();
}
- compositeIncludeBuilder = new CompositeIncludeBuilderImpl(monitor);
- componentReferenceWireBuilder = new ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- componentReferencePromotionWireBuilder = new ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- compositeReferenceWireBuilder = new CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- compositeCloneBuilder = new CompositeCloneBuilderImpl(monitor);
- componentConfigurationBuilder = new ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, documentBuilderFactory, transformerFactory, interfaceContractMapper, policyDefinitions, monitor);
+ compositeIncludeBuilder = new CompositeIncludeBuilderImpl();
+ componentReferenceWireBuilder = new ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ componentReferencePromotionWireBuilder = new ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory);
+ compositeReferenceWireBuilder = new CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory);
+ compositeCloneBuilder = new CompositeCloneBuilderImpl();
+ componentConfigurationBuilder = new ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, documentBuilderFactory, transformerFactory, interfaceContractMapper);
compositeServiceConfigurationBuilder = new CompositeServiceConfigurationBuilderImpl(assemblyFactory);
compositeReferenceConfigurationBuilder = new CompositeReferenceConfigurationBuilderImpl(assemblyFactory);
- compositeBindingURIBuilder = new CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, documentBuilderFactory, transformerFactory, interfaceContractMapper, policyDefinitions, monitor);
+ compositeBindingURIBuilder = new CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, documentBuilderFactory, transformerFactory, interfaceContractMapper);
componentServicePromotionBuilder = new ComponentServicePromotionBuilderImpl(assemblyFactory);
compositeServicePromotionBuilder = new CompositeServicePromotionBuilderImpl(assemblyFactory);
- compositePromotionBuilder = new CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- compositePolicyBuilder = new CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- componentServiceBindingBuilder = new ComponentServiceBindingBuilderImpl(monitor);
- componentReferenceBindingBuilder = new ComponentReferenceBindingBuilderImpl(monitor);
+ compositePromotionBuilder = new CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ compositePolicyBuilder = new CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ componentServiceBindingBuilder = new ComponentServiceBindingBuilderImpl();
+ componentReferenceBindingBuilder = new ComponentReferenceBindingBuilderImpl();
+ }
+
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeBuilder";
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Collect and fuse includes
- compositeIncludeBuilder.build(composite);
+ compositeIncludeBuilder.build(composite, definitions, monitor);
// Expand nested composites
- compositeCloneBuilder.build(composite);
+ compositeCloneBuilder.build(composite, definitions, monitor);
// Configure all components
- componentConfigurationBuilder.build(composite);
+ componentConfigurationBuilder.build(composite, definitions, monitor);
// Connect composite services/references to promoted services/references
- compositePromotionBuilder.build(composite);
+ compositePromotionBuilder.build(composite, definitions, monitor);
// Compute the policies across the model hierarchy
- compositePolicyBuilder.build(composite);
+ compositePolicyBuilder.build(composite, definitions, monitor);
// Configure composite services
- compositeServiceConfigurationBuilder.build(composite);
+ compositeServiceConfigurationBuilder.build(composite, definitions, monitor);
// Configure composite references
- compositeReferenceConfigurationBuilder.build(composite);
+ compositeReferenceConfigurationBuilder.build(composite, definitions, monitor);
// Configure binding URIs
- compositeBindingURIBuilder.build(composite);
+ compositeBindingURIBuilder.build(composite, definitions, monitor);
// Create promoted component services
- componentServicePromotionBuilder.build(composite);
+ componentServicePromotionBuilder.build(composite, definitions, monitor);
// Create promoted composite services
- compositeServicePromotionBuilder.build(composite);
+ compositeServicePromotionBuilder.build(composite, definitions, monitor);
// Build component service binding-related information
- componentServiceBindingBuilder.build(composite);
+ componentServiceBindingBuilder.build(composite, definitions, monitor);
// Wire the components
- componentReferenceWireBuilder.build(composite);
+ componentReferenceWireBuilder.build(composite, definitions, monitor);
// Wire the promoted component references
- componentReferencePromotionWireBuilder.build(composite);
+ componentReferencePromotionWireBuilder.build(composite, definitions, monitor);
// Wire the composite references
- compositeReferenceWireBuilder.build(composite);
+ compositeReferenceWireBuilder.build(composite, definitions, monitor);
// Build component reference binding-related information
- componentReferenceBindingBuilder.build(composite);
+ componentReferenceBindingBuilder.build(composite, definitions, monitor);
// Fuse nested composites
//FIXME do this later
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java
index 5779ddbc78..d5c6b63454 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeCloneBuilderImpl.java
@@ -28,6 +28,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -37,13 +38,17 @@ import org.apache.tuscany.sca.monitor.Monitor;
*/
public class CompositeCloneBuilderImpl implements CompositeBuilder {
- public CompositeCloneBuilderImpl(Monitor monitor) {
+ public CompositeCloneBuilderImpl() {
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
expandCompositeImplementations(composite);
}
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeCloneBuilder";
+ }
+
/**
* Expand composite component implementations.
*
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java
index 5f507ece1f..7980664493 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeIncludeBuilderImpl.java
@@ -27,6 +27,9 @@ import java.util.Set;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -37,18 +40,22 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
* @version $Rev$ $Date$
*/
public class CompositeIncludeBuilderImpl implements CompositeBuilder {
-
- private Monitor monitor;
- public CompositeIncludeBuilderImpl(Monitor monitor) {
- this.monitor = monitor;
+ public CompositeIncludeBuilderImpl(FactoryExtensionPoint factories, InterfaceContractMapper mapper) {
+ }
+
+ public CompositeIncludeBuilderImpl() {
}
- public void build(Composite composite) throws CompositeBuilderException {
- fuseIncludes(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeIncludeBuilder";
}
- private void warning(String message, Object model, String... messageParameters) {
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ fuseIncludes(composite, monitor);
+ }
+
+ private void warning(Monitor monitor, String message, Object model, String... messageParameters) {
if (monitor != null){
Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
@@ -61,16 +68,17 @@ public class CompositeIncludeBuilderImpl implements CompositeBuilder {
* @param composite
* @param includes
*/
- private void collectIncludes(Composite composite, List<Composite> includes, Set<Composite> visited) {
+ private void collectIncludes(Composite composite, List<Composite> includes,
+ Set<Composite> visited, Monitor monitor) {
for (Composite include : composite.getIncludes()) {
if (visited.contains(include)) {
- warning("CompositeAlreadyIncluded", composite, include.getName().toString());
+ warning(monitor, "CompositeAlreadyIncluded", composite, include.getName().toString());
continue;
}
includes.add(include);
visited.add(include);
- collectIncludes(include, includes, visited);
+ collectIncludes(include, includes, visited, monitor);
}
}
@@ -79,13 +87,14 @@ public class CompositeIncludeBuilderImpl implements CompositeBuilder {
*
* @param composite
*/
- private void fuseIncludes(Composite composite) {
+ private void fuseIncludes(Composite composite, Monitor monitor) {
// First collect all includes
List<Composite> includes = new ArrayList<Composite>();
Set<Composite> visited = new HashSet<Composite>();
visited.add(composite);
- collectIncludes(composite, includes, visited);
+ collectIncludes(composite, includes, visited, monitor);
+
// Then clone them
for (Composite include : includes) {
Composite clone;
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
index 76ed861167..ce3c028933 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePolicyBuilderImpl.java
@@ -25,6 +25,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.EndpointFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -37,11 +38,15 @@ import org.apache.tuscany.sca.monitor.Monitor;
*/
public class CompositePolicyBuilderImpl extends BaseWireBuilderImpl implements CompositeBuilder {
- public CompositePolicyBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper, Monitor monitor) {
- super(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
+ public CompositePolicyBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper) {
+ super(assemblyFactory, endpointFactory, interfaceContractMapper);
}
- public void build(Composite composite) throws CompositeBuilderException {
- computePolicies(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositePolicyBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ computePolicies(composite, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java
index 5a6437b3a3..3f786377a9 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositePromotionBuilderImpl.java
@@ -25,6 +25,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.EndpointFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -36,11 +37,15 @@ import org.apache.tuscany.sca.monitor.Monitor;
*/
public class CompositePromotionBuilderImpl extends BaseWireBuilderImpl implements CompositeBuilder {
- public CompositePromotionBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper, Monitor monitor) {
- super(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
+ public CompositePromotionBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, InterfaceContractMapper interfaceContractMapper) {
+ super(assemblyFactory, endpointFactory, interfaceContractMapper);
}
- public void build(Composite composite) throws CompositeBuilderException {
- connectCompositeReferencesAndServices(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositePromotionBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ connectCompositeReferencesAndServices(composite, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java
index 41462b151d..09c57b617f 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceConfigurationBuilderImpl.java
@@ -31,6 +31,8 @@ import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.builder.AutomaticBinding;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A composite builder that handles the configuration of composite references.
@@ -44,7 +46,11 @@ public class CompositeReferenceConfigurationBuilderImpl implements CompositeBuil
this.assemblyFactory = assemblyFactory;
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeReferenceConfigurationBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process nested composites recursively
configureNestedCompositeReferences(composite);
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java
index 8aa1897311..7d59964efa 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeReferenceWireBuilderImpl.java
@@ -22,16 +22,15 @@ package org.apache.tuscany.sca.assembly.builder.impl;
import java.util.List;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentReference;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeReference;
import org.apache.tuscany.sca.assembly.EndpointFactory;
-import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -42,12 +41,14 @@ import org.apache.tuscany.sca.monitor.Monitor;
public class CompositeReferenceWireBuilderImpl implements CompositeBuilder {
private AssemblyFactory assemblyFactory;
private EndpointFactory endpointFactory;
- private Monitor monitor;
- public CompositeReferenceWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory, Monitor monitor) {
+ public CompositeReferenceWireBuilderImpl(AssemblyFactory assemblyFactory, EndpointFactory endpointFactory) {
this.assemblyFactory = assemblyFactory;
this.endpointFactory = endpointFactory;
- this.monitor = monitor;
+ }
+
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.ComponentReferenceWireBuilder";
}
/**
@@ -55,7 +56,7 @@ public class CompositeReferenceWireBuilderImpl implements CompositeBuilder {
*
* @param composite
*/
- public void build(Composite composite) throws CompositeBuilderException {
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process composite references declared in this composite
for (Reference reference : composite.getReferences()) {
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java
index 3aa9f3bf85..e0d3a91809 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceBindingBuilderImpl.java
@@ -28,6 +28,7 @@ import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.builder.BindingBuilderExtension;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -37,23 +38,25 @@ import org.apache.tuscany.sca.monitor.Monitor;
* @version $Rev$ $Date$
*/
public class CompositeServiceBindingBuilderImpl implements CompositeBuilder {
- private Monitor monitor;
- public CompositeServiceBindingBuilderImpl(Monitor monitor) {
- this.monitor = monitor;
+ public CompositeServiceBindingBuilderImpl() {
}
- public void build(Composite composite) throws CompositeBuilderException {
- buildServiceBindings(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeServiceBindingBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
+ buildServiceBindings(composite, monitor);
}
- private void buildServiceBindings(Composite composite) {
+ private void buildServiceBindings(Composite composite, Monitor monitor) {
// build bindings recursively
for (Component component : composite.getComponents()) {
Implementation implementation = component.getImplementation();
if (implementation instanceof Composite) {
- buildServiceBindings((Composite)implementation);
+ buildServiceBindings((Composite)implementation, monitor);
}
}
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java
index a3f31ea2fa..c5f109c473 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServiceConfigurationBuilderImpl.java
@@ -31,6 +31,8 @@ import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.builder.AutomaticBinding;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A composite builder that handles the configuration of composite services.
@@ -44,7 +46,11 @@ public class CompositeServiceConfigurationBuilderImpl implements CompositeBuilde
this.assemblyFactory = assemblyFactory;
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeServiceConfigurationBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process nested composites recursively
configureNestedCompositeServices(composite);
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
index ea0e88ac24..07efb399c3 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeServicePromotionBuilderImpl.java
@@ -27,6 +27,8 @@ import org.apache.tuscany.sca.assembly.CompositeService;
import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.definitions.SCADefinitions;
+import org.apache.tuscany.sca.monitor.Monitor;
/**
* A composite builder that handles the creation of promoted composite services.
@@ -40,7 +42,11 @@ public class CompositeServicePromotionBuilderImpl implements CompositeBuilder {
this.assemblyFactory = assemblyFactory;
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeServicePromotionBuilder";
+ }
+
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process top level composite services
for (Service service : composite.getServices()) {
diff --git a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java
index ce9a64c8d8..52e64c5067 100644
--- a/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java
+++ b/branches/sca-equinox/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/builder/impl/EndpointBuilderImpl.java
@@ -35,20 +35,17 @@ import org.apache.tuscany.sca.monitor.Problem.Severity;
*/
public abstract class EndpointBuilderImpl implements EndpointBuilder {
- private Monitor monitor;
-
- public EndpointBuilderImpl (Monitor monitor){
- this.monitor = monitor;
+ public EndpointBuilderImpl (){
}
- private void warning(String message, Object model, String... messageParameters) {
+ private void warning(Monitor monitor, String message, Object model, String... messageParameters) {
if (monitor != null){
Problem problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
}
}
- private void error(String message, Object model, Exception ex) {
+ private void error(Monitor monitor, String message, Object model, Exception ex) {
if (monitor != null){
Problem problem = null;
problem = monitor.createProblem(this.getClass().getName(), "assembly-validation-messages", Severity.ERROR, model, message, ex);
@@ -60,7 +57,7 @@ public abstract class EndpointBuilderImpl implements EndpointBuilder {
* Resolve an endpoint against the provided target information and the
* set of candidate bindings.
*/
- public void build(Endpoint endpoint) {
+ public void build(Endpoint endpoint, Monitor monitor) {
// If this endpoint is not fully configured then don't try and resolve it
if (endpoint.getTargetComponentService() == null){
@@ -90,7 +87,7 @@ public abstract class EndpointBuilderImpl implements EndpointBuilder {
PolicyConfigurationUtil.determineApplicableBindingPolicySets(endpoint.getSourceComponentReference(),
endpoint.getTargetComponentService());
} catch ( Exception e ) {
- error("PolicyRelatedException", endpoint, e);
+ error(monitor, "PolicyRelatedException", endpoint, e);
}
@@ -100,7 +97,7 @@ public abstract class EndpointBuilderImpl implements EndpointBuilder {
endpoint.getCandidateBindings(),
endpoint.getTargetComponentService().getBindings());
if (resolvedBinding == null) {
- warning("NoMatchingBinding",
+ warning(monitor, "NoMatchingBinding",
endpoint.getSourceComponentReference(),
endpoint.getSourceComponentReference().getName(),
endpoint.getTargetComponentService().getName());
@@ -114,7 +111,7 @@ public abstract class EndpointBuilderImpl implements EndpointBuilder {
endpoint.getSourceComponentReference().getCallback().getBindings(),
endpoint.getTargetComponentService().getCallback().getBindings());
if (resolvedBinding == null) {
- warning("NoMatchingCallbackBinding",
+ warning(monitor, "NoMatchingCallbackBinding",
endpoint.getSourceComponentReference(),
endpoint.getSourceComponentReference().getName(),
endpoint.getTargetComponentService().getName());
diff --git a/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder b/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder
new file mode 100644
index 0000000000..9fbabd0c3f
--- /dev/null
+++ b/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder
@@ -0,0 +1,35 @@
+# 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.
+
+org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentConfigurationBuilder
+org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentReferenceBindingBuilder
+org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentReferencePromotionWireBuilder
+org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentReferenceWireBuilder
+org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentServiceBindingBuilder
+org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.ComponentServicePromotionBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeBindingURIBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeCloneBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeIncludeBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositePolicyBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositePromotionBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceConfigurationBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeReferenceConfigurationBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeReferenceWireBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceBindingBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeServiceBindingBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceConfigurationBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeServiceConfigurationBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeServicePromotionBuilderImpl;id=org.apache.tuscany.sca.assembly.builder.CompositeServicePromotionBuilder
+org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingConfigurationBuilderImpl;id=org.apache.tuscany.assembly.builder.CompositeBindingConfigurationBuilder
diff --git a/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint b/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint
new file mode 100644
index 0000000000..693834e23d
--- /dev/null
+++ b/branches/sca-equinox/modules/assembly/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint
@@ -0,0 +1,18 @@
+# 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.
+
+org.apache.tuscany.sca.assembly.builder.DefaultCompositeBuilderExtensionPoint \ No newline at end of file
diff --git a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
index fabafc998b..5d7fff41af 100644
--- a/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
+++ b/branches/sca-equinox/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/builder/impl/CompositeBuilderTestCase.java
@@ -68,7 +68,7 @@ public class CompositeBuilderTestCase extends TestCase {
c.setName(new QName("http://foo", "C"));
c.getIncludes().add(c1);
- new CompositeIncludeBuilderImpl(null).build(c);
+ new CompositeIncludeBuilderImpl().build(c, null, null);
assertTrue(c.getComponents().get(0).getName().equals("a"));
assertTrue(c.getComponents().get(1).getName().equals("b"));
@@ -110,7 +110,7 @@ public class CompositeBuilderTestCase extends TestCase {
z.setImplementation(c1);
c.getComponents().add(z);
- new CompositeCloneBuilderImpl(null).build(c);
+ new CompositeCloneBuilderImpl().build(c, null, null);
assertTrue(c.getComponents().get(0).getImplementation() != c1);
assertTrue(c.getComponents().get(1).getImplementation() != c2);
diff --git a/branches/sca-equinox/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingProviderFactory.java b/branches/sca-equinox/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingProviderFactory.java
index b6b805e383..2651324ccf 100644
--- a/branches/sca-equinox/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-atom-abdera/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomBindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.atom.provider;
import org.apache.tuscany.sca.binding.atom.AtomBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.databinding.Mediator;
import org.apache.tuscany.sca.databinding.TransformerExtensionPoint;
@@ -50,7 +50,7 @@ public class AtomBindingProviderFactory implements BindingProviderFactory<AtomBi
public AtomBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
this.servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.messageFactory = modelFactories.getFactory(MessageFactory.class);
this.mediator = new MediatorImpl(extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class),
extensionPoints.getExtensionPoint(TransformerExtensionPoint.class));
diff --git a/branches/sca-equinox/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java b/branches/sca-equinox/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java
index 0bb38d3682..7aaa2180d3 100644
--- a/branches/sca-equinox/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-corba/src/main/java/org/apache/tuscany/sca/binding/corba/impl/CorbaBindingProcessor.java
@@ -27,12 +27,12 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
import org.apache.tuscany.sca.binding.corba.CorbaBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.policy.PolicyFactory;
/**
@@ -42,7 +42,7 @@ public class CorbaBindingProcessor implements StAXArtifactProcessor<CorbaBinding
private PolicyFactory policyFactory;
private PolicyAttachPointProcessor policyProcessor;
- public CorbaBindingProcessor(ModelFactoryExtensionPoint modelFactories) {
+ public CorbaBindingProcessor(FactoryExtensionPoint modelFactories) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
}
diff --git a/branches/sca-equinox/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java b/branches/sca-equinox/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
index 8b56f88cc7..b8a9386488 100644
--- a/branches/sca-equinox/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/impl/EJBBindingProcessor.java
@@ -26,12 +26,12 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
import org.apache.tuscany.sca.binding.ejb.EJBBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -62,7 +62,7 @@ public class EJBBindingProcessor implements StAXArtifactProcessor<EJBBindingImpl
private PolicyAttachPointProcessor policyProcessor;
private Monitor monitor;
- public EJBBindingProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public EJBBindingProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingProcessor.java b/branches/sca-equinox/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingProcessor.java
index 1cd0f72a93..d3bcaef7fa 100644
--- a/branches/sca-equinox/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-gdata-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/impl/GdataBindingProcessor.java
@@ -27,12 +27,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
//import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
@@ -53,7 +53,7 @@ public class GdataBindingProcessor implements StAXArtifactProcessor<GdataBinding
//private PolicyAttachPointProcessor policyProcessor;
- public GdataBindingProcessor(ModelFactoryExtensionPoint modelFactories) {
+ public GdataBindingProcessor(FactoryExtensionPoint modelFactories) {
this.factory = modelFactories.getFactory(GdataBindingFactory.class);
System.out.println("[Debug Info]GdataBindingProcessor reached");
//this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
diff --git a/branches/sca-equinox/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataBindingProviderFactory.java b/branches/sca-equinox/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataBindingProviderFactory.java
index fa99f4cb1b..695813a847 100644
--- a/branches/sca-equinox/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-gdata-runtime-gsoc/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GdataBindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.gdata.provider;
import org.apache.tuscany.sca.binding.gdata.GdataBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.databinding.Mediator;
import org.apache.tuscany.sca.databinding.TransformerExtensionPoint;
@@ -50,7 +50,7 @@ public class GdataBindingProviderFactory implements BindingProviderFactory<Gdata
public GdataBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
this.servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.messageFactory = modelFactories.getFactory(MessageFactory.class);
this.mediator =
new MediatorImpl(extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class), extensionPoints
diff --git a/branches/sca-equinox/modules/binding-gdata-runtime/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GDataBindingProviderFactory.java b/branches/sca-equinox/modules/binding-gdata-runtime/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GDataBindingProviderFactory.java
index bace6f68bb..8c4b0b52ce 100644
--- a/branches/sca-equinox/modules/binding-gdata-runtime/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GDataBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-gdata-runtime/src/main/java/org/apache/tuscany/sca/binding/gdata/provider/GDataBindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.gdata.provider;
import org.apache.tuscany.sca.binding.gdata.GDataBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.databinding.Mediator;
import org.apache.tuscany.sca.databinding.TransformerExtensionPoint;
@@ -50,7 +50,7 @@ public class GDataBindingProviderFactory implements BindingProviderFactory<GData
public GDataBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
this.servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.messageFactory = modelFactories.getFactory(MessageFactory.class);
this.mediator = new MediatorImpl(extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class),
extensionPoints.getExtensionPoint(TransformerExtensionPoint.class));
diff --git a/branches/sca-equinox/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java b/branches/sca-equinox/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java
index 5797629bed..4d02541e39 100644
--- a/branches/sca-equinox/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java
+++ b/branches/sca-equinox/modules/binding-gdata/src/main/java/org/apache/tuscany/sca/binding/gdata/GDataImplementationProcessor.java
@@ -24,10 +24,10 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
public class GDataImplementationProcessor implements StAXArtifactProcessor<GDataBinding> {
@@ -35,7 +35,7 @@ public class GDataImplementationProcessor implements StAXArtifactProcessor<GData
private GDataBindingFactory gdataFactory;
protected static final QName BINDING_GDATA = new QName(Constants.SCA10_TUSCANY_NS, "binding.gdata");
- public GDataImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public GDataImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.gdataFactory = (GDataBindingFactory) modelFactories.getFactory(GDataBindingFactory.class);
}
diff --git a/branches/sca-equinox/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java b/branches/sca-equinox/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
index fccd10f3cd..eb496f2421 100644
--- a/branches/sca-equinox/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-http-runtime/src/main/java/org/apache/tuscany/sca/binding/http/provider/HTTPBindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.http.provider;
import org.apache.tuscany.sca.binding.http.HTTPBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
import org.apache.tuscany.sca.invocation.MessageFactory;
@@ -46,7 +46,7 @@ public class HTTPBindingProviderFactory implements BindingProviderFactory<HTTPBi
public HTTPBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
this.servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
messageFactory = modelFactories.getFactory(MessageFactory.class);
}
diff --git a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
index b64734c97d..1ed727ed51 100644
--- a/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java
@@ -32,7 +32,6 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
@@ -40,6 +39,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -119,7 +119,7 @@ public class JMSBindingProcessor implements StAXArtifactProcessor<JMSBinding> {
private PolicyAttachPointProcessor policyProcessor;
private Monitor monitor;
- public JMSBindingProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JMSBindingProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.policyProcessor = new PolicyAttachPointProcessor(policyFactory);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingProviderFactory.java b/branches/sca-equinox/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingProviderFactory.java
index b9cababcab..216d8f3abe 100644
--- a/branches/sca-equinox/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-rss-rome/src/main/java/org/apache/tuscany/sca/binding/rss/provider/RSSBindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.rss.provider;
import org.apache.tuscany.sca.binding.rss.RSSBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.databinding.Mediator;
import org.apache.tuscany.sca.databinding.TransformerExtensionPoint;
@@ -50,7 +50,7 @@ public class RSSBindingProviderFactory implements BindingProviderFactory<RSSBind
public RSSBindingProviderFactory(ExtensionPointRegistry extensionPoints) {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
this.servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.messageFactory = modelFactories.getFactory(MessageFactory.class);
this.mediator = new MediatorImpl(extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class),
extensionPoints.getExtensionPoint(TransformerExtensionPoint.class));
diff --git a/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java b/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java
index 48d65cb735..59e0aa6494 100644
--- a/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAReferenceBindingProvider.java
@@ -31,8 +31,8 @@ import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
import org.apache.tuscany.sca.binding.ws.axis2.Axis2ReferenceBindingProvider;
import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.assembly.EndpointReferenceImpl;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
@@ -74,7 +74,7 @@ public class Axis2SCAReferenceBindingProvider implements ReferenceBindingProvide
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
ServletHost servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
this.component = component;
diff --git a/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java b/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
index 58a50d46dc..f1aaa9188a 100644
--- a/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-sca-axis2/src/main/java/org/apache/tuscany/sca/binding/sca/axis2/impl/Axis2SCAServiceBindingProvider.java
@@ -29,8 +29,8 @@ import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
import org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider;
import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
@@ -66,7 +66,7 @@ public class Axis2SCAServiceBindingProvider implements ServiceBindingProvider {
ServletHostExtensionPoint servletHosts = extensionPoints.getExtensionPoint(ServletHostExtensionPoint.class);
ServletHost servletHost = servletHosts.getServletHosts().get(0);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
MessageFactory messageFactory = modelFactories.getFactory(MessageFactory.class);
DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
diff --git a/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java b/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
index e788526069..5e4ad12c23 100644
--- a/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
+++ b/branches/sca-equinox/modules/binding-sca-axis2/src/test/java/org/apache/tuscany/sca/binding/sca/axis2/TestNode.java
@@ -33,8 +33,8 @@ import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.context.ServiceReferenceImpl;
import org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -146,8 +146,8 @@ public class TestNode {
composite.getComponents().add(component);
RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
reference.setName("default");
- ModelFactoryExtensionPoint factories =
- nodeRuntime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories =
+ nodeRuntime.getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class);
JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface));
diff --git a/branches/sca-equinox/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java b/branches/sca-equinox/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java
index a3e582c82e..9b36e8e20f 100644
--- a/branches/sca-equinox/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-sca-xml/src/main/java/org/apache/tuscany/sca/binding/sca/xml/SCABindingProcessor.java
@@ -30,12 +30,12 @@ import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
@@ -59,7 +59,7 @@ public class SCABindingProcessor implements StAXArtifactProcessor<SCABinding>, C
protected static final String BINDING_SCA = "binding.sca";
protected static final QName BINDING_SCA_QNAME = new QName(Constants.SCA10_NS, BINDING_SCA);
- public SCABindingProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public SCABindingProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
policyProcessor = new PolicyAttachPointProcessor(policyFactory);
diff --git a/branches/sca-equinox/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java b/branches/sca-equinox/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java
index a7c7c15eaa..95cff2ac28 100644
--- a/branches/sca-equinox/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/binding-sca-xml/src/test/java/org/apace/tuscany/sca/binding/sca/xml/ReadTestCase.java
@@ -34,12 +34,12 @@ import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
@@ -64,14 +64,14 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
@@ -96,7 +96,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
SCABinding referenceSCABinding = (SCABinding) composite.getComponents().get(0).getReferences().get(0).getBindings().get(0);
SCABinding serviceSCABinding = (SCABinding) composite.getComponents().get(1).getServices().get(0).getBindings().get(0);
diff --git a/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCABindingProviderFactory.java b/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCABindingProviderFactory.java
index 5dda74f72e..e0f214f395 100644
--- a/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCABindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-sca/src/main/java/org/apache/tuscany/sca/binding/sca/impl/RuntimeSCABindingProviderFactory.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.binding.sca.impl;
import org.apache.tuscany.sca.assembly.SCABinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.provider.BindingProviderFactory;
import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
diff --git a/branches/sca-equinox/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java b/branches/sca-equinox/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
index ff396566d6..ecb98ab7d6 100644
--- a/branches/sca-equinox/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
+++ b/branches/sca-equinox/modules/binding-sca/src/test/java/org/apace/tuscany/sca/binding/sca/SCABindingTestCase.java
@@ -33,11 +33,11 @@ import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
import org.apache.tuscany.sca.assembly.xml.CompositeModelResolver;
import org.apache.tuscany.sca.binding.sca.impl.SCABindingFactoryImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
@@ -67,14 +67,14 @@ public class SCABindingTestCase {
resolver = new CompositeModelResolver(null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
@@ -98,7 +98,7 @@ public class SCABindingTestCase {
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
SCABinding referenceSCABinding = (SCABinding) composite.getComponents().get(0).getReferences().get(0).getBindings().get(0);
SCABinding serviceSCABinding = (SCABinding) composite.getComponents().get(1).getServices().get(0).getBindings().get(0);
diff --git a/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/basic/Axis2BasicAuthenticationPolicyProcessor.java b/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/basic/Axis2BasicAuthenticationPolicyProcessor.java
index 019d59b80b..52d49dacf3 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/basic/Axis2BasicAuthenticationPolicyProcessor.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/authentication/basic/Axis2BasicAuthenticationPolicyProcessor.java
@@ -27,12 +27,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -45,7 +45,7 @@ public class Axis2BasicAuthenticationPolicyProcessor implements StAXArtifactProc
return Axis2BasicAuthenticationPolicy.AXIS2_BASIC_AUTHENTICATION_POLICY_QNAME;
}
- public Axis2BasicAuthenticationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public Axis2BasicAuthenticationPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java b/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java
index 6478fbedad..912a7cbc55 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/configuration/Axis2ConfigParamPolicyProcessor.java
@@ -31,12 +31,12 @@ import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -50,7 +50,7 @@ public class Axis2ConfigParamPolicyProcessor implements StAXArtifactProcessor<Ax
return AXIS2_CONFIG_PARAM_POLICY_QNAME;
}
- public Axis2ConfigParamPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public Axis2ConfigParamPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
public Axis2ConfigParamPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
index c7eb2b7794..f49e1c35dd 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2BindingProviderFactory.java
@@ -21,8 +21,8 @@ package org.apache.tuscany.sca.binding.ws.axis2;
import java.util.List;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.host.http.ServletHostExtensionPoint;
@@ -44,7 +44,7 @@ import org.osoa.sca.ServiceRuntimeException;
public class Axis2BindingProviderFactory implements BindingProviderFactory<WebServiceBinding> {
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private ServletHost servletHost;
private List<PolicyHandlerTuple> policyHandlerClassnames = null;
private DataBindingExtensionPoint dataBindings;
@@ -55,7 +55,7 @@ public class Axis2BindingProviderFactory implements BindingProviderFactory<WebSe
if (!hosts.isEmpty()) {
this.servletHost = hosts.get(0);
}
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
policyHandlerClassnames = PolicyHandlerDefinitionsLoader.loadPolicyHandlerClassnames();
dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
}
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
index 958d4aa41d..4b38b2b821 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ReferenceBindingProvider.java
@@ -22,7 +22,7 @@ import java.util.List;
import org.apache.axiom.om.OMElement;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -43,7 +43,7 @@ public class Axis2ReferenceBindingProvider implements ReferenceBindingProvider {
public Axis2ReferenceBindingProvider(RuntimeComponent component,
RuntimeComponentReference reference,
WebServiceBinding wsBinding,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
List<PolicyHandlerTuple> policyHandlerClassnames,
DataBindingExtensionPoint dataBindings) {
diff --git a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
index 5b26290732..1729a9210a 100644
--- a/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
+++ b/branches/sca-equinox/modules/binding-ws-axis2/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/Axis2ServiceBindingProvider.java
@@ -22,7 +22,7 @@ import java.util.List;
import org.apache.axiom.om.OMElement;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.host.http.ServletHost;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
@@ -42,7 +42,7 @@ public class Axis2ServiceBindingProvider implements ServiceBindingProvider {
RuntimeComponentService service,
WebServiceBinding wsBinding,
ServletHost servletHost,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
List<PolicyHandlerTuple> policyHandlerClassnames,
DataBindingExtensionPoint dataBindings) {
diff --git a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
index b9bb5ac6d3..9a89f20826 100644
--- a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
+++ b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/main/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGenerator.java
@@ -33,10 +33,10 @@ import org.apache.tuscany.sca.assembly.AbstractContract;
import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.Contract;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ResolverExtension;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.interfacedef.Operation;
@@ -185,7 +185,7 @@ public class BindingWSDLGenerator {
WebServiceBinding wsBinding,
ExtensionPointRegistry extensionPoints,
Monitor monitor) {
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
DataBindingExtensionPoint dataBindings = extensionPoints.getExtensionPoint(DataBindingExtensionPoint.class);
WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
diff --git a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
index e474c7a318..f7ed5058c5 100644
--- a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/BindingWSDLGeneratorTestCase.java
@@ -27,7 +27,7 @@ import javax.wsdl.PortType;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor;
import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -50,7 +50,7 @@ import org.osoa.sca.annotations.Remotable;
public class BindingWSDLGeneratorTestCase extends TestCase {
public void testCreateWSDLInterfaceContract() throws InvalidInterfaceException {
- DefaultModelFactoryExtensionPoint modelFactories = new DefaultModelFactoryExtensionPoint();
+ DefaultFactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint();
WSDLFactory wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
XSDFactory xsdFactory = modelFactories.getFactory(XSDFactory.class);
DefaultJavaInterfaceFactory factory = new DefaultJavaInterfaceFactory();
diff --git a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
index f1e12f8ce0..c51ab8af99 100644
--- a/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-wsdlgen/src/test/java/org/apache/tuscany/sca/binding/ws/wsdlgen/Interface2WSDLGeneratorTestCase.java
@@ -24,7 +24,7 @@ import java.io.StringWriter;
import javax.wsdl.Definition;
import javax.wsdl.xml.WSDLWriter;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor;
import org.apache.tuscany.sca.databinding.DefaultDataBindingExtensionPoint;
import org.apache.tuscany.sca.interfacedef.java.DefaultJavaInterfaceFactory;
@@ -50,7 +50,7 @@ public class Interface2WSDLGeneratorTestCase {
JAXWSFaultExceptionMapper faultExceptionMapper = new JAXWSFaultExceptionMapper(dataBindings, null);
new JAXWSJavaInterfaceProcessor(dataBindings, faultExceptionMapper, null).visitInterface(iface);
new DataBindingJavaInterfaceProcessor(dataBindings).visitInterface(iface);
- DefaultModelFactoryExtensionPoint modelFactories = new DefaultModelFactoryExtensionPoint();
+ DefaultFactoryExtensionPoint modelFactories = new DefaultFactoryExtensionPoint();
WSDLDefinition wsdlDefinition = new DefaultWSDLFactory(modelFactories).createWSDLDefinition();
DefaultXSDFactory factory = new DefaultXSDFactory();
Interface2WSDLGenerator generator = new Interface2WSDLGenerator(false, new XSDModelResolver(null, null), dataBindings, factory, null);
diff --git a/branches/sca-equinox/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java b/branches/sca-equinox/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
index f16eb5333e..cf20f37bf6 100644
--- a/branches/sca-equinox/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
+++ b/branches/sca-equinox/modules/binding-ws-xml/src/main/java/org/apache/tuscany/sca/binding/ws/xml/WebServiceBindingProcessor.java
@@ -41,13 +41,13 @@ import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
import org.apache.tuscany.sca.binding.ws.DefaultWebServiceBindingFactory;
import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
@@ -80,7 +80,7 @@ public class WebServiceBindingProcessor implements StAXArtifactProcessor<WebServ
public WebServiceBindingProcessor(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.wsFactory = new DefaultWebServiceBindingFactory();
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
diff --git a/branches/sca-equinox/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java b/branches/sca-equinox/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java
index ef955254c1..9a8580f7a5 100644
--- a/branches/sca-equinox/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/binding-ws-xml/src/test/java/org/apache/tuscany/sca/binding/ws/xml/ReadTestCase.java
@@ -33,13 +33,13 @@ import org.apache.tuscany.sca.assembly.OperationsConfigurator;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
@@ -63,7 +63,7 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
@@ -71,7 +71,7 @@ public class ReadTestCase extends TestCase {
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
@Override
@@ -91,7 +91,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
}
public void testReadPolicies() throws Exception {
@@ -100,7 +100,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
assertEquals(((OperationsConfigurator)composite.getServices().get(0).getBindings().get(0))
.getConfiguredOperations().get(0).getRequiredIntents().size(), 2);
diff --git a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
index 78f227f0da..4c80a2ebf9 100644
--- a/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
+++ b/branches/sca-equinox/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/ContributionServiceImpl.java
@@ -41,7 +41,6 @@ import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
import org.apache.tuscany.sca.contribution.ContributionMetadata;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.PackageProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -54,6 +53,7 @@ import org.apache.tuscany.sca.contribution.service.ContributionService;
import org.apache.tuscany.sca.contribution.service.ExtensibleContributionListener;
import org.apache.tuscany.sca.contribution.service.util.IOHelper;
import org.apache.tuscany.sca.contribution.xml.ContributionMetadataDocumentProcessor;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
@@ -107,7 +107,7 @@ public class ContributionServiceImpl implements ContributionService {
* Model factory extension point
*/
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
/**
* XML factory used to create reader instance to load contribution metadata
@@ -140,7 +140,7 @@ public class ContributionServiceImpl implements ContributionService {
ExtensibleContributionListener contributionListener,
ModelResolver policyDefinitionsResolver,
ModelResolverExtensionPoint modelResolvers,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
AssemblyFactory assemblyFactory,
ContributionFactory contributionFactory,
XMLInputFactory xmlFactory,
diff --git a/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java b/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
index 01083cc6a6..a53bbcc71d 100644
--- a/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
+++ b/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolverTestCase.java
@@ -24,8 +24,8 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
import org.apache.tuscany.sca.contribution.DefaultContributionFactory;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* Test DefaultArtifactResolver.
@@ -43,7 +43,7 @@ public class ExtensibleModelResolverTestCase extends TestCase {
ModelResolverExtensionPoint resolvers = new DefaultModelResolverExtensionPoint();
resolvers.addResolver(Model.class, TestModelResolver.class);
- ModelFactoryExtensionPoint factories = new DefaultModelFactoryExtensionPoint();
+ FactoryExtensionPoint factories = new DefaultFactoryExtensionPoint();
resolver = new ExtensibleModelResolver(null, resolvers, factories, null);
diff --git a/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java b/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
index 66ecd33da6..4442bf7b00 100644
--- a/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
+++ b/branches/sca-equinox/modules/contribution-impl/src/test/java/org/apache/tuscany/sca/contribution/resolver/TestModelResolver.java
@@ -23,7 +23,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A test implementation of a model resolver, based on a map.
@@ -34,7 +34,7 @@ public class TestModelResolver implements ModelResolver {
private Map<Object, Object> map = new HashMap<Object, Object>();
- public TestModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public TestModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
}
public <T> T resolveModel(Class<T> modelClass, T unresolved) {
diff --git a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
index 61c73bf2f8..fecb8406ca 100644
--- a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
+++ b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassLoaderModelResolver.java
@@ -34,11 +34,11 @@ import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.DefaultDelegatingModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
/**
@@ -55,7 +55,7 @@ public class ClassLoaderModelResolver extends URLClassLoader implements ModelRes
return parentClassLoader;
}
- public ClassLoaderModelResolver(final Contribution contribution, ModelFactoryExtensionPoint modelFactories) throws MalformedURLException {
+ public ClassLoaderModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories) throws MalformedURLException {
super(new URL[] {new URL(contribution.getLocation())}, parentClassLoader());
this.contribution = contribution;
diff --git a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
index 962512a745..d11753f3aa 100644
--- a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
+++ b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceModelResolver.java
@@ -27,9 +27,9 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
/**
@@ -44,7 +44,7 @@ public class ClassReferenceModelResolver implements ModelResolver {
private ModelResolver osgiResolver;
- public ClassReferenceModelResolver(final Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public ClassReferenceModelResolver(final Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
if (this.contribution != null) {
// Allow privileged access to get ClassLoader. Requires RuntimePermission in security policy.
@@ -84,7 +84,7 @@ public class ClassReferenceModelResolver implements ModelResolver {
Class.forName("org.apache.tuscany.sca.contribution.osgi.impl.OSGiClassReferenceModelResolver");
if (osgiResolverClass != null) {
Constructor constructor =
- osgiResolverClass.getConstructor(Contribution.class, ModelFactoryExtensionPoint.class);
+ osgiResolverClass.getConstructor(Contribution.class, FactoryExtensionPoint.class);
this.osgiResolver = (ModelResolver)constructor.newInstance(contribution, modelFactories);
}
} catch (Throwable e) {
diff --git a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
index a388ded84c..b21ad6642c 100644
--- a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaExportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaExport;
import org.apache.tuscany.sca.contribution.java.JavaImportExportFactory;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -54,7 +54,7 @@ public class JavaExportProcessor implements StAXArtifactProcessor<JavaExport> {
private final JavaImportExportFactory factory;
private final Monitor monitor;
- public JavaExportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JavaExportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
super();
this.factory = modelFactories.getFactory(JavaImportExportFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportListener.java b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportListener.java
index 47cdc9767b..4a21ad3291 100644
--- a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportListener.java
+++ b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportExportListener.java
@@ -29,13 +29,13 @@ import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaExport;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.resolver.DefaultImportAllModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionListener;
import org.apache.tuscany.sca.contribution.service.ContributionRepository;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* Java Import/Export contribution listener
@@ -51,7 +51,7 @@ public class JavaImportExportListener implements ContributionListener {
/**
* Constructs a new JavaImportExportListener
*/
- public JavaImportExportListener(ModelFactoryExtensionPoint modelFactories) {
+ public JavaImportExportListener(FactoryExtensionPoint modelFactories) {
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
}
diff --git a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
index f5f2bc3bad..7a692c1687 100644
--- a/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-java/src/main/java/org/apache/tuscany/sca/contribution/java/impl/JavaImportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.java.JavaImportExportFactory;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -55,7 +55,7 @@ public class JavaImportProcessor implements StAXArtifactProcessor<JavaImport> {
private final JavaImportExportFactory factory;
private final Monitor monitor;
- public JavaImportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JavaImportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
super();
this.factory = modelFactories.getFactory(JavaImportExportFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
index 1405ad4bd5..d4f6fec2b0 100644
--- a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
+++ b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ClassReferenceArtifactResolverTestCase.java
@@ -21,12 +21,12 @@ package org.apache.tuscany.sca.contribution.java.impl;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* Test ClassReferenceArtifactResolver.
@@ -42,7 +42,7 @@ public class ClassReferenceArtifactResolverTestCase extends TestCase {
ModelResolverExtensionPoint resolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
resolvers.addResolver(ClassReference.class, ClassReferenceModelResolver.class);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
resolver = new ExtensibleModelResolver(null, resolvers, modelFactories);
}
diff --git a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java
index 3ae161642d..ef2b646ad9 100644
--- a/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java
+++ b/branches/sca-equinox/modules/contribution-java/src/test/java/org/apache/tuscany/sca/contribution/java/impl/ContributionClassLoaderTestCase.java
@@ -28,12 +28,12 @@ import java.util.ArrayList;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.java.JavaExport;
import org.apache.tuscany.sca.contribution.java.JavaImport;
import org.apache.tuscany.sca.contribution.java.JavaImportExportFactory;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -51,7 +51,7 @@ public class ContributionClassLoaderTestCase {
@Before
public void setUp() throws Exception {
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
javaImportExportFactory = modelFactories.getFactory(JavaImportExportFactory.class);
}
diff --git a/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java b/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
index d3a2f41f85..0546cd4d4b 100644
--- a/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceExportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceExport;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImportExportFactory;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -54,7 +54,7 @@ public class NamespaceExportProcessor implements StAXArtifactProcessor<Namespace
private final NamespaceImportExportFactory factory;
private final Monitor monitor;
- public NamespaceExportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public NamespaceExportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(NamespaceImportExportFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java b/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
index d047ca5109..3cf8abf152 100644
--- a/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-namespace/src/main/java/org/apache/tuscany/sca/contribution/namespace/impl/NamespaceImportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImportExportFactory;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -56,7 +56,7 @@ public class NamespaceImportProcessor implements StAXArtifactProcessor<Namespac
private final NamespaceImportExportFactory factory;
private final Monitor monitor;
- public NamespaceImportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public NamespaceImportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(NamespaceImportExportFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ArtifactModelResolver.java b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ArtifactModelResolver.java
index e614b47fc7..5c6bb5e245 100644
--- a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ArtifactModelResolver.java
+++ b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ArtifactModelResolver.java
@@ -25,9 +25,9 @@ import java.util.Map;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resource.ResourceImport;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A Model Resolver for contribution artifacts.
@@ -38,7 +38,7 @@ public class ArtifactModelResolver implements ModelResolver {
private Contribution contribution;
private Map<String, Artifact> map = new HashMap<String, Artifact>();
- public ArtifactModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public ArtifactModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
}
diff --git a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java
index e72b66afce..f9a86406be 100644
--- a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceExportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resource.ResourceExport;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resource.ResourceImportExportFactory;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -54,7 +54,7 @@ public class ResourceExportProcessor implements StAXArtifactProcessor<ResourceEx
private final ResourceImportExportFactory factory;
private final Monitor monitor;
- public ResourceExportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ResourceExportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(ResourceImportExportFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java
index 8b8b5e996e..86950a327c 100644
--- a/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java
+++ b/branches/sca-equinox/modules/contribution-resource/src/main/java/org/apache/tuscany/sca/contribution/resource/impl/ResourceImportProcessor.java
@@ -27,7 +27,6 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resource.ResourceImport;
@@ -35,6 +34,7 @@ import org.apache.tuscany.sca.contribution.resource.ResourceImportExportFactory;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -56,7 +56,7 @@ public class ResourceImportProcessor implements StAXArtifactProcessor<ResourceI
private final ResourceImportExportFactory factory;
private final Monitor monitor;
- public ResourceImportProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ResourceImportProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(ResourceImportExportFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java
index f36f57aab1..dab69ef816 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyAttributeProcessor.java
@@ -23,13 +23,13 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXAttributeProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -40,7 +40,7 @@ import org.apache.tuscany.sca.monitor.Monitor;
public class AnyAttributeProcessor extends BaseStAXArtifactProcessor implements StAXAttributeProcessor<String> {
private static final QName ANY_ATTRIBUTE = new QName("http://www.w3.org/2001/XMLSchema", "anyAttribute");
- public AnyAttributeProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public AnyAttributeProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java
index 4ca98228ec..c69f685def 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/processor/xml/AnyElementProcessor.java
@@ -32,11 +32,11 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -58,7 +58,7 @@ public class AnyElementProcessor implements StAXArtifactProcessor<Object> {
private Document document;
private Monitor monitor;
- public AnyElementProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public AnyElementProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java
index a4cf1b3566..ff7bf7068a 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionGeneratedMetadataDocumentProcessor.java
@@ -20,8 +20,8 @@ package org.apache.tuscany.sca.contribution.xml;
import javax.xml.stream.XMLInputFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -37,7 +37,7 @@ public class ContributionGeneratedMetadataDocumentProcessor extends Contribution
super(inputFactory, staxProcessor, monitor);
}
- public ContributionGeneratedMetadataDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ContributionGeneratedMetadataDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor staxProcessor,
Monitor monitor) {
super(modelFactories, staxProcessor, monitor);
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java
index 3ab00233ab..7811d31654 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataDocumentProcessor.java
@@ -29,12 +29,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import org.apache.tuscany.sca.contribution.ContributionMetadata;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -58,7 +58,7 @@ public class ContributionMetadataDocumentProcessor implements URLArtifactProcess
this.monitor = monitor;
}
- public ContributionMetadataDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ContributionMetadataDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor staxProcessor,
Monitor monitor) {
this.inputFactory = modelFactories.getFactory(XMLInputFactory.class);
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java
index 1c49eabaf5..1a0ee97ed9 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionMetadataProcessor.java
@@ -34,13 +34,13 @@ import org.apache.tuscany.sca.contribution.ContributionFactory;
import org.apache.tuscany.sca.contribution.ContributionMetadata;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -88,7 +88,7 @@ public class ContributionMetadataProcessor extends BaseStAXArtifactProcessor imp
}
}
- public ContributionMetadataProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ContributionMetadataProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> extensionProcessor,
Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
diff --git a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
index f226dbbee3..ddc768b61c 100644
--- a/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
+++ b/branches/sca-equinox/modules/contribution-xml/src/main/java/org/apache/tuscany/sca/contribution/xml/ContributionModelResolver.java
@@ -23,8 +23,8 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* A Model Resolver for Contribution models.
@@ -35,7 +35,7 @@ public class ContributionModelResolver implements ModelResolver {
private Map<String, Contribution> map = new HashMap<String, Contribution>();
- public ContributionModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public ContributionModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
}
public void addModel(Object resolved) {
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java
index 743c2356d7..80dece4496 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/Contribution.java
@@ -92,6 +92,13 @@ public interface Contribution extends Artifact {
void setModelResolver(ModelResolver modelResolver);
/**
+ * Returns the list of contributions that this contribution depends on.
+ *
+ * @return
+ */
+ List<Contribution> getDependencies();
+
+ /**
* Returns the ClassLoader used to load classes and resources from
* this contribution
*
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java
index fc9ae607e7..0b41016caa 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/impl/ContributionImpl.java
@@ -44,6 +44,7 @@ class ContributionImpl implements Contribution {
private List<Import> imports = new ArrayList<Import>();
private List<Composite> deployables = new ArrayList<Composite>();
private List<Artifact> artifacts = new ArrayList<Artifact>();
+ private List<Contribution> dependencies = new ArrayList<Contribution>();
private ModelResolver modelResolver;
// FIXME remove this dependency on Java ClassLoaders
@@ -111,6 +112,10 @@ class ContributionImpl implements Contribution {
this.modelResolver = modelResolver;
}
+ public List<Contribution> getDependencies() {
+ return dependencies;
+ }
+
public List<Export> getExports() {
return exports;
}
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
index 1fb2ecd017..e2995b3868 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXArtifactProcessorExtensionPoint.java
@@ -31,12 +31,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
@@ -56,7 +56,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
DefaultArtifactProcessorExtensionPoint<StAXArtifactProcessor> implements StAXArtifactProcessorExtensionPoint {
private ExtensionPointRegistry extensionPoints;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private MonitorFactory monitorFactory;
private boolean loaded;
private StAXArtifactProcessor<Object> extensibleStAXProcessor;
@@ -68,7 +68,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
*/
public DefaultStAXArtifactProcessorExtensionPoint(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
- this.modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
UtilityExtensionPoint utilities = this.extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
@@ -215,7 +215,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
String factoryName,
ServiceDeclaration processorDeclaration,
ExtensionPointRegistry extensionPoints,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> extensionProcessor,
StAXAttributeProcessor<Object> extensionAttributeProcessor,
Monitor monitor) {
@@ -249,7 +249,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
.equals("org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor")) {
// Specific initialization for the DefaultBeanModelProcessor
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
try {
@@ -282,7 +282,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
throw ie;
}
} else {
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
// Load and instantiate the processor class
try {
@@ -290,7 +290,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
(Class<StAXArtifactProcessor>)processorDeclaration.loadClass();
try {
Constructor<StAXArtifactProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, Monitor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, Monitor.class);
processor = constructor.newInstance(modelFactories, monitor);
} catch (NoSuchMethodException e) {
try {
@@ -300,12 +300,12 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
} catch (NoSuchMethodException e1) {
try {
Constructor<StAXArtifactProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
processor = constructor.newInstance(modelFactories, extensionProcessor, monitor);
} catch (NoSuchMethodException e2) {
try {
Constructor<StAXArtifactProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class, StAXAttributeProcessor.class, Monitor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class, StAXAttributeProcessor.class, Monitor.class);
processor = constructor.newInstance(modelFactories, extensionProcessor, extensionAttributeProcessor, monitor);
} catch (NoSuchMethodException e2a) {
try {
@@ -321,7 +321,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
try {
Constructor<StAXArtifactProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class);
processor = constructor.newInstance(modelFactories);
} catch (NoSuchMethodException e4) {
try {
@@ -331,7 +331,7 @@ public class DefaultStAXArtifactProcessorExtensionPoint extends
} catch (NoSuchMethodException e4a) {
try {
Constructor<StAXArtifactProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class);
processor = constructor.newInstance(modelFactories, extensionProcessor);
} catch (NoSuchMethodException e5) {
Constructor<StAXArtifactProcessor> constructor =
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java
index 293b455810..5fbe2b3a52 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultStAXAttributeProcessorExtensionPoint.java
@@ -30,12 +30,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
@@ -54,7 +54,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
DefaultArtifactProcessorExtensionPoint<StAXAttributeProcessor> implements StAXAttributeProcessorExtensionPoint {
private ExtensionPointRegistry extensionPoints;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private StAXAttributeProcessor<Object> extensibleStAXAttributeProcessor;
private boolean loaded;
private Monitor monitor = null;
@@ -64,7 +64,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
*/
public DefaultStAXAttributeProcessorExtensionPoint(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
- this.modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
UtilityExtensionPoint utilities = this.extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
@@ -208,7 +208,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
String factoryName,
ServiceDeclaration processorDeclaration,
ExtensionPointRegistry extensionPoints,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
StAXAttributeProcessor<Object> extensionProcessor,
Monitor monitor) {
@@ -235,7 +235,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
@SuppressWarnings("unchecked")
private StAXAttributeProcessor getProcessor() {
if (processor == null) {
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
// Load and instantiate the processor class
try {
@@ -243,7 +243,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
(Class<StAXAttributeProcessor>)processorDeclaration.loadClass();
try {
Constructor<StAXAttributeProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, Monitor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, Monitor.class);
processor = constructor.newInstance(modelFactories, monitor);
} catch (NoSuchMethodException e) {
try {
@@ -253,7 +253,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
} catch (NoSuchMethodException e1) {
try {
Constructor<StAXAttributeProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
processor = constructor.newInstance(modelFactories, extensionProcessor, monitor);
} catch (NoSuchMethodException e2) {
try {
@@ -263,7 +263,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
} catch (NoSuchMethodException e3) {
try {
Constructor<StAXAttributeProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class);
processor = constructor.newInstance(modelFactories);
} catch (NoSuchMethodException e4) {
try {
@@ -273,7 +273,7 @@ public class DefaultStAXAttributeProcessorExtensionPoint extends
} catch (NoSuchMethodException e4a) {
try {
Constructor<StAXAttributeProcessor> constructor =
- processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class);
+ processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class);
processor = constructor.newInstance(modelFactories, extensionProcessor);
} catch (NoSuchMethodException e5) {
Constructor<StAXAttributeProcessor> constructor =
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
index 1c7dbef5ec..e4c6152bc4 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/processor/DefaultURLArtifactProcessorExtensionPoint.java
@@ -28,11 +28,11 @@ import java.util.Set;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
@@ -62,7 +62,7 @@ public class DefaultURLArtifactProcessorExtensionPoint
*/
public DefaultURLArtifactProcessorExtensionPoint(ExtensionPointRegistry extensionPoints) {
this.extensionPoints = extensionPoints;
- ModelFactoryExtensionPoint modelFactories = this.extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = this.extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
XMLOutputFactory outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
UtilityExtensionPoint utilities = this.extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
@@ -193,14 +193,14 @@ public class DefaultURLArtifactProcessorExtensionPoint
private URLArtifactProcessor getProcessor() {
if (processor == null) {
try {
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
Class<URLArtifactProcessor> processorClass = (Class<URLArtifactProcessor>)processorDeclaration.loadClass();
try {
- Constructor<URLArtifactProcessor> constructor = processorClass.getConstructor(ModelFactoryExtensionPoint.class, Monitor.class);
+ Constructor<URLArtifactProcessor> constructor = processorClass.getConstructor(FactoryExtensionPoint.class, Monitor.class);
processor = constructor.newInstance(modelFactories, monitor);
} catch (NoSuchMethodException e) {
try {
- Constructor<URLArtifactProcessor> constructor = processorClass.getConstructor(ModelFactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
+ Constructor<URLArtifactProcessor> constructor = processorClass.getConstructor(FactoryExtensionPoint.class, StAXArtifactProcessor.class, Monitor.class);
processor = constructor.newInstance(modelFactories, staxProcessor, monitor);
} catch (NoSuchMethodException e2) {
Constructor<URLArtifactProcessor> constructor = processorClass.getConstructor(ExtensionPointRegistry.class, StAXArtifactProcessor.class, Monitor.class);
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
index de54d54f94..d20737103b 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/resolver/ExtensibleModelResolver.java
@@ -25,7 +25,7 @@ import java.util.Map;
import org.apache.tuscany.sca.assembly.Base;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
/**
* An implementation of an extensible model resolver which delegates to the
@@ -35,7 +35,7 @@ import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
*/
public class ExtensibleModelResolver implements ModelResolver {
private final ModelResolverExtensionPoint resolverExtensions;
- private final ModelFactoryExtensionPoint modelFactories;
+ private final FactoryExtensionPoint modelFactories;
private final Contribution contribution;
private ModelResolver defaultResolver;
private final Map<Class<?>, ModelResolver> resolversByModelType = new HashMap<Class<?>, ModelResolver>();
@@ -54,7 +54,7 @@ public class ExtensibleModelResolver implements ModelResolver {
@Deprecated
public ExtensibleModelResolver(Contribution contribution,
ModelResolverExtensionPoint resolverExtensions,
- ModelFactoryExtensionPoint modelFactories,
+ FactoryExtensionPoint modelFactories,
ModelResolver defaultResolver) {
this.contribution = contribution;
this.resolverExtensions = resolverExtensions;
@@ -74,7 +74,7 @@ public class ExtensibleModelResolver implements ModelResolver {
*/
public ExtensibleModelResolver(Contribution contribution,
ModelResolverExtensionPoint resolverExtensions,
- ModelFactoryExtensionPoint modelFactories) {
+ FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
this.resolverExtensions = resolverExtensions;
this.modelFactories = modelFactories;
@@ -118,7 +118,7 @@ public class ExtensibleModelResolver implements ModelResolver {
try {
Constructor<? extends ModelResolver> constructor =
resolverClass
- .getConstructor(new Class[] {Contribution.class, ModelFactoryExtensionPoint.class});
+ .getConstructor(new Class[] {Contribution.class, FactoryExtensionPoint.class});
if (constructor != null) {
resolverInstance = constructor.newInstance(contribution, modelFactories);
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
index f36595d64f..202fea0e34 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
+++ b/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/service/DefaultContributionListenerExtensionPoint.java
@@ -26,8 +26,8 @@ import java.util.List;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
@@ -40,13 +40,13 @@ public class DefaultContributionListenerExtensionPoint implements ContributionLi
private List<ContributionListener> listeners = new CopyOnWriteArrayList<ContributionListener>();
private boolean loadedListeners;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
/**
* Constructs a new DefaultContributionListenerExtensionPoint.
*
*/
- public DefaultContributionListenerExtensionPoint(ModelFactoryExtensionPoint modelFactories) {
+ public DefaultContributionListenerExtensionPoint(FactoryExtensionPoint modelFactories) {
this.modelFactories = modelFactories;
}
@@ -55,7 +55,7 @@ public class DefaultContributionListenerExtensionPoint implements ContributionLi
*
*/
public DefaultContributionListenerExtensionPoint(ExtensionPointRegistry extensionPoints) {
- this.modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
}
public void addContributionListener(ContributionListener listener) {
@@ -93,7 +93,7 @@ public class DefaultContributionListenerExtensionPoint implements ContributionLi
try {
Class<ContributionListener> listenerClass = (Class<ContributionListener>)listenerDeclaration.loadClass();
try {
- Constructor<ContributionListener> constructor = listenerClass.getConstructor(ModelFactoryExtensionPoint.class);
+ Constructor<ContributionListener> constructor = listenerClass.getConstructor(FactoryExtensionPoint.class);
try {
listener = constructor.newInstance(modelFactories);
} catch (InvocationTargetException e) {
diff --git a/branches/sca-equinox/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java b/branches/sca-equinox/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java
index 2056789089..c9ee4e485f 100644
--- a/branches/sca-equinox/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java
+++ b/branches/sca-equinox/modules/core-databinding/src/main/java/org/apache/tuscany/sca/core/databinding/module/DataBindingModuleActivator.java
@@ -19,8 +19,8 @@
package org.apache.tuscany.sca.core.databinding.module;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.databinding.processor.DataBindingJavaInterfaceProcessor;
import org.apache.tuscany.sca.core.databinding.transformers.Array2ArrayTransformer;
@@ -81,7 +81,7 @@ public class DataBindingModuleActivator implements ModuleActivator {
transformers.addTransformer(new CallableReference2XMLStreamReader(), true);
transformers.addTransformer(new XMLStreamReader2CallableReference(), false);
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
// [rfeng] The JAX-WS processor should come before the Databinding processor to make sure @WebService
diff --git a/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java
index c82543c4ca..b735db2c18 100644
--- a/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java
+++ b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/ReferenceParameterProcessor.java
@@ -24,12 +24,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.runtime.ReferenceParameters;
@@ -47,7 +47,7 @@ public class ReferenceParameterProcessor implements StAXArtifactProcessor<Refere
*
* @param modelFactories
*/
- public ReferenceParameterProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ReferenceParameterProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
/**
diff --git a/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java
index 9acb4be6f8..6e93947dfb 100644
--- a/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java
+++ b/branches/sca-equinox/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/DefaultProxyFactoryExtensionPoint.java
@@ -19,8 +19,8 @@
package org.apache.tuscany.sca.core.invocation;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.invocation.MessageFactory;
@@ -41,7 +41,7 @@ public class DefaultProxyFactoryExtensionPoint implements ProxyFactoryExtensionP
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
this.interfaceContractMapper = utilities.getUtility(InterfaceContractMapper.class);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.messageFactory = modelFactories.getFactory(MessageFactory.class);
interfaceFactory = new JDKProxyFactory(messageFactory, interfaceContractMapper);
diff --git a/branches/sca-equinox/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java b/branches/sca-equinox/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
index cc19b0af53..1302710670 100644
--- a/branches/sca-equinox/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
+++ b/branches/sca-equinox/modules/databinding-sdo/src/main/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessor.java
@@ -35,13 +35,13 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -62,7 +62,7 @@ public class ImportSDOProcessor implements StAXArtifactProcessor<ImportSDO> {
private ContributionFactory contributionFactory;
private Monitor monitor;
- public ImportSDOProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ImportSDOProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java b/branches/sca-equinox/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
index fa765f9bf4..3b109f3137 100644
--- a/branches/sca-equinox/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
+++ b/branches/sca-equinox/modules/databinding-sdo/src/test/java/org/apache/tuscany/sca/databinding/sdo/ImportSDOProcessorTestCase.java
@@ -26,9 +26,9 @@ import javax.xml.stream.XMLStreamReader;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint;
import com.example.ipo.sdo.SdoFactory;
@@ -69,7 +69,7 @@ public class ImportSDOProcessorTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
- loader = new ImportSDOProcessor(new DefaultModelFactoryExtensionPoint(), null);
+ loader = new ImportSDOProcessor(new DefaultFactoryExtensionPoint(), null);
xmlFactory = XMLInputFactory.newInstance();
}
diff --git a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java
index 386e9ac7a0..44f9f17894 100644
--- a/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java
+++ b/branches/sca-equinox/modules/definitions-xml/src/main/java/org/apache/tuscany/sca/definitions/xml/SCADefinitionsDocumentProcessor.java
@@ -34,12 +34,12 @@ import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.definitions.impl.SCADefinitionsImpl;
import org.apache.tuscany.sca.definitions.util.SCADefinitionsUtil;
@@ -81,7 +81,7 @@ public class SCADefinitionsDocumentProcessor implements URLArtifactProcessor<SC
* @param modelFactories
* @param staxProcessor
*/
- public SCADefinitionsDocumentProcessor(ModelFactoryExtensionPoint modelFactories,
+ public SCADefinitionsDocumentProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> staxProcessor,
Monitor monitor) {
this.extensionProcessor = (StAXArtifactProcessor<Object>)staxProcessor;
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java
index 09bb05cf87..32f4882e11 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeConfigurationServiceImpl.java
@@ -40,25 +40,20 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.TransformerFactory;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
-import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -70,21 +65,20 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.Item;
import org.apache.tuscany.sca.data.collection.LocalItemCollection;
import org.apache.tuscany.sca.data.collection.NotFoundException;
import org.apache.tuscany.sca.implementation.node.NodeImplementation;
-import org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
-import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderException;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint;
import org.apache.tuscany.sca.workspace.processor.impl.ContributionContentProcessor;
import org.osoa.sca.annotations.Init;
import org.osoa.sca.annotations.Reference;
@@ -115,7 +109,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
@Reference
public LocalItemCollection cloudCollection;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private ModelResolverExtensionPoint modelResolvers;
private AssemblyFactory assemblyFactory;
private WorkspaceFactory workspaceFactory;
@@ -123,7 +117,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
private StAXArtifactProcessorExtensionPoint staxProcessors;
private StAXArtifactProcessor<Composite> compositeProcessor;
private XMLOutputFactory outputFactory;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder compositeBuilder;
private CompositeBuilder compositeIncludeBuilder;
private CompositeBuilder nodeConfigurationBuilder;
@@ -143,7 +137,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
monitor = monitorFactory.createMonitor();
// Get model factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -162,16 +156,16 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
contributionProcessor = new ContributionContentProcessor(modelFactories, modelResolvers, urlProcessor, staxProcessor, monitor);
- // Create contribution and composite builders
- DocumentBuilderFactory documentBuilderFactory = modelFactories.getFactory(DocumentBuilderFactory.class);
- TransformerFactory transformerFactory = modelFactories.getFactory(TransformerFactory.class);
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
- SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
- IntentAttachPointTypeFactory intentAttachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, intentAttachPointTypeFactory, documentBuilderFactory, transformerFactory, contractMapper, monitor);
- compositeIncludeBuilder = new CompositeIncludeBuilderImpl(monitor);
- nodeConfigurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, documentBuilderFactory, transformerFactory, contractMapper, null, monitor);
+ // Get a contribution dependency builder
+ ContributionBuilderExtensionPoint contributionBuilders = extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class);
+ contributionDependencyBuilder = contributionBuilders.getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder");
+
+ // Get composite builders
+ CompositeBuilderExtensionPoint compositeBuilders = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class);
+ compositeBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");
+ nodeConfigurationBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.implementation.node.builder.NodeCompositeBuilder");
+ compositeIncludeBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeIncludeBuilder");
+ nodeConfigurationBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.implementation.node.builder.NodeCompositeBuilder");
}
@Override
@@ -281,7 +275,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
// Fuse includes into the deployable composite
try {
- compositeIncludeBuilder.build(deployable);
+ compositeIncludeBuilder.build(deployable, null, monitor);
} catch (CompositeBuilderException e) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
}
@@ -338,7 +332,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
Composite nodeComposite = assemblyFactory.createComposite();
nodeComposite.setName(nodeCompositeName);
nodeComposite.getComponents().add(nodeComponent);
- nodeConfigurationBuilder.build(nodeComposite);
+ nodeConfigurationBuilder.build(nodeComposite, null, monitor);
} catch (CompositeBuilderException e) {
throw new ServletException(e);
}
@@ -347,7 +341,7 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
// Build the domain composite
try {
- compositeBuilder.build(domainComposite);
+ compositeBuilder.build(domainComposite, null, monitor);
} catch (CompositeBuilderException e) {
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.toString());
return;
@@ -501,7 +495,10 @@ public class CompositeConfigurationServiceImpl extends HttpServlet implements Se
Contribution contribution = (Contribution)contributionProcessor.read(null, uri, location);
// Resolve the contribution dependencies
- contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ try {
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
+ } catch (ContributionBuilderException e) {
+ }
contributionProcessor.resolve(contribution, workspace.getModelResolver());
return contribution;
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java
index 9e024d2d6b..d1d590d4ac 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/CompositeGeneratorServiceImpl.java
@@ -47,7 +47,6 @@ import javax.xml.stream.XMLStreamException;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -60,6 +59,7 @@ import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.data.collection.Item;
import org.apache.tuscany.sca.data.collection.LocalItemCollection;
@@ -91,7 +91,7 @@ public class CompositeGeneratorServiceImpl extends HttpServlet implements Servle
@Reference
public DomainManagerConfiguration domainManagerConfiguration;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private ModelResolverExtensionPoint modelResolvers;
private URLArtifactProcessor<Contribution> contributionProcessor;
private StAXArtifactProcessor<Composite> compositeProcessor;
@@ -124,7 +124,7 @@ public class CompositeGeneratorServiceImpl extends HttpServlet implements Servle
Monitor monitor = monitorFactory.createMonitor();
// Get model factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java
index d642244f2c..9e10a25885 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/ContributionCollectionImpl.java
@@ -59,7 +59,6 @@ import org.apache.tuscany.sca.contribution.DefaultExport;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -67,6 +66,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.Item;
@@ -80,7 +80,9 @@ import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderException;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
@@ -120,6 +122,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
private XMLInputFactory inputFactory;
private XMLOutputFactory outputFactory;
private DocumentBuilder documentBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
/**
* Cache workspace and contribution models.
@@ -151,7 +154,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
monitor = monitorFactory.createMonitor();
// Create model factories
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
@@ -169,6 +172,11 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
// Create a document builder (used to pretty print XML)
documentBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+
+ // Get contribution dependency builder
+ ContributionBuilderExtensionPoint contributionBuilders = extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class);
+ contributionDependencyBuilder = contributionBuilders.getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder");
+
}
public Entry<String, Item>[] getAll() {
@@ -182,7 +190,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
if (contribution.getURI().equals(DEPLOYMENT_CONTRIBUTION_URI)) {
continue;
}
- entries.add(entry(workspace, contribution, monitor));
+ entries.add(entry(workspace, contribution, contributionDependencyBuilder, monitor));
}
return entries.toArray(new Entry[entries.size()]);
}
@@ -194,7 +202,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
Workspace workspace = readContributions(readWorkspace());
for (Contribution contribution: workspace.getContributions()) {
if (key.equals(contribution.getURI())) {
- return item(workspace, contribution, monitor);
+ return item(workspace, contribution, contributionDependencyBuilder, monitor);
}
}
throw new NotFoundException(key);
@@ -282,8 +290,11 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
if (key.equals(contribution.getURI())) {
// Compute the contribution dependencies
- ContributionDependencyBuilder analyzer = new ContributionDependencyBuilderImpl(monitor);
- List<Contribution> dependencies = analyzer.buildContributionDependencies(contribution, workspace);
+ try {
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
+ } catch (ContributionBuilderException e) {
+ }
+ List<Contribution> dependencies = contribution.getDependencies();
// Returns entries for the dependencies
// optionally skip the specified contribution
@@ -293,7 +304,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
// Skip the specified contribution
continue;
}
- entries.add(entry(workspace, dependency, monitor));
+ entries.add(entry(workspace, dependency, contributionDependencyBuilder, monitor));
}
break;
}
@@ -363,7 +374,7 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
Contribution contribution = contributionFactory.createContribution();
contribution.setURI(uri);
contribution.setLocation(locationPath);
- entries.add(entry(suggestionWorkspace, contribution, monitor));
+ entries.add(entry(suggestionWorkspace, contribution, contributionDependencyBuilder, monitor));
}
}
@@ -379,10 +390,11 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
* @param contribution
* @return
*/
- private static Entry<String, Item> entry(Workspace workspace, Contribution contribution, Monitor monitor) {
+ private static Entry<String, Item> entry(Workspace workspace, Contribution contribution,
+ ContributionBuilder contributionDependencyBuilder, Monitor monitor) {
Entry<String, Item> entry = new Entry<String, Item>();
entry.setKey(contribution.getURI());
- entry.setData(item(workspace, contribution, monitor));
+ entry.setData(item(workspace, contribution, contributionDependencyBuilder, monitor));
return entry;
}
@@ -394,7 +406,8 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
* @param monitor
* @return
*/
- private static Item item(Workspace workspace, Contribution contribution, final Monitor monitor) {
+ private static Item item(Workspace workspace, Contribution contribution,
+ ContributionBuilder contributionDependencyBuilder, final Monitor monitor) {
String contributionURI = contribution.getURI();
Item item = new Item();
item.setTitle(title(contributionURI));
@@ -427,8 +440,11 @@ public class ContributionCollectionImpl implements ItemCollection, LocalItemColl
};
StringBuffer sb = new StringBuffer();
- ContributionDependencyBuilderImpl analyzer = new ContributionDependencyBuilderImpl(recordingMonitor);
- List<Contribution> dependencies = analyzer.buildContributionDependencies(contribution, workspace);
+ try {
+ contributionDependencyBuilder.build(contribution, workspace, recordingMonitor);
+ } catch (ContributionBuilderException e) {
+ }
+ List<Contribution> dependencies = contribution.getDependencies();
if (dependencies.size() > 1) {
sb.append("Dependencies: <span id=\"dependencies\">");
for (int i = 0, n = dependencies.size(); i < n ; i++) {
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java
index e66a8b6684..fcbe00f48a 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployableCompositeCollectionImpl.java
@@ -47,7 +47,6 @@ import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
@@ -59,6 +58,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.Item;
@@ -69,7 +69,8 @@ import org.apache.tuscany.sca.domain.manager.impl.DeployableCompositeCollectionI
import org.apache.tuscany.sca.implementation.node.NodeImplementation;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.MonitorFactory;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
import org.apache.tuscany.sca.workspace.processor.impl.ContributionContentProcessor;
import org.osoa.sca.annotations.Init;
@@ -94,11 +95,11 @@ public class DeployableCompositeCollectionImpl implements ItemCollection, LocalI
@Reference
public DomainManagerConfiguration domainManagerConfiguration;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private ModelResolverExtensionPoint modelResolvers;
private URLArtifactProcessor<Contribution> contributionProcessor;
private XMLOutputFactory outputFactory;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private Monitor monitor;
/**
@@ -128,7 +129,7 @@ public class DeployableCompositeCollectionImpl implements ItemCollection, LocalI
monitor = monitorFactory.createMonitor();
// Get model factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
@@ -144,8 +145,9 @@ public class DeployableCompositeCollectionImpl implements ItemCollection, LocalI
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
contributionProcessor = new ContributionContentProcessor(modelFactories, modelResolvers, urlProcessor, staxProcessor, monitor);
- // Create contribution and composite builders
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ // Get a contribution dependency builder
+ ContributionBuilderExtensionPoint contributionBuilders = extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class);
+ contributionDependencyBuilder = contributionBuilders.getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder");
}
public Entry<String, Item>[] getAll() {
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployedCompositeCollectionImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployedCompositeCollectionImpl.java
index e95a0cc585..d2d1e04a79 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployedCompositeCollectionImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/DeployedCompositeCollectionImpl.java
@@ -50,10 +50,10 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.Item;
import org.apache.tuscany.sca.data.collection.ItemCollection;
@@ -94,7 +94,7 @@ public class DeployedCompositeCollectionImpl implements ItemCollection, LocalIte
@Reference
public DomainManagerConfiguration domainManagerConfiguration;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private AssemblyFactory assemblyFactory;
private StAXArtifactProcessor<Composite> compositeProcessor;
private XMLOutputFactory outputFactory;
@@ -118,7 +118,7 @@ public class DeployedCompositeCollectionImpl implements ItemCollection, LocalIte
// Create factories
ExtensionPointRegistry extensionPoints = domainManagerConfiguration.getExtensionPoints();
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, true);
diff --git a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
index d68cfa3786..53616f3b46 100644
--- a/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
+++ b/branches/sca-equinox/modules/domain-manager/src/main/java/org/apache/tuscany/sca/domain/manager/impl/NodeProcessCollectionFacadeImpl.java
@@ -31,8 +31,8 @@ import javax.xml.namespace.QName;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.binding.atom.AtomBindingFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.assembly.CompositeActivator;
import org.apache.tuscany.sca.data.collection.Entry;
import org.apache.tuscany.sca.data.collection.Item;
@@ -81,7 +81,7 @@ public class NodeProcessCollectionFacadeImpl implements ItemCollection, LocalIte
// Get the model factories
ExtensionPointRegistry extensionPoints = domainManagerConfiguration.getExtensionPoints();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
atomBindingFactory = modelFactories.getFactory(AtomBindingFactory.class);
}
diff --git a/branches/sca-equinox/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java b/branches/sca-equinox/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
index 5a2d9babf4..b262f51d45 100644
--- a/branches/sca-equinox/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
+++ b/branches/sca-equinox/modules/endpoint/src/test/java/org/apace/tuscany/sca/binding/sca/EndpointTestCase.java
@@ -36,7 +36,6 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
import org.apache.tuscany.sca.contribution.Contribution;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -47,6 +46,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -71,7 +71,7 @@ public class EndpointTestCase {
private static URLArtifactProcessor<Contribution> contributionProcessor;
private static ModelResolverExtensionPoint modelResolvers;
- private static ModelFactoryExtensionPoint modelFactories;
+ private static FactoryExtensionPoint modelFactories;
private static AssemblyFactory assemblyFactory;
private static XMLOutputFactory outputFactory;
private static StAXArtifactProcessor<Object> xmlProcessor;
@@ -79,6 +79,7 @@ public class EndpointTestCase {
private static ModelResolver modelResolver;
private static CompositeActivator compositeActivator;
private static ExtensionPointRegistry extensionPoints;
+ private static Monitor monitor;
@BeforeClass
public static void init() {
@@ -89,9 +90,9 @@ public class EndpointTestCase {
// Create a monitor
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- Monitor monitor = monitorFactory.createMonitor();
+ monitor = monitorFactory.createMonitor();
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
// Initialize the Tuscany module activators
ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class);
@@ -124,7 +125,7 @@ public class EndpointTestCase {
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
// Runtime Init ===================
/*
@@ -186,7 +187,7 @@ public class EndpointTestCase {
Composite composite = contribution.getDeployables().get(0);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, monitor);
ComponentReference ref = (composite.getComponents().get(0).getReferences().get(0));
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java
index bf8d75dba9..1d0da12f91 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/DefaultModelFactoryExtensionPoint.java
+++ b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/DefaultFactoryExtensionPoint.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.contribution;
+package org.apache.tuscany.sca.core;
import java.lang.reflect.Constructor;
import java.util.HashMap;
@@ -26,19 +26,20 @@ import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+
/**
* Default implementation of a model factory extension point.
*
* @version $Rev$ $Date$
*/
-public class DefaultModelFactoryExtensionPoint implements ModelFactoryExtensionPoint {
+public class DefaultFactoryExtensionPoint implements FactoryExtensionPoint {
private HashMap<Class<?>, Object> factories = new HashMap<Class<?>, Object>();
/**
* Constructs a new DefaultModelFactoryExtensionPoint.
*/
- public DefaultModelFactoryExtensionPoint() {
+ public DefaultFactoryExtensionPoint() {
}
/**
@@ -103,7 +104,7 @@ public class DefaultModelFactoryExtensionPoint implements ModelFactoryExtensionP
} catch (NoSuchMethodException e) {
// Constructor taking the model factory extension point
- Constructor<?> constructor = factoryClass.getConstructor(ModelFactoryExtensionPoint.class);
+ Constructor<?> constructor = factoryClass.getConstructor(FactoryExtensionPoint.class);
factory = constructor.newInstance(this);
}
diff --git a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/ModelFactoryExtensionPoint.java b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/FactoryExtensionPoint.java
index 0ada4ebec3..4d38cb8afe 100644
--- a/branches/sca-equinox/modules/contribution/src/main/java/org/apache/tuscany/sca/contribution/ModelFactoryExtensionPoint.java
+++ b/branches/sca-equinox/modules/extensibility/src/main/java/org/apache/tuscany/sca/core/FactoryExtensionPoint.java
@@ -17,7 +17,7 @@
* under the License.
*/
-package org.apache.tuscany.sca.contribution;
+package org.apache.tuscany.sca.core;
/**
* An extension point for model factories. Model factories are provided to
@@ -28,7 +28,7 @@ package org.apache.tuscany.sca.contribution;
*
* @version $Rev$ $Date$
*/
-public interface ModelFactoryExtensionPoint {
+public interface FactoryExtensionPoint {
/**
* Add a model factory extension.
diff --git a/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint b/branches/sca-equinox/modules/extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.FactoryExtensionPoint
index 6b4d2ebdeb..3c135aa267 100644
--- a/branches/sca-equinox/modules/contribution/src/main/resources/META-INF/services/org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint
+++ b/branches/sca-equinox/modules/extensibility/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.FactoryExtensionPoint
@@ -15,4 +15,4 @@
# specific language governing permissions and limitations
# under the License.
-org.apache.tuscany.sca.contribution.DefaultModelFactoryExtensionPoint
+org.apache.tuscany.sca.core.DefaultFactoryExtensionPoint
diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
index 1bca290c27..cb1011a5dc 100644
--- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
+++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java
@@ -46,6 +46,7 @@ import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;
import org.apache.tuscany.sca.node.impl.NodeImpl;
+import org.apache.tuscany.sca.node.impl.NodeUtil;
import org.osoa.sca.CallableReference;
import org.osoa.sca.ServiceReference;
@@ -117,7 +118,7 @@ public class DefaultSCADomain extends SCADomain {
if (url == null) {
continue;
}
- String location = NodeImpl.getContributionURL(url, composites[i]).toString();
+ String location = NodeUtil.getContributionURL(url, composites[i]).toString();
if (!contributionURLs.contains(location)) {
contributionURLs.add(location);
}
diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
index 519e76d0ae..b1e4b13833 100644
--- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
+++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java
@@ -31,8 +31,8 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.service.ContributionService;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
import org.apache.tuscany.sca.core.assembly.CompositeActivator;
import org.apache.tuscany.sca.core.context.ServiceReferenceImpl;
@@ -154,8 +154,8 @@ public class EmbeddedSCADomain extends SCADomain {
composite.getComponents().add(component);
RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference();
reference.setName("default");
- ModelFactoryExtensionPoint factories =
- runtime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories =
+ runtime.getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class);
JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class);
InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract();
interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface));
diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
index ae04169933..51b22ffdb0 100644
--- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
+++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java
@@ -37,7 +37,6 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
@@ -45,6 +44,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionService;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
@@ -115,7 +115,7 @@ public class ReallySmallRuntime {
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
// Get factory extension point
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
// Get Message factory
MessageFactory messageFactory = factories.getFactory(MessageFactory.class);
@@ -214,7 +214,7 @@ public class ReallySmallRuntime {
public void buildComposite(Composite composite) throws CompositeBuilderException {
//Get factory extension point
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory intentAttachPointTypeFactory = factories.getFactory(IntentAttachPointTypeFactory.class);
EndpointFactory endpointFactory = factories.getFactory(EndpointFactory.class);
diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
index 738e5e6248..9b1ab420c9 100644
--- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
+++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java
@@ -39,7 +39,6 @@ import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
import org.apache.tuscany.sca.context.ContextFactoryExtensionPoint;
import org.apache.tuscany.sca.context.RequestContextFactory;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensiblePackageProcessor;
@@ -61,6 +60,7 @@ import org.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryIm
import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl;
import org.apache.tuscany.sca.contribution.service.impl.PackageTypeDescriberImpl;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
import org.apache.tuscany.sca.core.assembly.CompositeActivator;
@@ -123,7 +123,7 @@ public class ReallySmallRuntimeBuilder {
registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class);
JavaInterfaceFactory javaInterfaceFactory =
- registry.getExtensionPoint(ModelFactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
+ registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
RequestContextFactory requestContextFactory =
registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class);
@@ -179,7 +179,7 @@ public class ReallySmallRuntimeBuilder {
throws ActivationException {
// Get the model factory extension point
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
// Create a new XML input factory
// Allow privileged access to factory. Requires RuntimePermission in security policy file.
diff --git a/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java b/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java
index f6f077e99b..e89df5a555 100644
--- a/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java
+++ b/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java
@@ -20,9 +20,9 @@
package org.apache.tuscany.sca.host.embedded.test.extension.module;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.host.embedded.test.extension.DefaultTestImplementationFactory;
import org.apache.tuscany.sca.host.embedded.test.extension.TestImplementationFactory;
@@ -43,7 +43,7 @@ public class TestModuleActivator implements ModuleActivator {
public void start(ExtensionPointRegistry registry) {
// Create the test implementation factory
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
TestImplementationFactory testFactory = new DefaultTestImplementationFactory(assemblyFactory, javaFactory);
diff --git a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELFactoryImpl.java b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELFactoryImpl.java
index ab53964fb3..f9b95c7da8 100644
--- a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELFactoryImpl.java
+++ b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/impl/BPELFactoryImpl.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.implementation.bpel.impl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
@@ -31,7 +31,7 @@ import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
*/
public class BPELFactoryImpl implements BPELFactory {
- public BPELFactoryImpl(ModelFactoryExtensionPoint modelFactories) {
+ public BPELFactoryImpl(FactoryExtensionPoint modelFactories) {
}
public BPELImplementation createBPELImplementation() {
diff --git a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentProcessor.java b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentProcessor.java
index 15b12a1a47..462516c581 100644
--- a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentProcessor.java
+++ b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELDocumentProcessor.java
@@ -37,12 +37,12 @@ import javax.xml.namespace.QName;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
import org.apache.tuscany.sca.implementation.bpel.BPELProcessDefinition;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
@@ -88,7 +88,7 @@ public class BPELDocumentProcessor extends BaseStAXArtifactProcessor implements
private WSDLFactory WSDLfactory;
private Monitor monitor;
- public BPELDocumentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public BPELDocumentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(BPELFactory.class);
this.WSDLfactory = modelFactories.getFactory(WSDLFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELImplementationProcessor.java b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELImplementationProcessor.java
index 04752a3969..9cd6fcb912 100644
--- a/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-bpel/src/main/java/org/apache/tuscany/sca/implementation/bpel/xml/BPELImplementationProcessor.java
@@ -38,13 +38,13 @@ import org.apache.tuscany.sca.assembly.Property;
import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.databinding.xml.DOMDataBinding;
import org.apache.tuscany.sca.implementation.bpel.BPELFactory;
import org.apache.tuscany.sca.implementation.bpel.BPELImplementation;
@@ -77,7 +77,7 @@ public class BPELImplementationProcessor extends BaseStAXArtifactProcessor imple
private WSDLFactory wsdlFactory;
private Monitor monitor;
- public BPELImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public BPELImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
this.bpelFactory = modelFactories.getFactory(BPELFactory.class);
diff --git a/branches/sca-equinox/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java b/branches/sca-equinox/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java
index 7390166055..d1a72f248c 100644
--- a/branches/sca-equinox/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-ejb/src/main/java/org/apache/tuscany/sca/implementation/ejb/xml/EJBImplementationProcessor.java
@@ -28,13 +28,13 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.ejb.EJBImplementation;
import org.apache.tuscany.sca.implementation.ejb.EJBImplementationFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -55,7 +55,7 @@ public class EJBImplementationProcessor extends BaseStAXArtifactProcessor implem
private EJBImplementationFactory implementationFactory;
private Monitor monitor;
- public EJBImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public EJBImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.implementationFactory = modelFactories.getFactory(EJBImplementationFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/implementation-ejb/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java b/branches/sca-equinox/modules/implementation-ejb/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java
index b692ab3f5a..4cc050d22b 100644
--- a/branches/sca-equinox/modules/implementation-ejb/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/implementation-ejb/src/test/java/org/apache/tuscany/sca/implementation/ejb/xml/ReadTestCase.java
@@ -31,12 +31,12 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.implementation.ejb.EJBImplementation;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -61,13 +61,13 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
public void testReadComposite() throws Exception {
@@ -76,7 +76,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite) staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
assertTrue(((EJBImplementation) composite.getComponents().get(0).getImplementation()).getEJBLink().equals("module.jar#TestEJB"));
}
diff --git a/branches/sca-equinox/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java b/branches/sca-equinox/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
index 111b008b96..3555eb19f1 100644
--- a/branches/sca-equinox/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
+++ b/branches/sca-equinox/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/module/JavaRuntimeModuleActivator.java
@@ -24,8 +24,8 @@ import java.util.List;
import org.apache.tuscany.sca.context.ComponentContextFactory;
import org.apache.tuscany.sca.context.ContextFactoryExtensionPoint;
import org.apache.tuscany.sca.context.RequestContextFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.invocation.CglibProxyFactory;
@@ -56,7 +56,7 @@ public class JavaRuntimeModuleActivator implements ModuleActivator {
public void start(ExtensionPointRegistry registry) {
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
MessageFactory messageFactory = factories.getFactory(MessageFactory.class);
UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
diff --git a/branches/sca-equinox/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java b/branches/sca-equinox/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
index 6bc581094d..15fdf4d162 100644
--- a/branches/sca-equinox/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-java-xml/src/main/java/org/apache/tuscany/sca/implementation/java/xml/JavaImplementationProcessor.java
@@ -43,13 +43,13 @@ import org.apache.tuscany.sca.assembly.Service;
import org.apache.tuscany.sca.assembly.xml.ConfiguredOperationProcessor;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.java.IntrospectionException;
import org.apache.tuscany.sca.implementation.java.JavaElementImpl;
import org.apache.tuscany.sca.implementation.java.JavaImplementation;
@@ -79,7 +79,7 @@ public class JavaImplementationProcessor implements StAXArtifactProcessor<JavaIm
private ConfiguredOperationProcessor configuredOperationProcessor;
private Monitor monitor;
- public JavaImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JavaImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.javaFactory = modelFactories.getFactory(JavaImplementationFactory.class);
diff --git a/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java b/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java
index e5912906f5..978bc79ba4 100644
--- a/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/ReadTestCase.java
@@ -35,7 +35,6 @@ import org.apache.tuscany.sca.assembly.OperationsConfigurator;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -43,6 +42,7 @@ import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -71,13 +71,13 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
policyDefinitionsProcessor = documentProcessors.getProcessor(SCADefinitions.class);
@@ -89,7 +89,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
}
@@ -108,7 +108,7 @@ public class ReadTestCase extends TestCase {
staxProcessor.resolve(scaDefns, resolver);
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
//intents are computed and aggregate intents from ancestor elements
assertEquals(((PolicySetAttachPoint)composite.getComponents().get(0)).getRequiredIntents().size(), 3);
@@ -178,7 +178,7 @@ public class ReadTestCase extends TestCase {
staxProcessor.resolve(policyDefinitions, resolver);
staxProcessor.resolve(composite, resolver);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
//test for determination of policysets for implementation
assertEquals(((PolicySetAttachPoint)composite.getComponents().get(0)).getPolicySets().size(), 1);
diff --git a/branches/sca-equinox/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementationActivator.java b/branches/sca-equinox/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementationActivator.java
index 441b1b8fb9..39484b8840 100644
--- a/branches/sca-equinox/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementationActivator.java
+++ b/branches/sca-equinox/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/JavaImplementationActivator.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.implementation.java;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.implementation.java.introspect.BaseJavaClassVisitor;
import org.apache.tuscany.sca.implementation.java.introspect.JavaClassVisitor;
@@ -52,7 +52,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
public class JavaImplementationActivator implements ModuleActivator {
public void start(ExtensionPointRegistry registry) {
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
diff --git a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
index 736afc13f0..2df1ad48c0 100644
--- a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
+++ b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/builder/impl/NodeCompositeBuilderImpl.java
@@ -34,7 +34,8 @@ import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
-import org.apache.tuscany.sca.assembly.builder.impl.BaseConfigurationBuilderImpl;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.definitions.SCADefinitions;
import org.apache.tuscany.sca.implementation.node.NodeImplementation;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
@@ -46,17 +47,20 @@ import org.apache.tuscany.sca.monitor.Monitor;
*
* @version $Rev$ $Date$
*/
-public class NodeCompositeBuilderImpl extends BaseConfigurationBuilderImpl implements CompositeBuilder {
+public class NodeCompositeBuilderImpl implements CompositeBuilder {
+
+ private CompositeBuilder bindingConfigurationBuilder;
+
+ public NodeCompositeBuilderImpl(CompositeBuilderExtensionPoint compositeBuilders, FactoryExtensionPoint factories, InterfaceContractMapper mapper) {
+ bindingConfigurationBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.assembly.builder.CompositeBindingConfigurationBuilder");
+ }
@Deprecated
public NodeCompositeBuilderImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
- super(assemblyFactory, scaBindingFactory,
- null, null,
- interfaceContractMapper, policyDefinitions, monitor);
+ CompositeBuilder bindingConfigurationBuilder) {
+ this.bindingConfigurationBuilder = bindingConfigurationBuilder;
}
public NodeCompositeBuilderImpl(AssemblyFactory assemblyFactory,
@@ -64,24 +68,15 @@ public class NodeCompositeBuilderImpl extends BaseConfigurationBuilderImpl imple
DocumentBuilderFactory documentBuilderFactory,
TransformerFactory transformerFactory,
InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
- super(assemblyFactory, scaBindingFactory,
- documentBuilderFactory, transformerFactory,
- interfaceContractMapper, policyDefinitions, monitor);
+ CompositeBuilder bindingConfigurationBuilder) {
+ this.bindingConfigurationBuilder = bindingConfigurationBuilder;
}
- public void build(Composite composite) throws CompositeBuilderException {
- configureNodeComponents(composite);
+ public String getID() {
+ return "org.apache.tuscany.sca.implementation.node.builder.NodeCompositeBuilder";
}
- /**
- * Configure the node components in the given composite.
- *
- * @param composite
- * @throws CompositeBuilderException
- */
- private void configureNodeComponents(Composite composite) throws CompositeBuilderException {
+ public void build(Composite composite, SCADefinitions definitions, Monitor monitor) throws CompositeBuilderException {
// Process each node component in the given composite
for (Component component: composite.getComponents()) {
@@ -100,7 +95,9 @@ public class NodeCompositeBuilderImpl extends BaseConfigurationBuilderImpl imple
// Configure services in the application composite assigned to
// the node using the default bindings.
- configureBindingURIs(applicationComposite, defaultBindings);
+ applicationComposite.getExtensions().add(defaultBindings);
+ bindingConfigurationBuilder.build(applicationComposite, definitions, monitor);
+ applicationComposite.getExtensions().remove(defaultBindings);
}
}
diff --git a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java
index e695340d45..d6e3174702 100644
--- a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/ConfiguredNodeImplementationProcessor.java
@@ -33,13 +33,13 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation;
import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -63,7 +63,7 @@ public class ConfiguredNodeImplementationProcessor extends BaseStAXArtifactProce
private AssemblyFactory assemblyFactory;
private NodeImplementationFactory implementationFactory;
- public ConfiguredNodeImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ConfiguredNodeImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.implementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
diff --git a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java
index 201354f89c..3206d9a936 100644
--- a/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/xml/NodeImplementationProcessor.java
@@ -28,13 +28,13 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.node.NodeImplementation;
import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -51,7 +51,7 @@ public class NodeImplementationProcessor extends BaseStAXArtifactProcessor imple
private AssemblyFactory assemblyFactory;
private NodeImplementationFactory implementationFactory;
- public NodeImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public NodeImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.implementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
}
diff --git a/branches/sca-equinox/modules/implementation-node/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder b/branches/sca-equinox/modules/implementation-node/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder
new file mode 100644
index 0000000000..1ad6df149d
--- /dev/null
+++ b/branches/sca-equinox/modules/implementation-node/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.CompositeBuilder
@@ -0,0 +1,18 @@
+# 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.
+
+org.apache.tuscany.sca.implementation.node.builder.impl.NodeCompositeBuilderImpl;id=org.apache.tuscany.sca.implementation.node.builder.NodeCompositeBuilder
diff --git a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java
index 74648701c6..68dbfaa406 100644
--- a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java
+++ b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/builder/impl/CalculateBindingURITestCase.java
@@ -37,6 +37,7 @@ import org.apache.tuscany.sca.assembly.DefaultAssemblyFactory;
import org.apache.tuscany.sca.assembly.SCABinding;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingConfigurationBuilderImpl;
import org.apache.tuscany.sca.implementation.node.NodeImplementation;
import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
import org.apache.tuscany.sca.implementation.node.impl.NodeImplementationFactoryImpl;
@@ -52,7 +53,8 @@ public class CalculateBindingURITestCase extends TestCase {
private SCABindingFactory scaBindingFactory;
private NodeImplementationFactory nodeImplementationFactory;
private Monitor monitor;
- private CompositeBuilder configurationBuilder;
+ private CompositeBuilder bindingConfigurationBuilder;
+ private CompositeBuilder nodeConfigurationBuilder;
private List<Binding> defaultBindings = new ArrayList<Binding>();
@Override
@@ -60,7 +62,8 @@ public class CalculateBindingURITestCase extends TestCase {
assemblyFactory = new DefaultAssemblyFactory();
scaBindingFactory = new TestBindingFactory();
nodeImplementationFactory = new NodeImplementationFactoryImpl();
- configurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, null, null, monitor);
+ bindingConfigurationBuilder = new CompositeBindingConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, null);
+ nodeConfigurationBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, null, bindingConfigurationBuilder);
Binding defaultBinding = new TestBindingImpl();
defaultBinding.setURI("http://myhost:8080/root");
defaultBindings.add(defaultBinding);
@@ -238,7 +241,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1", b.getURI());
} catch(Exception ex){
@@ -252,7 +255,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = composite.getComponents().get(0).getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/s1", b.getURI());
} catch(Exception ex){
@@ -267,7 +270,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setName("n");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/n", b.getURI());
} catch(Exception ex){
@@ -283,7 +286,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/b", b.getURI());
} catch(Exception ex){
@@ -299,7 +302,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("http://myhost:8080/b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/b", b.getURI());
} catch(Exception ex){
@@ -315,7 +318,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("../../b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/b", b.getURI());
} catch(Exception ex){
@@ -332,7 +335,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = composite.getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root", b.getURI());
} catch(Exception ex){
@@ -346,7 +349,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = composite.getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/s1", b.getURI());
} catch(Exception ex){
@@ -361,7 +364,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setName("n");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/n", b.getURI());
} catch(Exception ex){
@@ -377,7 +380,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/b", b.getURI());
} catch(Exception ex){
@@ -393,7 +396,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("http://myhost:8080/b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/b", b.getURI());
} catch(Exception ex){
@@ -410,7 +413,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = ((Composite)composite.getComponents().get(0).getImplementation()).getComponents().get(0).getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/c2", b.getURI());
} catch(Exception ex){
@@ -424,7 +427,7 @@ public class CalculateBindingURITestCase extends TestCase {
Binding b = ((Composite)composite.getComponents().get(0).getImplementation()).getComponents().get(0).getServices().get(0).getBindings().get(0);
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/c2/s1", b.getURI());
} catch(Exception ex){
@@ -439,7 +442,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setName("n");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/c2/n", b.getURI());
} catch(Exception ex){
@@ -455,7 +458,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/root/c1/c2/b", b.getURI());
} catch(Exception ex){
@@ -471,7 +474,7 @@ public class CalculateBindingURITestCase extends TestCase {
b.setURI("http://myhost:8080/b");
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
assertEquals("http://myhost:8080/b", b.getURI());
} catch(Exception ex){
@@ -493,7 +496,7 @@ public class CalculateBindingURITestCase extends TestCase {
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
fail();
} catch(Exception ex){
//System.out.println(ex.toString());
@@ -514,7 +517,7 @@ public class CalculateBindingURITestCase extends TestCase {
try {
- configurationBuilder.build(nodeComposite(composite));
+ nodeConfigurationBuilder.build(nodeComposite(composite), null, null);
fail();
} catch(Exception ex){
System.out.println(ex.toString());
diff --git a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java
index 6c08bbed0f..4033f9225c 100644
--- a/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/implementation-node/src/test/java/org/apache/tuscany/sca/implementation/node/xml/ReadTestCase.java
@@ -31,12 +31,12 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
@@ -59,13 +59,13 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
public void testReadComposite() throws Exception {
@@ -74,7 +74,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
}
}
diff --git a/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationFactoryImpl.java b/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationFactoryImpl.java
index d4db8772e4..2eb7b681b6 100644
--- a/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationFactoryImpl.java
+++ b/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationFactoryImpl.java
@@ -20,7 +20,7 @@
package org.apache.tuscany.sca.implementation.resource.impl;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.resource.ResourceImplementation;
import org.apache.tuscany.sca.implementation.resource.ResourceImplementationFactory;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
@@ -35,7 +35,7 @@ public class ResourceImplementationFactoryImpl implements ResourceImplementation
private AssemblyFactory assemblyFactory;
private JavaInterfaceFactory javaFactory;
- public ResourceImplementationFactoryImpl(ModelFactoryExtensionPoint modelFactories) {
+ public ResourceImplementationFactoryImpl(FactoryExtensionPoint modelFactories) {
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
}
diff --git a/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java b/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java
index bf9b5e5090..116a5176a8 100644
--- a/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-resource/src/main/java/org/apache/tuscany/sca/implementation/resource/impl/ResourceImplementationProcessor.java
@@ -31,12 +31,12 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.resource.ResourceImplementation;
import org.apache.tuscany.sca.implementation.resource.ResourceImplementationFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -57,7 +57,7 @@ public class ResourceImplementationProcessor implements StAXArtifactProcessor<Re
private ResourceImplementationFactory implementationFactory;
private Monitor monitor;
- public ResourceImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ResourceImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
implementationFactory = modelFactories.getFactory(ResourceImplementationFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptImplementationProcessor.java b/branches/sca-equinox/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptImplementationProcessor.java
index db97ec7c67..64c4a8eed9 100644
--- a/branches/sca-equinox/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-script/src/main/java/org/apache/tuscany/sca/implementation/script/ScriptImplementationProcessor.java
@@ -33,12 +33,12 @@ import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -56,7 +56,7 @@ public class ScriptImplementationProcessor implements StAXArtifactProcessor<Scri
private ContributionFactory contributionFactory;
private Monitor monitor;
- public ScriptImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ScriptImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java b/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java
index eb2d2c7ba0..fc05fb8d9f 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProcessor.java
@@ -30,12 +30,12 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.ComponentType;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.assembly.xml.PolicyAttachPointProcessor;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
import org.apache.tuscany.sca.implementation.spring.xml.SpringXMLComponentTypeLoader;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
@@ -65,7 +65,7 @@ public class SpringImplementationProcessor implements StAXArtifactProcessor<Spri
private PolicyAttachPointProcessor policyProcessor;
private Monitor monitor;
- public SpringImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public SpringImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
this.javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
this.javaImplementationFactory = modelFactories.getFactory(JavaImplementationFactory.class);
diff --git a/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationFactory.java b/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationFactory.java
index 2493b97f5c..dc5759a13d 100644
--- a/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationFactory.java
+++ b/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationFactory.java
@@ -20,7 +20,7 @@
package org.apache.tuscany.sca.implementation.widget;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
/**
@@ -33,7 +33,7 @@ public class WidgetImplementationFactory {
private AssemblyFactory assemblyFactory;
private JavaInterfaceFactory javaFactory;
- public WidgetImplementationFactory(ModelFactoryExtensionPoint modelFactories) {
+ public WidgetImplementationFactory(FactoryExtensionPoint modelFactories) {
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
}
diff --git a/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java b/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
index 19be40f50f..717750be80 100644
--- a/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-widget/src/main/java/org/apache/tuscany/sca/implementation/widget/WidgetImplementationProcessor.java
@@ -32,12 +32,12 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -57,7 +57,7 @@ public class WidgetImplementationProcessor implements StAXArtifactProcessor<Widg
private WidgetImplementationFactory implementationFactory;
private Monitor monitor;
- public WidgetImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public WidgetImplementationProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
contributionFactory = modelFactories.getFactory(ContributionFactory.class);
implementationFactory = new WidgetImplementationFactory(modelFactories);
diff --git a/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java b/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java
index 82930dd9f2..a667f24dfa 100644
--- a/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java
+++ b/branches/sca-equinox/modules/implementation-xquery/src/main/java/org/apache/tuscany/sca/implementation/xquery/xml/XQueryImplementationProcessor.java
@@ -29,12 +29,12 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.implementation.xquery.XQueryImplementation;
import org.apache.tuscany.sca.implementation.xquery.XQueryImplementationFactory;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
@@ -59,7 +59,7 @@ public class XQueryImplementationProcessor implements StAXArtifactProcessor<XQue
private ContributionFactory contributionFactory;
private Monitor monitor;
- public XQueryImplementationProcessor(ModelFactoryExtensionPoint modelFactoryExtensionPoint, Monitor monitor) {
+ public XQueryImplementationProcessor(FactoryExtensionPoint modelFactoryExtensionPoint, Monitor monitor) {
assemblyFactory = modelFactoryExtensionPoint.getFactory(AssemblyFactory.class);
javaFactory = modelFactoryExtensionPoint.getFactory(JavaInterfaceFactory.class);
contributionFactory = modelFactoryExtensionPoint.getFactory(ContributionFactory.class);
diff --git a/branches/sca-equinox/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java b/branches/sca-equinox/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
index 7fe0a1183c..7fb6192998 100644
--- a/branches/sca-equinox/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
+++ b/branches/sca-equinox/modules/interface-java-xml/src/main/java/org/apache/tuscany/sca/interfacedef/java/xml/JavaInterfaceProcessor.java
@@ -27,13 +27,13 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceContract;
@@ -52,7 +52,7 @@ public class JavaInterfaceProcessor implements StAXArtifactProcessor<JavaInterfa
private JavaInterfaceFactory javaFactory;
private Monitor monitor;
- public JavaInterfaceProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JavaInterfaceProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java b/branches/sca-equinox/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java
index 313f950873..817006cf5e 100644
--- a/branches/sca-equinox/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/interface-java-xml/src/test/java/org/apache/tuscany/sca/interfacedef/java/xml/ReadTestCase.java
@@ -34,15 +34,14 @@ import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
/**
@@ -65,13 +64,13 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
public void testReadComponentType() throws Exception {
@@ -94,7 +93,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
}
}
diff --git a/branches/sca-equinox/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java b/branches/sca-equinox/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
index 2a0fc8099a..67a9c8f2c6 100644
--- a/branches/sca-equinox/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
+++ b/branches/sca-equinox/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/DefaultJavaInterfaceFactory.java
@@ -22,7 +22,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Set;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceFactoryImpl;
@@ -36,13 +36,13 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
* @version $Rev$ $Date$
*/
public class DefaultJavaInterfaceFactory extends JavaInterfaceFactoryImpl implements JavaInterfaceFactory {
- private ModelFactoryExtensionPoint modelFactoryExtensionPoint;
+ private FactoryExtensionPoint modelFactoryExtensionPoint;
private boolean loadedVisitors;
public DefaultJavaInterfaceFactory() {
}
- public DefaultJavaInterfaceFactory(ModelFactoryExtensionPoint modelFactoryExtensionPoint) {
+ public DefaultJavaInterfaceFactory(FactoryExtensionPoint modelFactoryExtensionPoint) {
this.modelFactoryExtensionPoint = modelFactoryExtensionPoint;
}
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
index c9c059eec6..0f81b178a0 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLDocumentProcessor.java
@@ -33,11 +33,11 @@ import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
import org.apache.tuscany.sca.monitor.Monitor;
@@ -64,7 +64,7 @@ public class WSDLDocumentProcessor implements URLArtifactProcessor<WSDLDefinitio
private XSDFactory xsdFactory;
private Monitor monitor;
- public WSDLDocumentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public WSDLDocumentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(WSDLFactory.class);
this.xsdFactory = modelFactories.getFactory(XSDFactory.class);
this.monitor = monitor;
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
index e80a3702ef..4af795ae5e 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLInterfaceProcessor.java
@@ -28,12 +28,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
@@ -54,7 +54,7 @@ public class WSDLInterfaceProcessor implements StAXArtifactProcessor<WSDLInterfa
private WSDLFactory wsdlFactory;
private Monitor monitor;
- public WSDLInterfaceProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public WSDLInterfaceProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
index 9c23458743..f872aa652e 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLModelResolver.java
@@ -52,11 +52,11 @@ import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionRuntimeException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
import org.apache.tuscany.sca.xsd.XSDFactory;
@@ -111,7 +111,7 @@ public class WSDLModelResolver implements ModelResolver {
private ContributionFactory contributionFactory;
private XSDFactory xsdFactory;
- public WSDLModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public WSDLModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
this.wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
index f0228edb1f..8ed7ba395b 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/AbstractWSDLTestCase.java
@@ -23,7 +23,6 @@ import junit.framework.TestCase;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
@@ -32,6 +31,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.xsd.XSDFactory;
/**
@@ -51,7 +51,7 @@ public abstract class AbstractWSDLTestCase extends TestCase {
@Override
protected void setUp() throws Exception {
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
wsdlFactory = modelFactories.getFactory(WSDLFactory.class);
xsdFactory = modelFactories.getFactory(XSDFactory.class);
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java
index f23b0d2b59..21e8e44046 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/ReadTestCase.java
@@ -33,15 +33,14 @@ import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultStAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
/**
@@ -62,13 +61,13 @@ public class ReadTestCase extends TestCase {
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
- compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper, null);
+ compositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, mapper);
}
public void testReadComponentType() throws Exception {
@@ -91,7 +90,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite)staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
}
}
diff --git a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
index c27a1dbd70..ca7d96ccb0 100644
--- a/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
+++ b/branches/sca-equinox/modules/interface-wsdl-xml/src/test/java/org/apache/tuscany/sca/interfacedef/wsdl/xml/WSDLTestCase.java
@@ -26,11 +26,11 @@ import javax.xml.namespace.QName;
import junit.framework.TestCase;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
/**
@@ -49,7 +49,7 @@ public class WSDLTestCase extends TestCase {
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
wsdlResolver = new WSDLModelResolver(null, modelFactories);
}
diff --git a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/DefaultWSDLFactory.java b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/DefaultWSDLFactory.java
index 2a5dd07d08..8d571a4404 100644
--- a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/DefaultWSDLFactory.java
+++ b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/DefaultWSDLFactory.java
@@ -18,7 +18,7 @@
*/
package org.apache.tuscany.sca.interfacedef.wsdl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLFactoryImpl;
/**
@@ -28,7 +28,7 @@ import org.apache.tuscany.sca.interfacedef.wsdl.impl.WSDLFactoryImpl;
*/
public class DefaultWSDLFactory extends WSDLFactoryImpl implements WSDLFactory {
- public DefaultWSDLFactory(ModelFactoryExtensionPoint modelFactories) {
+ public DefaultWSDLFactory(FactoryExtensionPoint modelFactories) {
super(modelFactories);
}
diff --git a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLFactoryImpl.java b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLFactoryImpl.java
index 1f2263e1c9..883b6b1567 100644
--- a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLFactoryImpl.java
+++ b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLFactoryImpl.java
@@ -20,8 +20,8 @@ package org.apache.tuscany.sca.interfacedef.wsdl.impl;
import javax.wsdl.PortType;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.InvalidInterfaceException;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLFactory;
@@ -37,7 +37,7 @@ public abstract class WSDLFactoryImpl implements WSDLFactory {
private WSDLInterfaceIntrospectorImpl introspector;
- public WSDLFactoryImpl(ModelFactoryExtensionPoint modelFactories) {
+ public WSDLFactoryImpl(FactoryExtensionPoint modelFactories) {
introspector = new WSDLInterfaceIntrospectorImpl(modelFactories);
}
diff --git a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java
index 18fce72f90..377f7b307d 100644
--- a/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java
+++ b/branches/sca-equinox/modules/interface-wsdl/src/main/java/org/apache/tuscany/sca/interfacedef/wsdl/impl/WSDLInterfaceIntrospectorImpl.java
@@ -27,8 +27,8 @@ import java.util.Vector;
import javax.wsdl.PortType;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.interfacedef.ConversationSequence;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.wsdl.WSDLDefinition;
@@ -50,7 +50,7 @@ public class WSDLInterfaceIntrospectorImpl {
private XSDFactory xsdFactory;
private PolicyFactory policyFactory;
- public WSDLInterfaceIntrospectorImpl(ModelFactoryExtensionPoint modelFactories) {
+ public WSDLInterfaceIntrospectorImpl(FactoryExtensionPoint modelFactories) {
this.xsdFactory = modelFactories.getFactory(XSDFactory.class);;
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);;
}
diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
index a8a076a602..fef0a8391e 100644
--- a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
+++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
@@ -19,47 +19,57 @@
package org.apache.tuscany.sca.node.impl;
+import static org.apache.tuscany.sca.node.impl.NodeUtil.collectJARs;
+import static org.apache.tuscany.sca.node.impl.NodeUtil.createContribution;
+import static org.apache.tuscany.sca.node.impl.NodeUtil.createURI;
+import static org.apache.tuscany.sca.node.impl.NodeUtil.getContributionURL;
+import static org.apache.tuscany.sca.node.impl.NodeUtil.getResource;
+
import java.io.ByteArrayInputStream;
import java.io.File;
-import java.io.IOException;
import java.io.InputStream;
-import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
-import java.net.URLClassLoader;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.TransformerFactory;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Component;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeService;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
+import org.apache.tuscany.sca.contribution.resolver.ExtensibleModelResolver;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
-import org.apache.tuscany.sca.contribution.service.ContributionService;
-import org.apache.tuscany.sca.contribution.service.util.FileHelper;
+import org.apache.tuscany.sca.contribution.resolver.ModelResolverExtensionPoint;
+import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.core.ModuleActivator;
+import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
import org.apache.tuscany.sca.core.assembly.CompositeActivator;
@@ -74,12 +84,16 @@ import org.apache.tuscany.sca.node.SCAContribution;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentContext;
+import org.apache.tuscany.sca.workspace.Workspace;
+import org.apache.tuscany.sca.workspace.WorkspaceFactory;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint;
import org.osoa.sca.CallableReference;
import org.osoa.sca.ServiceReference;
import org.osoa.sca.ServiceRuntimeException;
/**
- * A local representation of the SCADomain running on a single node
+ * Represents an SCA runtime node.
*
* @version $Rev$ $Date$
*/
@@ -90,19 +104,28 @@ public class NodeImpl implements SCANode, SCAClient {
// The node configuration name, used for logging
private String configurationName;
- // The Tuscany runtime that does the hard work
- private RuntimeBootStrapper runtime;
- private CompositeActivator compositeActivator;
- private XMLInputFactory inputFactory;
- private ModelFactoryExtensionPoint modelFactories;
- private StAXArtifactProcessorExtensionPoint artifactProcessors;
- private URLArtifactProcessorExtensionPoint documentProcessors;
- private Monitor monitor;
-
- private List<Contribution> contributions;
// The composite loaded into this node
private Composite composite;
+ private Monitor monitor;
+ private URLArtifactProcessor<Contribution> contributionProcessor;
+ private ModelResolverExtensionPoint modelResolvers;
+ private FactoryExtensionPoint modelFactories;
+ private WorkspaceFactory workspaceFactory;
+ private ContributionFactory contributionFactory;
+ private AssemblyFactory assemblyFactory;
+ private XMLInputFactory inputFactory;
+ private XMLOutputFactory outputFactory;
+ private DocumentBuilderFactory documentBuilderFactory;
+ private TransformerFactory transformerFactory;
+ private StAXArtifactProcessor<Object> xmlProcessor;
+ private ContributionBuilder contributionDependencyBuilder;
+ private CompositeBuilder domainCompositeBuilder;
+ private StAXArtifactProcessorExtensionPoint xmlProcessors;
+ private URLArtifactProcessorExtensionPoint documentProcessors;
+ private RuntimeBootStrapper runtime;
+ private CompositeActivator compositeActivator;
+
/**
* Constructs a new SCA node.
*
@@ -114,11 +137,10 @@ public class NodeImpl implements SCANode, SCAClient {
try {
// Initialize the runtime
- initRuntime();
+ init();
// Read the node configuration feed
- StAXArtifactProcessor<ConfiguredNodeImplementation> configurationProcessor =
- artifactProcessors.getProcessor(ConfiguredNodeImplementation.class);
+ StAXArtifactProcessor<ConfiguredNodeImplementation> configurationProcessor = xmlProcessors.getProcessor(ConfiguredNodeImplementation.class);
URL configurationURL = new URL(configurationURI);
InputStream is = configurationURL.openStream();
XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
@@ -161,7 +183,7 @@ public class NodeImpl implements SCANode, SCAClient {
}
try {
// Initialize the runtime
- initRuntime();
+ init();
ConfiguredNodeImplementation config = findNodeConfiguration(compositeURI, classLoader);
configureNode(config);
@@ -227,77 +249,11 @@ public class NodeImpl implements SCANode, SCAClient {
private Contribution getContribution(URL contributionArtifactURL, String contributionArtifactPath) {
URL contributionURL = getContributionURL(contributionArtifactURL, contributionArtifactPath);
-
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
-
SCAContribution contribution = new SCAContribution(contributionURL.toString(), contributionURL.toString());
Contribution c = createContribution(contributionFactory, contribution);
return c;
}
- public static URL getContributionURL(URL contributionArtifactURL, String contributionArtifactPath) {
- URL contributionURL = null;
- // "jar:file://....../something.jar!/a/b/c/app.composite"
- try {
- String url = contributionArtifactURL.toExternalForm();
- String protocol = contributionArtifactURL.getProtocol();
- if ("file".equals(protocol)) {
- // directory contribution
- if (url.endsWith(contributionArtifactPath)) {
- final String location = url.substring(0, url.lastIndexOf(contributionArtifactPath));
- // workaround from evil URL/URI form Maven
- // contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
- // Allow privileged access to open URL stream. Add FilePermission to added to
- // security policy file.
- try {
- contributionURL = AccessController.doPrivileged(new PrivilegedExceptionAction<URL>() {
- public URL run() throws IOException {
- return FileHelper.toFile(new URL(location)).toURI().toURL();
- }
- });
- } catch (PrivilegedActionException e) {
- throw (MalformedURLException)e.getException();
- }
- }
-
- } else if ("jar".equals(protocol)) {
- // jar contribution
- String location = url.substring(4, url.lastIndexOf("!/"));
- // workaround for evil URL/URI from Maven
- contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
-
- } else if ("wsjar".equals(protocol)) {
- // See https://issues.apache.org/jira/browse/TUSCANY-2219
- // wsjar contribution
- String location = url.substring(6, url.lastIndexOf("!/"));
- // workaround for evil url/uri from maven
- contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
-
- } else if ("zip".equals(protocol)) {
- // See https://issues.apache.org/jira/browse/TUSCANY-2598
- // zip contribution, remove the zip prefix and pad with file:
- String location = "file:"+url.substring(4, url.lastIndexOf("!/"));
- contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
-
- } else if (protocol != null && (protocol.equals("bundle") || protocol.equals("bundleresource"))) {
- contributionURL =
- new URL(contributionArtifactURL.getProtocol(), contributionArtifactURL.getHost(),
- contributionArtifactURL.getPort(), "/");
- }
- } catch (MalformedURLException mfe) {
- throw new IllegalArgumentException(mfe);
- }
- return contributionURL;
- }
-
- private static URL getResource(final ClassLoader classLoader, final String compositeURI) {
- return AccessController.doPrivileged(new PrivilegedAction<URL>() {
- public URL run() {
- return classLoader.getResource(compositeURI);
- }
- });
- }
-
/**
* Constructs a new SCA node.
*
@@ -310,7 +266,7 @@ public class NodeImpl implements SCANode, SCAClient {
try {
// Initialize the runtime
- initRuntime();
+ init();
URI uri = compositeURI == null ? null : URI.create(compositeURI);
ConfiguredNodeImplementation configuration = null;
@@ -329,9 +285,7 @@ public class NodeImpl implements SCANode, SCAClient {
Composite composite = compositeURI == null ? null : createComposite(compositeURI);
configuration.setComposite(composite);
-
// Create contribution models
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
for (SCAContribution c : contributions) {
Contribution contribution = createContribution(contributionFactory, c);
configuration.getContributions().add(contribution);
@@ -348,7 +302,6 @@ public class NodeImpl implements SCANode, SCAClient {
private Composite createComposite(String compositeURI) {
// Create composite model
- AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
Composite composite = assemblyFactory.createComposite();
composite.setURI(compositeURI);
composite.setUnresolved(true);
@@ -368,7 +321,7 @@ public class NodeImpl implements SCANode, SCAClient {
try {
// Initialize the runtime
- initRuntime();
+ init();
ConfiguredNodeImplementation configuration = null;
if (contributions == null || contributions.length == 0) {
@@ -380,22 +333,18 @@ public class NodeImpl implements SCANode, SCAClient {
configuration = nodeImplementationFactory.createConfiguredNodeImplementation();
// Read the composite model
- StAXArtifactProcessor<Composite> compositeProcessor = artifactProcessors.getProcessor(Composite.class);
+ StAXArtifactProcessor<Composite> compositeProcessor = xmlProcessors.getProcessor(Composite.class);
// URL compositeURL = new URL(compositeURI);
logger.log(Level.INFO, "Loading composite: " + compositeURI);
- CompositeDocumentProcessor compositeDocProcessor =
- (CompositeDocumentProcessor)documentProcessors.getProcessor(Composite.class);
- composite =
- compositeDocProcessor.read(URI.create(compositeURI), new ByteArrayInputStream(compositeContent
- .getBytes("UTF-8")));
+ CompositeDocumentProcessor compositeDocProcessor = (CompositeDocumentProcessor)documentProcessors.getProcessor(Composite.class);
+ composite = compositeDocProcessor.read(URI.create(compositeURI), new ByteArrayInputStream(compositeContent.getBytes("UTF-8")));
analyzeProblems();
configuration.setComposite(composite);
// Create contribution models
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
for (SCAContribution c : contributions) {
Contribution contribution = createContribution(contributionFactory, c);
configuration.getContributions().add(contribution);
@@ -410,14 +359,53 @@ public class NodeImpl implements SCANode, SCAClient {
}
}
- private static Contribution createContribution(ContributionFactory contributionFactory, SCAContribution c) {
- Contribution contribution = contributionFactory.createContribution();
- contribution.setURI(c.getURI());
- contribution.setLocation(c.getLocation());
- contribution.setUnresolved(true);
- return contribution;
- }
+ private void init() {
+
+ // Create extension point registry
+ ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
+
+ // Create a monitor
+ UtilityExtensionPoint utilities = extensionPoints.getExtensionPoint(UtilityExtensionPoint.class);
+ MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
+ monitor = monitorFactory.createMonitor();
+
+ // Initialize the Tuscany module activators
+ ModuleActivatorExtensionPoint moduleActivators = extensionPoints.getExtensionPoint(ModuleActivatorExtensionPoint.class);
+ for (ModuleActivator activator: moduleActivators.getModuleActivators()) {
+ activator.start(extensionPoints);
+ }
+ // Get XML input/output factories
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
+ inputFactory = modelFactories.getFactory(XMLInputFactory.class);
+ outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
+
+ // Get contribution workspace and assembly model factories
+ contributionFactory = modelFactories.getFactory(ContributionFactory.class);
+ workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class);
+ assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
+
+ // Create XML artifact processors
+ xmlProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
+ documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+ xmlProcessor = new ExtensibleStAXArtifactProcessor(xmlProcessors, inputFactory, outputFactory, monitor);
+
+ // Create contribution content processor
+ URLArtifactProcessorExtensionPoint docProcessorExtensions = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
+ contributionProcessor = docProcessorExtensions.getProcessor(Contribution.class);
+
+ // Get the model resolvers
+ modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
+
+ // Get a contribution dependency builder
+ ContributionBuilderExtensionPoint contributionBuilders = extensionPoints.getExtensionPoint(ContributionBuilderExtensionPoint.class);
+ contributionDependencyBuilder = contributionBuilders.getContributionBuilder("org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder");
+
+ // Get composite builders
+ CompositeBuilderExtensionPoint compositeBuilders = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class);
+ domainCompositeBuilder = compositeBuilders.getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");
+ }
+
/**
* Initialize the Tuscany runtime.
*
@@ -429,131 +417,67 @@ public class NodeImpl implements SCANode, SCAClient {
runtime = new RuntimeBootStrapper(Thread.currentThread().getContextClassLoader());
runtime.start();
- // Get the various factories we need
- ExtensionPointRegistry registry = runtime.getExtensionPointRegistry();
- modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
- inputFactory = modelFactories.getFactory(XMLInputFactory.class);
-
- // Create the required artifact processors
- artifactProcessors = registry.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
-
- documentProcessors = registry.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
-
// Save the composite activator
compositeActivator = runtime.getCompositeActivator();
- // save the monitor
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- MonitorFactory monitorFactory = utilities.getUtility(MonitorFactory.class);
- monitor = monitorFactory.createMonitor();
- }
-
- /**
- * Escape the space in URL string
- * @param uri
- * @return
- */
- private static URI createURI(String uri) {
- if (uri.indexOf(' ') != -1) {
- uri = uri.replace(" ", "%20");
- }
- return URI.create(uri);
}
private void configureNode(ConfiguredNodeImplementation configuration) throws Exception {
- // Find if any contribution JARs already available locally on the classpath
- Map<String, URL> localContributions = localContributions();
+ // Create workspace model
+ Workspace workspace = workspaceFactory.createWorkspace();
+ workspace.setModelResolver(new ExtensibleModelResolver(workspace, modelResolvers, modelFactories));
// Load the specified contributions
- ContributionService contributionService = runtime.getContributionService();
- contributions = new ArrayList<Contribution>();
- for (Contribution contribution : configuration.getContributions()) {
- URI uri = createURI(contribution.getLocation());
+ for (Contribution c : configuration.getContributions()) {
+ URI contributionURI = URI.create(c.getURI());
+
+ URI uri = createURI(c.getLocation());
if (uri.getScheme() == null) {
- uri = new File(contribution.getLocation()).toURI();
+ uri = new File(c.getLocation()).toURI();
}
URL contributionURL = uri.toURL();
- // Extract contribution file name
- String file = contributionURL.getPath();
- int i = file.lastIndexOf('/');
- if (i != -1 && i < file.length() - 1) {
- file = file.substring(i + 1);
-
- // If we find the local contribution file on the classpath, use it in
- // place of the original contribution URL
- URL localContributionURL = localContributions.get(file);
- if (localContributionURL != null) {
- contributionURL = localContributionURL;
- }
- }
-
// Load the contribution
logger.log(Level.INFO, "Loading contribution: " + contributionURL);
- contributions.add(contributionService.contribute(contribution.getURI(), contributionURL, false));
+ Contribution contribution = contributionProcessor.read(null, contributionURI, contributionURL);
+ workspace.getContributions().add(contribution);
analyzeProblems();
}
- composite = configuration.getComposite();
-
- // FIXME: This is a hack to get a list of deployable composites. By design, the deployment composite should
- // has been configured
- if (composite == null) {
- List<Composite> deployables = new ArrayList<Composite>();
- for (Contribution c : contributions) {
- deployables.addAll(c.getDeployables());
+ // Build the contribution dependencies
+ Set<Contribution> resolved = new HashSet<Contribution>();
+ for (Contribution contribution: workspace.getContributions()) {
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
+
+ // Resolve contributions
+ for (Contribution dependency: contribution.getDependencies()) {
+ if (!resolved.contains(dependency)) {
+ resolved.add(dependency);
+ contributionProcessor.resolve(dependency, workspace.getModelResolver());
+ }
}
- aggregate(deployables);
- configuration.setComposite(composite);
}
-
- Contribution contribution = null;
- if (composite.getName() == null) {
- // Load the specified composite
- URL compositeURL;
-
- URI uri = createURI(configuration.getComposite().getURI());
- if (uri.getScheme() == null) {
-
- // If the composite URI is a relative URI, try to resolve it within the contributions
- contribution = contribution(contributions, uri.toString());
- if (contribution == null) {
- throw new IllegalArgumentException("Composite is not found in contributions: " + uri);
+
+ composite = configuration.getComposite();
+ if (composite.isUnresolved()) {
+
+ // Find the composite in the given contributions
+ for (Contribution contribution: workspace.getContributions()) {
+ composite = contribution.getModelResolver().resolveModel(Composite.class, composite);
+ if (!composite.isUnresolved()) {
+ break;
}
- compositeURL = new URL(location(contribution, uri.toString()));
-
- } else {
-
- // If the composite URI is an absolute URI, use it as is
- compositeURL = uri.toURL();
}
-
- URLArtifactProcessor<Composite> compositeDocProcessor = documentProcessors.getProcessor(Composite.class);
- // Read the composite
- logger.log(Level.INFO, "Loading composite: " + compositeURL);
- // InputStream is = compositeURL.openStream();
- // XMLStreamReader reader = inputFactory.createXMLStreamReader(is);
- composite = compositeDocProcessor.read(null, uri, compositeURL);
- // reader.close();
-
- analyzeProblems();
-
- }
- // And resolve the composite within the scope of the last contribution
- if (contribution == null && contributions.size() != 0) {
- contribution = contributions.get(contributions.size() - 1);
}
- // Resolve the given composite within the scope of the selected contribution
- if (contribution != null) {
- StAXArtifactProcessor<Composite> compositeProcessor = artifactProcessors.getProcessor(Composite.class);
- compositeProcessor.resolve(composite, contribution.getModelResolver());
- analyzeProblems();
- }
+ // Build the composite and wire the components included in it
+ domainCompositeBuilder.build(composite);
+
+ analyzeProblems();
+
// Create a top level composite to host our composite
// This is temporary to make the activator happy
- AssemblyFactory assemblyFactory = runtime.getAssemblyFactory();
Composite tempComposite = assemblyFactory.createComposite();
tempComposite.setName(new QName("http://tempuri.org", "temp"));
tempComposite.setURI("http://tempuri.org");
@@ -566,92 +490,6 @@ public class NodeImpl implements SCANode, SCAClient {
// available
compositeActivator.setDomainComposite(tempComposite);
- // Build the composite
- runtime.buildComposite(composite);
-
- analyzeProblems();
- }
-
- /**
- * Create a deployment composite that includes a list of deployable composites
- * @param composites
- */
- private void aggregate(List<Composite> composites) {
- if (composites.size() == 0) {
- throw new IllegalArgumentException("No deployable composite is declared");
- } else if (composites.size() == 1) {
- composite = composites.get(0);
- } else {
- // Include all composites
- AssemblyFactory assemblyFactory = runtime.getAssemblyFactory();
- Composite aggregated = assemblyFactory.createComposite();
- aggregated.setName(new QName("http://tempuri.org", "aggregated"));
- aggregated.setURI("http://tempuri.org/aggregated");
- aggregated.getIncludes().addAll(composites);
- composite = aggregated;
- }
- }
-
- /**
- * Returns the artifact representing the given composite.
- *
- * @param contribution
- * @param compositeURI
- * @return
- */
- private String location(Contribution contribution, String uri) {
- if (uri != null && uri.startsWith("/")) {
- uri = uri.substring(1);
- }
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
- Artifact compositeFile = contributionFactory.createArtifact();
- compositeFile.setUnresolved(true);
- compositeFile.setURI(uri);
- ModelResolver resolver = contribution.getModelResolver();
- Artifact resolved = resolver.resolveModel(Artifact.class, compositeFile);
- if (resolved != null && !resolved.isUnresolved()) {
- return resolved.getLocation();
- } else {
- return null;
- }
- }
-
- /**
- * Returns the contribution containing the given composite.
- *
- * @param contributions
- * @param compositeURI
- * @return
- */
- private Contribution contribution(List<Contribution> contributions, String compositeURI) {
- if (compositeURI != null && compositeURI.startsWith("/")) {
- compositeURI = compositeURI.substring(1);
- }
- ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);
- Artifact compositeFile = contributionFactory.createArtifact();
- compositeFile.setUnresolved(true);
- compositeFile.setURI(compositeURI);
- for (Contribution c : contributions) {
- ModelResolver resolver = c.getModelResolver();
- Artifact resolved = resolver.resolveModel(Artifact.class, compositeFile);
- if (resolved != null && !resolved.isUnresolved()) {
- return c;
- }
- }
- return null;
- }
-
- private void analyzeProblems() throws Exception {
-
- for (Problem problem : monitor.getProblems()) {
- if ((problem.getSeverity() == Severity.ERROR) && (!problem.getMessageId().equals("SchemaError"))) {
- if (problem.getCause() != null) {
- throw problem.getCause();
- } else {
- throw new ServiceRuntimeException(problem.toString());
- }
- }
- }
}
public void start() {
@@ -760,65 +598,20 @@ public class NodeImpl implements SCANode, SCAClient {
}
/**
- * Returns the extension point registry used by this node.
+ * Analyze problems reported by the artifact processors and builders.
*
- * @return
- */
- public ExtensionPointRegistry getExtensionPointRegistry() {
- return runtime.getExtensionPointRegistry();
- }
-
- /**
- * Returns the composite being run by this node.
- *
- * @return
- */
- public Composite getComposite() {
- return composite;
- }
-
- /**
- * Returns contribution JARs available on the classpath.
- *
- * @return
- */
- private static Map<String, URL> localContributions() {
- Map<String, URL> localContributions = new HashMap<String, URL>();
- collectJARs(localContributions, Thread.currentThread().getContextClassLoader());
- return localContributions;
- }
-
- /**
- * Collect JARs on the classpath of a URLClassLoader
- * @param urls
- * @param cl
+ * @throws Exception
*/
- private static void collectJARs(Map<String, URL> urls, ClassLoader cl) {
- if (cl == null) {
- return;
- }
-
- // Collect JARs from the URLClassLoader's classpath
- if (cl instanceof URLClassLoader) {
- URL[] jarURLs = ((URLClassLoader)cl).getURLs();
- if (jarURLs != null) {
- for (URL jarURL : jarURLs) {
- String file = jarURL.getPath();
- int i = file.lastIndexOf('/');
- if (i != -1 && i < file.length() - 1) {
- file = file.substring(i + 1);
- urls.put(file, jarURL);
- }
+ private void analyzeProblems() throws Exception {
+ for (Problem problem : monitor.getProblems()) {
+ if ((problem.getSeverity() == Severity.ERROR) && (!problem.getMessageId().equals("SchemaError"))) {
+ if (problem.getCause() != null) {
+ throw problem.getCause();
+ } else {
+ throw new ServiceRuntimeException(problem.toString());
}
}
}
-
- // Collect JARs from the parent ClassLoader
- collectJARs(urls, cl.getParent());
- }
-
- public CompositeActivator getCompositeActivator() {
- return compositeActivator;
}
}
diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java
new file mode 100644
index 0000000000..f315be8431
--- /dev/null
+++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeUtil.java
@@ -0,0 +1,157 @@
+/*
+ * 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.sca.node.impl;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.Map;
+
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.contribution.ContributionFactory;
+import org.apache.tuscany.sca.contribution.service.util.FileHelper;
+import org.apache.tuscany.sca.node.SCAContribution;
+
+/**
+ * NodeUtil
+ *
+ * @version $Rev: $ $Date: $
+ */
+public class NodeUtil {
+
+ static URL getResource(final ClassLoader classLoader, final String compositeURI) {
+ return AccessController.doPrivileged(new PrivilegedAction<URL>() {
+ public URL run() {
+ return classLoader.getResource(compositeURI);
+ }
+ });
+ }
+
+ static Contribution createContribution(ContributionFactory contributionFactory, SCAContribution c) {
+ Contribution contribution = contributionFactory.createContribution();
+ contribution.setURI(c.getURI());
+ contribution.setLocation(c.getLocation());
+ contribution.setUnresolved(true);
+ return contribution;
+ }
+
+ /**
+ * Escape the space in URL string
+ * @param uri
+ * @return
+ */
+ static URI createURI(String uri) {
+ if (uri.indexOf(' ') != -1) {
+ uri = uri.replace(" ", "%20");
+ }
+ return URI.create(uri);
+ }
+
+ /**
+ * Collect JARs on the classpath of a URLClassLoader
+ * @param urls
+ * @param cl
+ */
+ static void collectJARs(Map<String, URL> urls, ClassLoader cl) {
+ if (cl == null) {
+ return;
+ }
+
+ // Collect JARs from the URLClassLoader's classpath
+ if (cl instanceof URLClassLoader) {
+ URL[] jarURLs = ((URLClassLoader)cl).getURLs();
+ if (jarURLs != null) {
+ for (URL jarURL : jarURLs) {
+ String file = jarURL.getPath();
+ int i = file.lastIndexOf('/');
+ if (i != -1 && i < file.length() - 1) {
+ file = file.substring(i + 1);
+ urls.put(file, jarURL);
+ }
+ }
+ }
+ }
+
+ // Collect JARs from the parent ClassLoader
+ collectJARs(urls, cl.getParent());
+ }
+
+ static URL getContributionURL(URL contributionArtifactURL, String contributionArtifactPath) {
+ URL contributionURL = null;
+ // "jar:file://....../something.jar!/a/b/c/app.composite"
+ try {
+ String url = contributionArtifactURL.toExternalForm();
+ String protocol = contributionArtifactURL.getProtocol();
+ if ("file".equals(protocol)) {
+ // directory contribution
+ if (url.endsWith(contributionArtifactPath)) {
+ final String location = url.substring(0, url.lastIndexOf(contributionArtifactPath));
+ // workaround from evil URL/URI form Maven
+ // contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
+ // Allow privileged access to open URL stream. Add FilePermission to added to
+ // security policy file.
+ try {
+ contributionURL = AccessController.doPrivileged(new PrivilegedExceptionAction<URL>() {
+ public URL run() throws IOException {
+ return FileHelper.toFile(new URL(location)).toURI().toURL();
+ }
+ });
+ } catch (PrivilegedActionException e) {
+ throw (MalformedURLException)e.getException();
+ }
+ }
+
+ } else if ("jar".equals(protocol)) {
+ // jar contribution
+ String location = url.substring(4, url.lastIndexOf("!/"));
+ // workaround for evil URL/URI from Maven
+ contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
+
+ } else if ("wsjar".equals(protocol)) {
+ // See https://issues.apache.org/jira/browse/TUSCANY-2219
+ // wsjar contribution
+ String location = url.substring(6, url.lastIndexOf("!/"));
+ // workaround for evil url/uri from maven
+ contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
+
+ } else if ("zip".equals(protocol)) {
+ // See https://issues.apache.org/jira/browse/TUSCANY-2598
+ // zip contribution, remove the zip prefix and pad with file:
+ String location = "file:"+url.substring(4, url.lastIndexOf("!/"));
+ contributionURL = FileHelper.toFile(new URL(location)).toURI().toURL();
+
+ } else if (protocol != null && (protocol.equals("bundle") || protocol.equals("bundleresource"))) {
+ contributionURL =
+ new URL(contributionArtifactURL.getProtocol(), contributionArtifactURL.getHost(),
+ contributionArtifactURL.getPort(), "/");
+ }
+ } catch (MalformedURLException mfe) {
+ throw new IllegalArgumentException(mfe);
+ }
+ return contributionURL;
+ }
+
+}
diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
index 31b65272c4..a378e57d31 100644
--- a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
+++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBootStrapper.java
@@ -27,17 +27,13 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.TransformerFactory;
-
import org.apache.tuscany.sca.assembly.AssemblyFactory;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.EndpointFactory;
import org.apache.tuscany.sca.assembly.SCABindingFactory;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilder;
import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver;
@@ -45,6 +41,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionService;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
@@ -82,26 +79,20 @@ import org.apache.tuscany.sca.work.WorkScheduler;
public class RuntimeBootStrapper {
private static final Logger logger = Logger.getLogger(RuntimeBootStrapper.class.getName());
private List<ModuleActivator> modules;
- private ExtensionPointRegistry registry;
private ClassLoader classLoader;
- private AssemblyFactory assemblyFactory;
- private ContributionService contributionService;
private CompositeActivator compositeActivator;
- private CompositeBuilder compositeBuilder;
- // private DomainBuilder domainBuilder;
private WorkScheduler workScheduler;
private ScopeRegistry scopeRegistry;
private ProxyFactory proxyFactory;
private List<SCADefinitions> policyDefinitions;
private ModelResolver policyDefinitionsResolver;
- private Monitor monitor;
public RuntimeBootStrapper(ClassLoader classLoader) {
this.classLoader = classLoader;
}
- public void start() throws ActivationException {
+ public void startRuntime() throws ActivationException {
long start = System.currentTimeMillis();
// Create our extension point registry
@@ -115,7 +106,7 @@ public class RuntimeBootStrapper {
InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
// Get factory extension point
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
// Get Message factory
MessageFactory messageFactory = factories.getFactory(MessageFactory.class);
@@ -190,7 +181,7 @@ public class RuntimeBootStrapper {
}
}
- public void stop() throws ActivationException {
+ public void stopRuntime() throws ActivationException {
long start = System.currentTimeMillis();
// Stop the runtime modules
@@ -203,7 +194,6 @@ public class RuntimeBootStrapper {
modules = null;
registry = null;
assemblyFactory = null;
- contributionService = null;
compositeActivator = null;
workScheduler = null;
scopeRegistry = null;
@@ -215,50 +205,12 @@ public class RuntimeBootStrapper {
}
public void buildComposite(Composite composite) throws CompositeBuilderException {
- //Get factory extension point
- ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
- SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class);
- IntentAttachPointTypeFactory intentAttachPointTypeFactory =
- factories.getFactory(IntentAttachPointTypeFactory.class);
- EndpointFactory endpointFactory = factories.getFactory(EndpointFactory.class);
- DocumentBuilderFactory documentBuilderFactory = factories.getFactory(DocumentBuilderFactory.class);
- TransformerFactory transformerFactory = factories.getFactory(TransformerFactory.class);
- UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
- InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class);
- //Create a composite builder
SCADefinitions aggregatedDefinitions = new SCADefinitionsImpl();
for (SCADefinitions definition : ((List<SCADefinitions>)policyDefinitions)) {
SCADefinitionsUtil.aggregateSCADefinitions(definition, aggregatedDefinitions);
}
- compositeBuilder =
- RuntimeBuilder.createCompositeBuilder(monitor,
- assemblyFactory,
- scaBindingFactory,
- endpointFactory,
- intentAttachPointTypeFactory,
- documentBuilderFactory,
- transformerFactory,
- mapper,
- aggregatedDefinitions);
- compositeBuilder.build(composite);
-
- }
-
- public ContributionService getContributionService() {
- return contributionService;
- }
-
- public CompositeActivator getCompositeActivator() {
- return compositeActivator;
- }
-
- public CompositeBuilder getCompositeBuilder() {
- return compositeBuilder;
- }
-
- public AssemblyFactory getAssemblyFactory() {
- return assemblyFactory;
+
}
private void loadSCADefinitions() throws ActivationException {
@@ -383,11 +335,4 @@ public class RuntimeBootStrapper {
return proxyFactory;
}
- /**
- * @return the registry
- */
- public ExtensionPointRegistry getExtensionPointRegistry() {
- return registry;
- }
-
}
diff --git a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
index 6c93fa7800..d7cda91b74 100644
--- a/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
+++ b/branches/sca-equinox/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/RuntimeBuilder.java
@@ -39,7 +39,6 @@ import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor;
import org.apache.tuscany.sca.context.ContextFactoryExtensionPoint;
import org.apache.tuscany.sca.context.RequestContextFactory;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory;
import org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensiblePackageProcessor;
@@ -61,6 +60,7 @@ import org.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryIm
import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl;
import org.apache.tuscany.sca.contribution.service.impl.PackageTypeDescriberImpl;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.core.assembly.ActivationException;
import org.apache.tuscany.sca.core.assembly.CompositeActivator;
@@ -123,7 +123,7 @@ public class RuntimeBuilder {
registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class);
JavaInterfaceFactory javaInterfaceFactory =
- registry.getExtensionPoint(ModelFactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
+ registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class);
RequestContextFactory requestContextFactory =
registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class);
@@ -140,22 +140,6 @@ public class RuntimeBuilder {
return compositeActivator;
}
- public static CompositeBuilder createCompositeBuilder(Monitor monitor,
- AssemblyFactory assemblyFactory,
- SCABindingFactory scaBindingFactory,
- EndpointFactory endpointFactory,
- IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- DocumentBuilderFactory documentBuilderFactory,
- TransformerFactory transformerFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions) {
-
- return new CompositeBuilderImpl(assemblyFactory, endpointFactory, scaBindingFactory,
- intentAttachPointTypeFactory, documentBuilderFactory, transformerFactory,
- interfaceContractMapper, policyDefinitions,
- monitor);
- }
-
/**
* Create the contribution service used by this domain.
*
@@ -172,7 +156,7 @@ public class RuntimeBuilder {
Monitor monitor) throws ActivationException {
// Get the model factory extension point
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
// Create a new XML input factory
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
diff --git a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java
index 83526e0f03..e4bda201fd 100644
--- a/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-logging/src/main/java/org/apache/tuscany/sca/policy/logging/jdk/JDKLoggingPolicyProcessor.java
@@ -29,12 +29,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -52,7 +52,7 @@ public class JDKLoggingPolicyProcessor implements StAXArtifactProcessor<JDKLoggi
return JDK_LOGGING_POLICY_QNAME;
}
- public JDKLoggingPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JDKLoggingPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/branches/sca-equinox/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/jsr250/JSR250Activator.java b/branches/sca-equinox/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/jsr250/JSR250Activator.java
index 0c5a6dd040..e6279f4811 100644
--- a/branches/sca-equinox/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/jsr250/JSR250Activator.java
+++ b/branches/sca-equinox/modules/policy-security-jsr250/src/main/java/org/apache/tuscany/sca/policy/jsr250/JSR250Activator.java
@@ -20,8 +20,8 @@
package org.apache.tuscany.sca.policy.jsr250;
import org.apache.tuscany.sca.assembly.AssemblyFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.implementation.java.JavaImplementationFactory;
import org.apache.tuscany.sca.policy.PolicyFactory;
@@ -35,7 +35,7 @@ import org.apache.tuscany.sca.policy.jsr250.introspect.impl.JSR250PolicyProcesso
public class JSR250Activator implements ModuleActivator {
public void start(ExtensionPointRegistry registry) {
- ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class);
AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
PolicyFactory policyFactory = modelFactories.getFactory(PolicyFactory.class);
diff --git a/branches/sca-equinox/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java b/branches/sca-equinox/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java
index ca2e439e3b..cf5f7ef7d0 100644
--- a/branches/sca-equinox/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-security-ws/src/main/java/org/apache/tuscany/sca/policy/security/ws/Axis2ConfigParamPolicyProcessor.java
@@ -31,12 +31,12 @@ import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -50,7 +50,7 @@ public class Axis2ConfigParamPolicyProcessor implements StAXArtifactProcessor<Ax
return AXIS2_CONFIG_PARAM_POLICY_QNAME;
}
- public Axis2ConfigParamPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public Axis2ConfigParamPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
public Axis2ConfigParamPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java
index 082dfc9fdb..d3f8f79bca 100644
--- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authentication/basic/BasicAuthenticationPolicyProcessor.java
@@ -29,12 +29,12 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -51,7 +51,7 @@ public class BasicAuthenticationPolicyProcessor implements StAXArtifactProcessor
return BasicAuthenticationPolicy.BASIC_AUTHENTICATION_POLICY_QNAME;
}
- public BasicAuthenticationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public BasicAuthenticationPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java
index 14f98b6dac..1ccebf86fe 100644
--- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/authorization/AuthorizationPolicyProcessor.java
@@ -28,12 +28,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -51,7 +51,7 @@ public class AuthorizationPolicyProcessor implements StAXArtifactProcessor<Autho
return AuthorizationPolicy.NAME;
}
- public AuthorizationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public AuthorizationPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java
index 78e08b1987..73a6d1fa69 100644
--- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/identity/SecurityIdentityPolicyProcessor.java
@@ -26,12 +26,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -49,7 +49,7 @@ public class SecurityIdentityPolicyProcessor implements StAXArtifactProcessor<Se
return SecurityIdentityPolicy.NAME;
}
- public SecurityIdentityPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public SecurityIdentityPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java
index d29bf5130c..72a0ca44f0 100644
--- a/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-security/src/main/java/org/apache/tuscany/sca/policy/security/jaas/JaasAuthenticationPolicyProcessor.java
@@ -27,13 +27,13 @@ import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.assembly.xml.Constants;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ClassReference;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -56,7 +56,7 @@ public class JaasAuthenticationPolicyProcessor implements StAXArtifactProcessor<
return JAAS_AUTHENTICATION_POLICY_QNAME;
}
- public JaasAuthenticationPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public JaasAuthenticationPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java b/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java
index 0579890a42..70116131d0 100644
--- a/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-transaction/src/main/java/org/apache/tuscany/sca/policy/transaction/TransactionPolicyProcessor.java
@@ -26,12 +26,12 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
/**
@@ -45,7 +45,7 @@ public class TransactionPolicyProcessor implements StAXArtifactProcessor<Transac
return TransactionPolicy.NAME;
}
- public TransactionPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public TransactionPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
public TransactionPolicy read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException {
diff --git a/branches/sca-equinox/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java b/branches/sca-equinox/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java
index 263c766948..58206e3275 100644
--- a/branches/sca-equinox/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml-ws/src/main/java/org/apache/tuscany/sca/policy/xml/ws/WSPolicyProcessor.java
@@ -33,13 +33,13 @@ import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.neethi.PolicyEngine;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.xml.PolicyConstants;
@@ -59,7 +59,7 @@ public class WSPolicyProcessor extends BaseStAXArtifactProcessor implements StAX
System.out.println(">>>Initializing WSPolicyProcessor");
}
- public WSPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public WSPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
System.out.println(">>>Initializing WSPolicyProcessor");
}
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
index d47cbd7dbe..6b6e045c0c 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/BindingTypeProcessor.java
@@ -21,10 +21,10 @@ package org.apache.tuscany.sca.policy.xml;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
@@ -44,7 +44,7 @@ public class BindingTypeProcessor extends IntentAttachPointTypeProcessor {
super(policyFactory, intentAttachPointTypeFactory, extensionProcessor, monitor);
}
- public BindingTypeProcessor(ModelFactoryExtensionPoint modelFactories,
+ public BindingTypeProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> extensionProcessor,
Monitor monitor) {
super(modelFactories.getFactory(PolicyFactory.class),
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
index 119afa3473..b4f5707214 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ImplementationTypeProcessor.java
@@ -21,10 +21,10 @@ package org.apache.tuscany.sca.policy.xml;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
@@ -44,7 +44,7 @@ public class ImplementationTypeProcessor extends IntentAttachPointTypeProcessor
super(policyFactory, intentAttachPointTypeFactory, extensionProcessor, monitor);
}
- public ImplementationTypeProcessor(ModelFactoryExtensionPoint modelFactories,
+ public ImplementationTypeProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> extensionProcessor,
Monitor monitor) {
super(modelFactories.getFactory(PolicyFactory.class),
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
index 868f37de23..efdf5d4b4f 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicyIntentProcessor.java
@@ -31,13 +31,13 @@ import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -57,7 +57,7 @@ abstract class PolicyIntentProcessor<T extends Intent> extends BaseStAXArtifactP
private PolicyFactory policyFactory;
private Monitor monitor;
- public PolicyIntentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public PolicyIntentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
index a15d385b02..10d388982b 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/PolicySetProcessor.java
@@ -36,13 +36,13 @@ import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -64,7 +64,7 @@ public class PolicySetProcessor extends BaseStAXArtifactProcessor implements StA
private XPathFactory xpathFactory = XPathFactory.newInstance();
private Monitor monitor;
- public PolicySetProcessor(ModelFactoryExtensionPoint modelFactories,
+ public PolicySetProcessor(FactoryExtensionPoint modelFactories,
StAXArtifactProcessor<Object> extensionProcessor,
Monitor monitor) {
this.policyFactory = modelFactories.getFactory(PolicyFactory.class);
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
index 7c205292b0..656107b470 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/ProfileIntentProcessor.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.policy.xml;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.PolicyFactory;
import org.apache.tuscany.sca.policy.ProfileIntent;
@@ -35,7 +35,7 @@ public class ProfileIntentProcessor extends PolicyIntentProcessor<ProfileIntent>
super(policyFactory, monitor);
}
- public ProfileIntentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public ProfileIntentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
super(modelFactories, monitor);
}
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
index abe80e2a54..7270dbe6db 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/QualifiedIntentProcessor.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.policy.xml;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.PolicyFactory;
import org.apache.tuscany.sca.policy.QualifiedIntent;
@@ -31,7 +31,7 @@ import org.apache.tuscany.sca.policy.QualifiedIntent;
*/
public class QualifiedIntentProcessor extends PolicyIntentProcessor<QualifiedIntent> {
- public QualifiedIntentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public QualifiedIntentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
super(modelFactories, monitor);
}
diff --git a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
index 73795349c1..e928ead4c6 100644
--- a/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
+++ b/branches/sca-equinox/modules/policy-xml/src/main/java/org/apache/tuscany/sca/policy/xml/SimpleIntentProcessor.java
@@ -19,7 +19,7 @@
package org.apache.tuscany.sca.policy.xml;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.policy.Intent;
import org.apache.tuscany.sca.policy.PolicyFactory;
@@ -35,7 +35,7 @@ public class SimpleIntentProcessor extends PolicyIntentProcessor<Intent> {
super(policyFactory, monitor);
}
- public SimpleIntentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public SimpleIntentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
super(modelFactories, monitor);
}
diff --git a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java
index 408debdc8e..bdfd244293 100644
--- a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java
+++ b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderImpl.java
@@ -31,47 +31,45 @@ import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
import org.apache.tuscany.sca.contribution.resolver.DefaultImportModelResolver;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
-import org.apache.tuscany.sca.monitor.impl.ProblemImpl;
import org.apache.tuscany.sca.workspace.Workspace;
-import org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
+import org.apache.tuscany.sca.workspace.builder.ContributionBuilderException;
/**
* A contribution dependency builder.
*
* @version $Rev$ $Date$
*/
-public class ContributionDependencyBuilderImpl implements ContributionDependencyBuilder {
+public class ContributionDependencyBuilderImpl implements ContributionBuilder {
private static final Logger logger = Logger.getLogger(ContributionDependencyBuilderImpl.class.getName());
- private Monitor monitor;
-
/**
* Constructs a new ContributionDependencyBuilder.
*/
- public ContributionDependencyBuilderImpl(Monitor monitor) {
-
- this.monitor = monitor;
+ public ContributionDependencyBuilderImpl(FactoryExtensionPoint factories) {
}
- /**
- * Calculate the set of contributions that a contribution depends on.
- * @param contribution
- * @param workspace
- * @return
- */
- public List<Contribution> buildContributionDependencies(Contribution contribution, Workspace workspace) {
+ public String getID() {
+ return "org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder";
+ }
+
+ public void build(Contribution contribution, Workspace workspace, Monitor monitor) throws ContributionBuilderException{
+ contribution.getDependencies().clear();
+
List<Contribution> dependencies = new ArrayList<Contribution>();
Set<Contribution> set = new HashSet<Contribution>();
dependencies.add(contribution);
set.add(contribution);
- addContributionDependencies(contribution, workspace, dependencies, set);
+ addContributionDependencies(contribution, workspace, dependencies, set, monitor);
Collections.reverse(dependencies);
- return dependencies;
+
+ contribution.getDependencies().addAll(dependencies);
}
/**
@@ -80,8 +78,9 @@ public class ContributionDependencyBuilderImpl implements ContributionDependency
* @param workspace
* @param dependencies
* @param set
+ * @param monitor
*/
- private void addContributionDependencies(Contribution contribution, Workspace workspace, List<Contribution> dependencies, Set<Contribution> set) {
+ private void addContributionDependencies(Contribution contribution, Workspace workspace, List<Contribution> dependencies, Set<Contribution> set, Monitor monitor) {
// Go through the contribution imports
for (Import import_: contribution.getImports()) {
@@ -107,7 +106,7 @@ public class ContributionDependencyBuilderImpl implements ContributionDependency
dependencies.add(dependency);
// Now add the dependencies of that contribution
- addContributionDependencies(dependency, workspace, dependencies, set);
+ addContributionDependencies(dependency, workspace, dependencies, set, monitor);
}
}
}
@@ -122,7 +121,7 @@ public class ContributionDependencyBuilderImpl implements ContributionDependency
} else {
// Record import resolution issue
if (!(import_ instanceof DefaultImport)) {
- warning("UnresolvedImport", import_, import_);
+ warning(monitor, "UnresolvedImport", import_, import_);
}
}
}
@@ -135,9 +134,9 @@ public class ContributionDependencyBuilderImpl implements ContributionDependency
* @param message
* @param model
*/
- private void warning(String message, Object model, Object... messageParameters) {
+ private static void warning(Monitor monitor, String message, Object model, Object... messageParameters) {
if (monitor != null) {
- Problem problem = monitor.createProblem(getClass().getName(), "workspace-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
+ Problem problem = monitor.createProblem(ContributionDependencyBuilderImpl.class.getName(), "workspace-validation-messages", Severity.WARNING, model, message, (Object[])messageParameters);
monitor.problem(problem);
}
}
diff --git a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java
index 880e95480e..9aa57361fc 100644
--- a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java
+++ b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionContentProcessor.java
@@ -32,7 +32,6 @@ import org.apache.tuscany.sca.contribution.DefaultExport;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -46,6 +45,7 @@ import org.apache.tuscany.sca.contribution.scanner.ContributionScanner;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.workspace.scanner.impl.DirectoryContributionScanner;
@@ -60,14 +60,14 @@ import org.apache.tuscany.sca.workspace.scanner.impl.JarContributionScanner;
public class ContributionContentProcessor implements URLArtifactProcessor<Contribution>{
private ContributionFactory contributionFactory;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private URLArtifactProcessor<Object> artifactProcessor;
private StAXArtifactProcessor<Object> extensionProcessor;
private UtilityExtensionPoint utilities;
private Monitor monitor = null;
public ContributionContentProcessor(ExtensionPointRegistry extensionPoints, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
- this.modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
hackResolvers(modelResolvers);
this.monitor = monitor;
@@ -77,7 +77,7 @@ public class ContributionContentProcessor implements URLArtifactProcessor<Contri
this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
}
- public ContributionContentProcessor(ModelFactoryExtensionPoint modelFactories, ModelResolverExtensionPoint modelResolvers,
+ public ContributionContentProcessor(FactoryExtensionPoint modelFactories, ModelResolverExtensionPoint modelResolvers,
URLArtifactProcessor<Object> artifactProcessor, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
this.modelFactories = modelFactories;
this.modelResolvers = modelResolvers;
diff --git a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java
index 6ef0fa753d..21a0382347 100644
--- a/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java
+++ b/branches/sca-equinox/modules/workspace-impl/src/main/java/org/apache/tuscany/sca/workspace/processor/impl/ContributionInfoProcessor.java
@@ -34,7 +34,6 @@ import org.apache.tuscany.sca.contribution.DefaultExport;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Export;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
@@ -48,6 +47,7 @@ import org.apache.tuscany.sca.contribution.scanner.ContributionScanner;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.workspace.scanner.impl.DirectoryContributionScanner;
import org.apache.tuscany.sca.workspace.scanner.impl.JarContributionScanner;
@@ -61,13 +61,13 @@ import org.apache.tuscany.sca.workspace.scanner.impl.JarContributionScanner;
public class ContributionInfoProcessor implements URLArtifactProcessor<Contribution>{
private ContributionFactory contributionFactory;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private URLArtifactProcessorExtensionPoint artifactProcessors;
private URLArtifactProcessor<Object> artifactProcessor;
private StAXArtifactProcessor<Object> extensionProcessor;
public ContributionInfoProcessor(ExtensionPointRegistry extensionPoints, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
- this.modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ this.modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
hackResolvers(modelResolvers);
URLArtifactProcessorExtensionPoint artifactProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
@@ -77,7 +77,7 @@ public class ContributionInfoProcessor implements URLArtifactProcessor<Contribut
this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
}
- public ContributionInfoProcessor(ModelFactoryExtensionPoint modelFactories, ModelResolverExtensionPoint modelResolvers, URLArtifactProcessor<Object> artifactProcessor) {
+ public ContributionInfoProcessor(FactoryExtensionPoint modelFactories, ModelResolverExtensionPoint modelResolvers, URLArtifactProcessor<Object> artifactProcessor) {
this.modelFactories = modelFactories;
this.modelResolvers = modelResolvers;
hackResolvers(modelResolvers);
diff --git a/branches/sca-equinox/modules/workspace-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilder b/branches/sca-equinox/modules/workspace-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilder
new file mode 100644
index 0000000000..379d0a017e
--- /dev/null
+++ b/branches/sca-equinox/modules/workspace-impl/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilder
@@ -0,0 +1,18 @@
+# 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.
+
+org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;id=org.apache.tuscany.sca.workspace.builder.ContributionDependencyBuilder
diff --git a/branches/sca-equinox/modules/workspace-impl/src/test/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderTestCase.java b/branches/sca-equinox/modules/workspace-impl/src/test/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderTestCase.java
index f7b6b35679..63f6035433 100644
--- a/branches/sca-equinox/modules/workspace-impl/src/test/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderTestCase.java
+++ b/branches/sca-equinox/modules/workspace-impl/src/test/java/org/apache/tuscany/sca/workspace/builder/impl/ContributionDependencyBuilderTestCase.java
@@ -56,7 +56,7 @@ public class ContributionDependencyBuilderTestCase extends TestCase {
public void tearDown() throws Exception {
}
- public void testAnalyze() {
+ public void testAnalyze() throws Exception {
Workspace workspace = workspaceFactory.createWorkspace();
Contribution importer = contributionFactory.createContribution();
importer.setURI("importer");
@@ -89,8 +89,9 @@ public class ContributionDependencyBuilderTestCase extends TestCase {
export.setNamespace("http://another");
another.getExports().add(export);
- ContributionDependencyBuilderImpl analyzer = new ContributionDependencyBuilderImpl(null);
- List<Contribution> dependencies = analyzer.buildContributionDependencies(importer, workspace);
+ ContributionDependencyBuilderImpl builder = new ContributionDependencyBuilderImpl(null);
+ builder.build(importer, workspace, null);
+ List<Contribution> dependencies = importer.getDependencies();
assertTrue(dependencies.size() == 3);
assertTrue(dependencies.contains(importer));
assertTrue(dependencies.contains(imported));
diff --git a/branches/sca-equinox/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java b/branches/sca-equinox/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
index d0665a4ec8..50ea844804 100644
--- a/branches/sca-equinox/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
+++ b/branches/sca-equinox/modules/workspace-xml/src/main/java/org/apache/tuscany/sca/workspace/xml/WorkspaceProcessor.java
@@ -31,13 +31,13 @@ import javax.xml.stream.XMLStreamWriter;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.ContributionFactory;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.BaseStAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
import org.apache.tuscany.sca.contribution.service.ContributionWriteException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.workspace.Workspace;
import org.apache.tuscany.sca.workspace.WorkspaceFactory;
@@ -75,7 +75,7 @@ public class WorkspaceProcessor extends BaseStAXArtifactProcessor implements StA
* @param modelFactories
* @param extensionProcessor
*/
- public WorkspaceProcessor(ModelFactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
+ public WorkspaceProcessor(FactoryExtensionPoint modelFactories, StAXArtifactProcessor<Object> extensionProcessor, Monitor monitor) {
this.workspaceFactory = modelFactories.getFactory(WorkspaceFactory.class);
this.contributionFactory = modelFactories.getFactory(ContributionFactory.class);
}
diff --git a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionDependencyBuilder.java b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilder.java
index 6fab700243..b7c11f769b 100644
--- a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionDependencyBuilder.java
+++ b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilder.java
@@ -19,24 +19,31 @@
package org.apache.tuscany.sca.workspace.builder;
-import java.util.List;
-
import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.workspace.Workspace;
/**
- * A contribution dependency builder.
+ * A contribution builder.
*
* @version $Rev$ $Date$
*/
-public interface ContributionDependencyBuilder {
+public interface ContributionBuilder {
/**
- * Build the set of contributions that a contribution depends on.
- * @param workspace
- * @param contribution
+ * Returns the ID of the builder.
+ *
* @return
*/
- List<Contribution> buildContributionDependencies(Contribution contribution, Workspace workspace);
+ String getID();
+
+ /**
+ * Build a contribution.
+ *
+ * @param contribution
+ * @param workspace
+ * @param monitor
+ */
+ void build(Contribution contribution, Workspace workspace, Monitor monitor) throws ContributionBuilderException;
}
diff --git a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderException.java b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderException.java
new file mode 100644
index 0000000000..10c18def10
--- /dev/null
+++ b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderException.java
@@ -0,0 +1,45 @@
+/*
+ * 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.sca.workspace.builder;
+
+/**
+ * Reports a contribution builder exception.
+ *
+ * @version $Rev$ $Date$
+ */
+public class ContributionBuilderException extends Exception {
+ private static final long serialVersionUID = -1198817287971778953L;
+
+ public ContributionBuilderException() {
+ }
+
+ public ContributionBuilderException(String message) {
+ super(message);
+ }
+
+ public ContributionBuilderException(Throwable cause) {
+ super(cause);
+ }
+
+ public ContributionBuilderException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+}
diff --git a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderExtensionPoint.java b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderExtensionPoint.java
new file mode 100644
index 0000000000..8200321eec
--- /dev/null
+++ b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/ContributionBuilderExtensionPoint.java
@@ -0,0 +1,51 @@
+/*
+ * 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.sca.workspace.builder;
+
+/**
+ * An extension point for Contribution builders.
+ *
+ * @version $Rev: $ $Date: $
+ */
+public interface ContributionBuilderExtensionPoint {
+
+ /**
+ * Adds a contribution builder.
+ *
+ * @param contributionBuilder
+ */
+ void addContributionBuilder(ContributionBuilder contributionBuilder);
+
+ /**
+ * Removes a contribution builder.
+ *
+ * @param contributionBuilder
+ */
+ void removeContributionBuilder(ContributionBuilder contributionBuilder);
+
+ /**
+ * Returns the contribution builder with the given id.
+ *
+ * @param id
+ * @return
+ */
+ ContributionBuilder getContributionBuilder(String id);
+
+}
diff --git a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/DefaultContributionBuilderExtensionPoint.java b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/DefaultContributionBuilderExtensionPoint.java
new file mode 100644
index 0000000000..1918732a25
--- /dev/null
+++ b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/builder/DefaultContributionBuilderExtensionPoint.java
@@ -0,0 +1,139 @@
+/*
+ * 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.sca.workspace.builder;
+
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
+import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
+import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
+import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
+import org.apache.tuscany.sca.monitor.Monitor;
+import org.apache.tuscany.sca.workspace.Workspace;
+
+/**
+ * Default implementation of a provider factory extension point.
+ *
+ * @version $Rev$ $Date$
+ */
+public class DefaultContributionBuilderExtensionPoint implements ContributionBuilderExtensionPoint {
+
+ private ExtensionPointRegistry registry;
+ private final Map<String, ContributionBuilder> builders = new HashMap<String, ContributionBuilder>();
+ private boolean loaded;
+
+ public DefaultContributionBuilderExtensionPoint(ExtensionPointRegistry registry) {
+ this.registry = registry;
+ }
+
+ public void addContributionBuilder(ContributionBuilder builder) {
+ builders.put(builder.getID(), builder);
+ }
+
+ public void removeContributionBuilder(ContributionBuilder builder) {
+ builders.remove(builder.getID());
+ }
+
+ public ContributionBuilder getContributionBuilder(String id) {
+ loadBuilders();
+ return builders.get(id);
+ }
+
+ /**
+ * Load builders declared under META-INF/services.
+ */
+ private void loadBuilders() {
+ if (loaded)
+ return;
+
+ FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class);
+
+ // Get the provider factory service declarations
+ Set<ServiceDeclaration> builderDeclarations;
+ ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
+ try {
+ builderDeclarations = serviceDiscovery.getServiceDeclarations(ContributionBuilder.class.getName());
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+
+ for (ServiceDeclaration builderDeclaration : builderDeclarations) {
+ Map<String, String> attributes = builderDeclaration.getAttributes();
+ String id = attributes.get("id");
+
+ ContributionBuilder builder = new LazyContributionBuilder(id, builderDeclaration, this, factories);
+ builders.put(id, builder);
+ }
+ }
+
+ /**
+ * A wrapper around a contribution builder allowing lazy
+ * loading and initialization of implementation providers.
+ */
+ private static class LazyContributionBuilder implements ContributionBuilder {
+
+ private FactoryExtensionPoint factories;
+ private String id;
+ private ServiceDeclaration builderDeclaration;
+ private ContributionBuilder builder;
+ private ContributionBuilderExtensionPoint builders;
+
+ private LazyContributionBuilder(String id, ServiceDeclaration factoryDeclaration,
+ ContributionBuilderExtensionPoint builders, FactoryExtensionPoint factories) {
+ this.id = id;
+ this.builderDeclaration = factoryDeclaration;
+ this.builders = builders;
+ this.factories = factories;
+ }
+
+ public String getID() {
+ return id;
+ }
+
+ public void build(Contribution contribution, Workspace workspace, Monitor monitor) throws ContributionBuilderException {
+ getBuilder().build(contribution, workspace, monitor);
+ }
+
+ private ContributionBuilder getBuilder() {
+ if (builder == null) {
+ try {
+ Class<ContributionBuilder> builderClass = (Class<ContributionBuilder>)builderDeclaration.loadClass();
+ try {
+ Constructor<ContributionBuilder> constructor = builderClass.getConstructor(FactoryExtensionPoint.class);
+ builder = constructor.newInstance(factories);
+ } catch (NoSuchMethodException e) {
+ Constructor<ContributionBuilder> constructor = builderClass.getConstructor(ContributionBuilderExtensionPoint.class, FactoryExtensionPoint.class);
+ builder = constructor.newInstance(builders, factories);
+ }
+ } catch (Exception e) {
+ throw new IllegalStateException(e);
+ }
+ }
+ return builder;
+ }
+
+ }
+
+}
diff --git a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
index e60a5d8108..8c2e119493 100644
--- a/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
+++ b/branches/sca-equinox/modules/workspace/src/main/java/org/apache/tuscany/sca/workspace/impl/WorkspaceImpl.java
@@ -44,6 +44,7 @@ class WorkspaceImpl implements Workspace {
private byte[] contents;
private boolean unresolved;
private ModelResolver modelResolver;
+ private List<Contribution> dependencies = new ArrayList<Contribution>();
/**
* Constructs a new workspace.
@@ -98,6 +99,10 @@ class WorkspaceImpl implements Workspace {
public List<Artifact> getArtifacts() {
return (List<Artifact>)(Object)contributions;
}
+
+ public List<Contribution> getDependencies() {
+ return dependencies;
+ }
public ClassLoader getClassLoader() {
//FIXME Remove later
diff --git a/branches/sca-equinox/modules/workspace/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint b/branches/sca-equinox/modules/workspace/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint
new file mode 100644
index 0000000000..98ad0b72b0
--- /dev/null
+++ b/branches/sca-equinox/modules/workspace/src/main/resources/META-INF/services/org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint
@@ -0,0 +1,18 @@
+# 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.
+
+org.apache.tuscany.sca.workspace.builder.DefaultContributionBuilderExtensionPoint \ No newline at end of file
diff --git a/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessor.java b/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessor.java
index 5586bac6f6..f74ed2c589 100644
--- a/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessor.java
+++ b/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessor.java
@@ -24,11 +24,11 @@ import java.net.URL;
import javax.xml.namespace.QName;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionReadException;
import org.apache.tuscany.sca.contribution.service.ContributionResolveException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.monitor.Monitor;
import org.apache.tuscany.sca.monitor.Problem;
import org.apache.tuscany.sca.monitor.Problem.Severity;
@@ -46,7 +46,7 @@ public class XSDDocumentProcessor implements URLArtifactProcessor<XSDefinition>
private XSDFactory factory;
private Monitor monitor;
- public XSDDocumentProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public XSDDocumentProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
this.factory = modelFactories.getFactory(XSDFactory.class);
this.monitor = monitor;
}
diff --git a/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java b/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
index 3e22b49d31..7a8d40af10 100644
--- a/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
+++ b/branches/sca-equinox/modules/xsd-xml/src/main/java/org/apache/tuscany/sca/xsd/xml/XSDModelResolver.java
@@ -30,10 +30,10 @@ import org.apache.tuscany.sca.contribution.Artifact;
import org.apache.tuscany.sca.contribution.Contribution;
import org.apache.tuscany.sca.contribution.DefaultImport;
import org.apache.tuscany.sca.contribution.Import;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.namespace.NamespaceImport;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.contribution.service.ContributionRuntimeException;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.xsd.DefaultXSDFactory;
import org.apache.tuscany.sca.xsd.XSDFactory;
import org.apache.tuscany.sca.xsd.XSDefinition;
@@ -55,7 +55,7 @@ public class XSDModelResolver implements ModelResolver {
private Map<String, List<XSDefinition>> map = new HashMap<String, List<XSDefinition>>();
private XmlSchemaCollection schemaCollection;
- public XSDModelResolver(Contribution contribution, ModelFactoryExtensionPoint modelFactories) {
+ public XSDModelResolver(Contribution contribution, FactoryExtensionPoint modelFactories) {
this.contribution = contribution;
this.schemaCollection = new XmlSchemaCollection();
schemaCollection.setSchemaResolver(new URIResolverImpl(contribution));
diff --git a/branches/sca-equinox/modules/xsd-xml/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java b/branches/sca-equinox/modules/xsd-xml/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
index 76e6a57c29..a42c916683 100644
--- a/branches/sca-equinox/modules/xsd-xml/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
+++ b/branches/sca-equinox/modules/xsd-xml/src/test/java/org/apache/tuscany/sca/xsd/xml/XSDDocumentProcessorTestCase.java
@@ -26,13 +26,13 @@ import javax.xml.namespace.QName;
import junit.framework.Assert;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
import org.apache.tuscany.sca.contribution.processor.ExtensibleURLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint;
import org.apache.tuscany.sca.contribution.resolver.ModelResolver;
import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.core.FactoryExtensionPoint;
import org.apache.tuscany.sca.xsd.XSDefinition;
import org.apache.ws.commons.schema.XmlSchemaInclude;
import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
@@ -55,7 +55,7 @@ public class XSDDocumentProcessorTestCase {
ExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
URLArtifactProcessorExtensionPoint documentProcessors = extensionPoints.getExtensionPoint(URLArtifactProcessorExtensionPoint.class);
documentProcessor = new ExtensibleURLArtifactProcessor(documentProcessors, null);
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
resolver = new XSDModelResolver(null, modelFactories);
}