diff options
Diffstat (limited to 'branches/sca-equinox/modules/implementation-node/src/main/java/org/apache')
3 files changed, 23 insertions, 26 deletions
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); } |