summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/assembly-xml/src/test/java/org/apache/tuscany/sca
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/assembly-xml/src/test/java/org/apache/tuscany/sca
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 '')
-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
4 files changed, 15 insertions, 15 deletions
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);