summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/itest
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/itest
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/itest')
-rw-r--r--branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java75
-rw-r--r--branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java25
-rw-r--r--branches/sca-equinox/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java4
-rw-r--r--branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java27
4 files changed, 52 insertions, 79 deletions
diff --git a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
index cad09920e8..aebe4ff211 100644
--- a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
+++ b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CompositeBuilderNonWiringImpl.java
@@ -49,16 +49,12 @@ import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
private static final Logger logger = Logger.getLogger(CompositeBuilderNonWiringImpl.class.getName());
private CompositeBuilder compositeIncludeBuilder;
- //private CompositeBuilder componentReferenceWireBuilder;
- //private CompositeBuilder componentReferencePromotionWireBuilder;
- //private CompositeBuilder compositeReferenceWireBuilder;
private CompositeBuilder compositeCloneBuilder;
private CompositeBuilder componentConfigurationBuilder;
private CompositeBuilder compositeServiceConfigurationBuilder;
private CompositeBuilder compositeReferenceConfigurationBuilder;
private CompositeBuilder compositeBindingURIBuilder;
private CompositeBuilder componentServicePromotionBuilder;
- //private CompositeBuilder compositeServicePromotionBuilder;
private CompositeBuilder compositePromotionBuilder;
private CompositeBuilder compositePolicyBuilder;
private CompositeBuilder componentServiceBindingBuilder;
@@ -76,9 +72,8 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
public CompositeBuilderNonWiringImpl(AssemblyFactory assemblyFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- Monitor monitor) {
- this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper, null, monitor);
+ InterfaceContractMapper interfaceContractMapper) {
+ this(assemblyFactory, null, scaBindingFactory, intentAttachPointTypeFactory, interfaceContractMapper);
}
/**
@@ -96,77 +91,59 @@ public class CompositeBuilderNonWiringImpl implements CompositeBuilder {
EndpointFactory endpointFactory,
SCABindingFactory scaBindingFactory,
IntentAttachPointTypeFactory intentAttachPointTypeFactory,
- InterfaceContractMapper interfaceContractMapper,
- SCADefinitions policyDefinitions,
- Monitor monitor) {
+ InterfaceContractMapper interfaceContractMapper) {
if (endpointFactory == null){
endpointFactory = new DefaultEndpointFactory();
}
- compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl(monitor);
- //componentReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- //componentReferencePromotionWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferencePromotionWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- //compositeReferenceWireBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceWireBuilderImpl(assemblyFactory, endpointFactory, monitor);
- compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl(monitor);
- componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
+ compositeIncludeBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeIncludeBuilderImpl();
+ compositeCloneBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeCloneBuilderImpl();
+ componentConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper);
compositeServiceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServiceConfigurationBuilderImpl(assemblyFactory);
compositeReferenceConfigurationBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeReferenceConfigurationBuilderImpl(assemblyFactory);
- compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper, policyDefinitions, monitor);
- //componentServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServicePromotionBuilderImpl(assemblyFactory);
- //compositeServicePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeServicePromotionBuilderImpl(assemblyFactory);
- compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper, monitor);
- componentServiceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl(monitor);
- componentReferenceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl(monitor);
+ compositeBindingURIBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl(assemblyFactory, scaBindingFactory, interfaceContractMapper);
+ compositePromotionBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePromotionBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ compositePolicyBuilder = new org.apache.tuscany.sca.assembly.builder.impl.CompositePolicyBuilderImpl(assemblyFactory, endpointFactory, interfaceContractMapper);
+ componentServiceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentServiceBindingBuilderImpl();
+ componentReferenceBindingBuilder = new org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceBindingBuilderImpl();
}
- public void build(Composite composite) throws CompositeBuilderException {
+ public String getID() {
+ return "org.apache.tuscany.sca.assembly.builder.CompositeBuilderNonWiring";
+ }
+
+ 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);
-
- // Create promoted component services
-// componentServicePromotionBuilder.build(composite);
-
- // Create promoted composite services
-// compositeServicePromotionBuilder.build(composite);
+ compositeBindingURIBuilder.build(composite, definitions, monitor);
// Build component service binding-related information
- componentServiceBindingBuilder.build(composite);
+ componentServiceBindingBuilder.build(composite, definitions, monitor);
- // Wire the components
-// componentReferenceWireBuilder.build(composite);
-
- // Wire the promoted component references
-// componentReferencePromotionWireBuilder.build(composite);
-
- // Wire the composite references
-// compositeReferenceWireBuilder.build(composite);
-
// 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/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
index 82a8ca6689..b2e7dbb8c0 100644
--- a/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
+++ b/branches/sca-equinox/itest/builder/src/test/java/org/apache/tuscany/sca/itest/builder/CustomCompositeBuilder.java
@@ -39,7 +39,6 @@ import org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl;
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.StAXArtifactProcessor;
import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -49,6 +48,7 @@ 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;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -59,18 +59,18 @@ 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.ContributionBuilder;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
public class CustomCompositeBuilder {
private URLArtifactProcessor<Contribution> contributionProcessor;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private WorkspaceFactory workspaceFactory;
private AssemblyFactory assemblyFactory;
private XMLOutputFactory outputFactory;
private StAXArtifactProcessor<Object> xmlProcessor;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private static Workspace workspace;
private List<SCADefinitions> policyDefinitions;
@@ -99,7 +99,7 @@ public class CustomCompositeBuilder {
}
// Get XML input/output factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -119,16 +119,16 @@ public class CustomCompositeBuilder {
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ contributionDependencyBuilder = new ContributionDependencyBuilderImpl(null);
// Create a composite builder
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
if (nonWiring) {
- domainCompositeBuilder = new CompositeBuilderNonWiringImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderNonWiringImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
} else {
- domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
}
}
@@ -147,20 +147,17 @@ public class CustomCompositeBuilder {
workspace.getContributions().add(testContribution);
// Build the contribution dependencies
- Map<Contribution, List<Contribution>> contributionDependencies = new HashMap<Contribution, List<Contribution>>();
Set<Contribution> resolved = new HashSet<Contribution>();
for (Contribution contribution: workspace.getContributions()) {
- List<Contribution> dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
// Resolve contributions
- for (Contribution dependency: dependencies) {
+ for (Contribution dependency: contribution.getDependencies()) {
if (!resolved.contains(dependency)) {
resolved.add(dependency);
contributionProcessor.resolve(dependency, workspace.getModelResolver());
}
}
-
- contributionDependencies.put(contribution, dependencies);
}
// Create a composite model for the domain
@@ -172,7 +169,7 @@ public class CustomCompositeBuilder {
domainComposite.getIncludes().addAll(workspace.getDeployables());
// Build the domain composite and wire the components included in it
- domainCompositeBuilder.build(domainComposite);
+ domainCompositeBuilder.build(domainComposite, null, monitor);
}
/**
diff --git a/branches/sca-equinox/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java b/branches/sca-equinox/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
index ff47988bce..0e13a017f0 100644
--- a/branches/sca-equinox/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
+++ b/branches/sca-equinox/itest/policy/src/test/java/org/apache/tuscany/sca/itest/TestPolicyProcessor.java
@@ -23,12 +23,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.policy.Policy;
import org.apache.tuscany.sca.policy.PolicyFactory;
@@ -40,7 +40,7 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
*/
public class TestPolicyProcessor implements StAXArtifactProcessor<Policy> {
- public TestPolicyProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public TestPolicyProcessor(FactoryExtensionPoint modelFactories, Monitor monitor) {
}
diff --git a/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java b/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
index 8665bfd535..e7305e671d 100644
--- a/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
+++ b/branches/sca-equinox/itest/validation/src/test/java/domain/CustomCompositeBuilder.java
@@ -35,9 +35,9 @@ import org.apache.tuscany.sca.assembly.AssemblyFactory;
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.CompositeBindingConfigurationBuilderImpl;
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 +47,7 @@ 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;
import org.apache.tuscany.sca.core.ModuleActivator;
import org.apache.tuscany.sca.core.ModuleActivatorExtensionPoint;
import org.apache.tuscany.sca.core.UtilityExtensionPoint;
@@ -59,18 +60,18 @@ 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.ContributionBuilder;
import org.apache.tuscany.sca.workspace.builder.impl.ContributionDependencyBuilderImpl;
public class CustomCompositeBuilder {
private URLArtifactProcessor<Contribution> contributionProcessor;
private ModelResolverExtensionPoint modelResolvers;
- private ModelFactoryExtensionPoint modelFactories;
+ private FactoryExtensionPoint modelFactories;
private WorkspaceFactory workspaceFactory;
private AssemblyFactory assemblyFactory;
private XMLOutputFactory outputFactory;
private StAXArtifactProcessor<Object> xmlProcessor;
- private ContributionDependencyBuilder contributionDependencyBuilder;
+ private ContributionBuilder contributionDependencyBuilder;
private CompositeBuilder domainCompositeBuilder;
private CompositeBuilder nodeCompositeBuilder;
private NodeImplementationFactory nodeFactory;
@@ -109,7 +110,7 @@ public class CustomCompositeBuilder {
}
// Get XML input/output factories
- modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.class);
+ modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
XMLInputFactory inputFactory = modelFactories.getFactory(XMLInputFactory.class);
outputFactory = modelFactories.getFactory(XMLOutputFactory.class);
@@ -131,16 +132,17 @@ public class CustomCompositeBuilder {
modelResolvers = extensionPoints.getExtensionPoint(ModelResolverExtensionPoint.class);
// Create a contribution dependency builder
- contributionDependencyBuilder = new ContributionDependencyBuilderImpl(monitor);
+ contributionDependencyBuilder = new ContributionDependencyBuilderImpl(null);
// Create a composite builder
SCABindingFactory scaBindingFactory = modelFactories.getFactory(SCABindingFactory.class);
IntentAttachPointTypeFactory attachPointTypeFactory = modelFactories.getFactory(IntentAttachPointTypeFactory.class);
InterfaceContractMapper contractMapper = utilities.getUtility(InterfaceContractMapper.class);
- domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper, monitor);
+ domainCompositeBuilder = new CompositeBuilderImpl(assemblyFactory, scaBindingFactory, attachPointTypeFactory, contractMapper);
// Create a node composite builder
- nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, null, monitor);
+ CompositeBuilder bindingConfigurationBuilder = new CompositeBindingConfigurationBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper);
+ nodeCompositeBuilder = new NodeCompositeBuilderImpl(assemblyFactory, scaBindingFactory, contractMapper, bindingConfigurationBuilder);
}
public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
@@ -159,20 +161,17 @@ public class CustomCompositeBuilder {
workspace.getContributions().add(storeContribution);
// Build the contribution dependencies
- Map<Contribution, List<Contribution>> contributionDependencies = new HashMap<Contribution, List<Contribution>>();
Set<Contribution> resolved = new HashSet<Contribution>();
for (Contribution contribution: workspace.getContributions()) {
- List<Contribution> dependencies = contributionDependencyBuilder.buildContributionDependencies(contribution, workspace);
+ contributionDependencyBuilder.build(contribution, workspace, monitor);
// Resolve contributions
- for (Contribution dependency: dependencies) {
+ for (Contribution dependency: contribution.getDependencies()) {
if (!resolved.contains(dependency)) {
resolved.add(dependency);
contributionProcessor.resolve(dependency, workspace.getModelResolver());
}
}
-
- contributionDependencies.put(contribution, dependencies);
}
// Create a composite model for the domain
@@ -201,7 +200,7 @@ public class CustomCompositeBuilder {
domainComposite.getIncludes().addAll(workspace.getDeployables());
// Build the domain composite and wire the components included in it
- domainCompositeBuilder.build(domainComposite);
+ domainCompositeBuilder.build(domainComposite, null, monitor);
}
public void readContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {