summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-spring
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-09-14 21:49:36 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-09-14 21:49:36 +0000
commit053d9c4b0bc3992e55d6d0c77a119de702a48eb3 (patch)
tree2740369607eeb9e5540e28cec056d560c8b69626 /java/sca/modules/implementation-spring
parent587569bffde0f73937d64671d1bf175d564af5b2 (diff)
Enhance the CompositeBuilderExtensionPoint to include binding/implementation builders which replace BindingExtension and CompositePreProcessor
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@814879 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-spring')
-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