summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/modules/implementation-web/META-INF/MANIFEST.MF13
-rw-r--r--java/sca/modules/implementation-web/pom.xml14
-rw-r--r--java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java4
-rw-r--r--java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java19
-rw-r--r--java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java19
5 files changed, 21 insertions, 48 deletions
diff --git a/java/sca/modules/implementation-web/META-INF/MANIFEST.MF b/java/sca/modules/implementation-web/META-INF/MANIFEST.MF
index 36a926ce69..133f552f32 100644
--- a/java/sca/modules/implementation-web/META-INF/MANIFEST.MF
+++ b/java/sca/modules/implementation-web/META-INF/MANIFEST.MF
@@ -1,10 +1,6 @@
Manifest-Version: 1.0
-Export-Package: org.apache.tuscany.sca.implementation.web;
- uses:="org.apache.tuscany.sca.assembly";version="2.0.0",org.apache.tuscany.sca.imple
- mentation.java;uses:="org.apache.tuscany.sca.assembly,org.apache.tusc
- any.sca.implementation.java.introspect,org.apache.tuscany.sca.core,or
- g.apache.tuscany.sca.policy,org.apache.tuscany.sca.interfacedef.java"
- ;version="2.0.0"
+Export-Package: org.apache.tuscany.sca.implementation.web;uses:="org.apache.t
+ uscany.sca.assembly";version="2.0.0"
Private-Package: org.apache.tuscany.sca.implementation.web.impl;version="2.0.0"
Tool: Bnd-0.0.255
Bundle-Name: Apache Tuscany SCA Web Implementation Web Model
@@ -16,9 +12,8 @@ Bundle-ManifestVersion: 2
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-Description: Apache Tuscany SCA Implementation Web Model
Import-Package: org.apache.tuscany.sca.assembly;version="2.0.0",
- org.apache.tuscany.sca.assembly.impl;version="2.0.0"
- org.oasisopen.sca;version="2.0.0",
- org.oasisopen.sca.annotation;version="2.0.0"
+ org.apache.tuscany.sca.assembly.xml;version="2.0.0";resolution:=optional,
+ org.apache.tuscany.sca.implementation.web;version="2.0.0"
Bundle-SymbolicName: org.apache.tuscany.sca.implementation.web
Bundle-DocURL: http://www.apache.org/
diff --git a/java/sca/modules/implementation-web/pom.xml b/java/sca/modules/implementation-web/pom.xml
index e6b96d53b7..2265545ff5 100644
--- a/java/sca/modules/implementation-web/pom.xml
+++ b/java/sca/modules/implementation-web/pom.xml
@@ -36,27 +36,19 @@
<artifactId>tuscany-assembly</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
-
+
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-assembly-xml</artifactId>
<version>2.0-SNAPSHOT</version>
</dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-contribution-xml</artifactId>
- <version>2.0-SNAPSHOT</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-embedded</artifactId>
+ <artifactId>tuscany-core-spi</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
diff --git a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
index f44da1f5bb..b255dd2d0e 100644
--- a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
+++ b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/impl/WebImplementationImpl.java
@@ -22,12 +22,12 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.assembly.builder.ComponentPreProcessor;
import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
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.builder.ComponentPreProcessor;
import org.apache.tuscany.sca.implementation.web.WebImplementation;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
diff --git a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
index 540b5edc27..e37bdd9fb8 100644
--- a/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
+++ b/java/sca/modules/implementation-web/src/main/java/org/apache/tuscany/sca/implementation/web/xml/WebImplementationProcessor.java
@@ -28,17 +28,17 @@ 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.ContributionReadException;
+import org.apache.tuscany.sca.contribution.processor.ContributionResolveException;
+import org.apache.tuscany.sca.contribution.processor.ContributionWriteException;
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.implementation.web.WebImplementation;
import org.apache.tuscany.sca.implementation.web.WebImplementationFactory;
-import org.apache.tuscany.sca.monitor.Monitor;
-
+import org.apache.tuscany.sca.implementation.web.impl.WebImplementationFactoryImpl;
/**
* Implements a StAX artifact processor for Web implementations.
@@ -48,12 +48,11 @@ public class WebImplementationProcessor extends BaseStAXArtifactProcessor implem
private AssemblyFactory assemblyFactory;
private WebImplementationFactory implementationFactory;
- private Monitor monitor;
- public WebImplementationProcessor(ModelFactoryExtensionPoint modelFactories, Monitor monitor) {
+ public WebImplementationProcessor(ExtensionPointRegistry extensionPoints) {
+ FactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
this.assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
- this.implementationFactory = modelFactories.getFactory(WebImplementationFactory.class);
- this.monitor = monitor;
+ this.implementationFactory = new WebImplementationFactoryImpl();
}
public QName getArtifactType() {
diff --git a/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java b/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java
index 10a7df7ae5..b23d24656a 100644
--- a/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java
+++ b/java/sca/modules/implementation-web/src/test/java/org/apache/tuscany/sca/implementation/web/xml/ReadTestCase.java
@@ -26,21 +26,15 @@ import javax.xml.stream.XMLStreamReader;
import junit.framework.TestCase;
-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.CompositeBuilderImpl;
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
+import org.apache.tuscany.sca.assembly.builder.CompositeBuilderExtensionPoint;
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.UtilityExtensionPoint;
import org.apache.tuscany.sca.implementation.web.WebImplementation;
-import org.apache.tuscany.sca.interfacedef.InterfaceContractMapper;
-import org.apache.tuscany.sca.policy.IntentAttachPointTypeFactory;
/**
* Test reading Web implementations.
@@ -57,14 +51,7 @@ public class ReadTestCase extends TestCase {
inputFactory = XMLInputFactory.newInstance();
StAXArtifactProcessorExtensionPoint staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(extensionPoints);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, null, null);
-
- ModelFactoryExtensionPoint modelFactories = extensionPoints.getExtensionPoint(ModelFactoryExtensionPoint.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 = extensionPoints.getExtensionPoint(CompositeBuilderExtensionPoint.class).getCompositeBuilder("org.apache.tuscany.sca.assembly.builder.CompositeBuilder");
}
public void testReadComposite() throws Exception {
@@ -73,7 +60,7 @@ public class ReadTestCase extends TestCase {
Composite composite = (Composite) staxProcessor.read(reader);
assertNotNull(composite);
- compositeBuilder.build(composite);
+ compositeBuilder.build(composite, null, null);
assertTrue(((WebImplementation) composite.getComponents().get(0).getImplementation()).getWebURI().equals("MyWebapp"));
}