summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-spring/src
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca/modules/implementation-spring/src')
-rw-r--r--java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java5
-rw-r--r--java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationBuilder.java40
-rw-r--r--java/sca/modules/implementation-spring/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder17
3 files changed, 59 insertions, 3 deletions
diff --git a/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java b/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
index 9a8fac6a61..1a183b0543 100644
--- a/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
+++ b/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
@@ -31,7 +31,6 @@ import org.apache.tuscany.sca.assembly.Implementation;
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.assembly.impl.ImplementationImpl;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -42,7 +41,7 @@ import org.apache.tuscany.sca.runtime.RuntimeComponent;
*
* @version $Rev$ $Date$
*/
-public class SpringImplementation extends ImplementationImpl implements Implementation, ComponentPreProcessor, Extensible {
+public class SpringImplementation extends ImplementationImpl implements Implementation, Extensible {
private final static QName TYPE = new QName(SCA11_NS, "implementation.spring");
// The location attribute which points to the Spring application-context XML file
private String location;
@@ -173,7 +172,7 @@ public class SpringImplementation extends ImplementationImpl implements Implemen
/**
* Use preProcess to validate and map the references and properties dynamically
*/
- public void preProcess(Component component) {
+ public void build(Component component) {
if (!(component instanceof RuntimeComponent))
return;
diff --git a/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationBuilder.java b/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationBuilder.java
new file mode 100644
index 0000000000..121f1ca234
--- /dev/null
+++ b/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationBuilder.java
@@ -0,0 +1,40 @@
+/*
+ * 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.implementation.spring;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.assembly.builder.ImplementationBuilder;
+import org.apache.tuscany.sca.monitor.Monitor;
+
+/**
+ *
+ */
+public class SpringImplementationBuilder implements ImplementationBuilder<SpringImplementation> {
+
+ public void build(Component component, SpringImplementation implmentation, Monitor monitor) {
+ implmentation.build(component);
+ }
+
+ public Class<SpringImplementation> getModelType() {
+ // TODO Auto-generated method stub
+ return SpringImplementation.class;
+ }
+
+}
diff --git a/java/sca/modules/implementation-spring/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder b/java/sca/modules/implementation-spring/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder
new file mode 100644
index 0000000000..346e2b757f
--- /dev/null
+++ b/java/sca/modules/implementation-spring/src/main/resources/META-INF/services/org.apache.tuscany.sca.assembly.builder.ImplementationBuilder
@@ -0,0 +1,17 @@
+# 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.spring.SpringImplementationBuilder;model=org.apache.tuscany.sca.implementation.spring.SpringImplementation