summaryrefslogtreecommitdiffstats
path: root/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring
diff options
context:
space:
mode:
authorlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-17 07:07:27 +0000
committerlresende <lresende@13f79535-47bb-0310-9956-ffa450edef68>2008-11-17 07:07:27 +0000
commit912966714fb39ebf173bf9bb50105fece6b1415d (patch)
tree42e240edb92ad6e6c874bd91704b6a8cc98cccb7 /branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring
parent763a7680f352d76acb4e13d271fdc3184ba289bc (diff)
Initial work to split implementation spring to follow the same pattern used in other modules (model/xml and runtime).
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@718181 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAApplicationContext.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAApplicationContext.java)2
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCANamespaceHandlerResolver.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCANamespaceHandlerResolver.java)2
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAParentApplicationContext.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAParentApplicationContext.java)5
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaNamespaceHandler.java40
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaPropertyBeanDefinitionParser.java37
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaReferenceBeanDefinitionParser.java38
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaServiceBeanDefinitionParser.java38
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProvider.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProvider.java)5
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProviderFactory.java)3
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvocationException.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvocationException.java)2
-rw-r--r--branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvoker.java (renamed from branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvoker.java)3
11 files changed, 167 insertions, 8 deletions
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAApplicationContext.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAApplicationContext.java
index b550fc3229..6ed1840b6b 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAApplicationContext.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAApplicationContext.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.impl;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.ApplicationContext;
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCANamespaceHandlerResolver.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCANamespaceHandlerResolver.java
index 32f575fe46..4e1c861910 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCANamespaceHandlerResolver.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCANamespaceHandlerResolver.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.impl;
import org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver;
import org.springframework.beans.factory.xml.NamespaceHandler;
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAParentApplicationContext.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAParentApplicationContext.java
index d419d6db68..d654d1172a 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SCAParentApplicationContext.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/SCAParentApplicationContext.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.impl;
import java.io.IOException;
import java.util.List;
@@ -29,6 +29,7 @@ import org.apache.tuscany.sca.assembly.Reference;
import org.apache.tuscany.sca.core.factory.ObjectFactory;
import org.apache.tuscany.sca.core.invocation.ProxyFactory;
import org.apache.tuscany.sca.implementation.java.injection.JavaPropertyValueObjectFactory;
+import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.springframework.beans.BeansException;
@@ -54,7 +55,7 @@ import org.springframework.core.io.Resource;
*
* @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $
*/
-class SCAParentApplicationContext implements ApplicationContext {
+public class SCAParentApplicationContext implements ApplicationContext {
// The Spring implementation for which this is the parent application context
private SpringImplementation implementation;
diff --git a/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaNamespaceHandler.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaNamespaceHandler.java
new file mode 100644
index 0000000000..5f7614a68e
--- /dev/null
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaNamespaceHandler.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.impl;
+
+import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
+
+/**
+ * Handler for the &lt;sca:&gt; namespace in an application context
+ *
+ * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $
+ */
+public class ScaNamespaceHandler extends NamespaceHandlerSupport {
+
+ public ScaNamespaceHandler() {
+ init();
+ }
+
+ public final void init() {
+ registerBeanDefinitionParser("reference", new ScaReferenceBeanDefinitionParser());
+ registerBeanDefinitionParser("service", new ScaServiceBeanDefinitionParser());
+ registerBeanDefinitionParser("property", new ScaPropertyBeanDefinitionParser());
+ }
+
+}
diff --git a/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaPropertyBeanDefinitionParser.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaPropertyBeanDefinitionParser.java
new file mode 100644
index 0000000000..a025d23b9f
--- /dev/null
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaPropertyBeanDefinitionParser.java
@@ -0,0 +1,37 @@
+/*
+ * 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.impl;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.xml.BeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.w3c.dom.Element;
+
+/**
+ * Parser for the &lt;sca:reference&gt; element
+ * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $
+ */
+public class ScaPropertyBeanDefinitionParser implements BeanDefinitionParser {
+
+ public BeanDefinition parse(Element element, ParserContext parserContext) {
+ // do nothing, this is handled by Tuscany
+ return null;
+ }
+
+}
diff --git a/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaReferenceBeanDefinitionParser.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaReferenceBeanDefinitionParser.java
new file mode 100644
index 0000000000..178f538339
--- /dev/null
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaReferenceBeanDefinitionParser.java
@@ -0,0 +1,38 @@
+/*
+ * 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.impl;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.xml.BeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.w3c.dom.Element;
+
+/**
+ * Parser for the &lt;sca:reference&gt; element
+ *
+ * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $
+ */
+public class ScaReferenceBeanDefinitionParser implements BeanDefinitionParser {
+
+ public BeanDefinition parse(Element element, ParserContext parserContext) {
+ // do nothing, this is handled by Tuscany
+ return null;
+ }
+
+}
diff --git a/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaServiceBeanDefinitionParser.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaServiceBeanDefinitionParser.java
new file mode 100644
index 0000000000..ae5093dbea
--- /dev/null
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/impl/ScaServiceBeanDefinitionParser.java
@@ -0,0 +1,38 @@
+/*
+ * 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.impl;
+
+import org.springframework.beans.factory.config.BeanDefinition;
+import org.springframework.beans.factory.xml.BeanDefinitionParser;
+import org.springframework.beans.factory.xml.ParserContext;
+import org.w3c.dom.Element;
+
+/**
+ * Parser for the &lt;sca:service/&gt; element
+ *
+ * @version $Rev: 511195 $ $Date: 2007-02-24 02:29:46 +0000 (Sat, 24 Feb 2007) $
+ */
+public class ScaServiceBeanDefinitionParser implements BeanDefinitionParser {
+
+ public BeanDefinition parse(Element element, ParserContext parserContext) {
+ // do nothing, handled by Tuscany
+ return null;
+ }
+
+}
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProvider.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProvider.java
index d7724f1723..f780c71549 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProvider.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProvider.java
@@ -17,10 +17,13 @@
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.provider;
import org.apache.tuscany.sca.core.invocation.ProxyFactory;
import org.apache.tuscany.sca.implementation.java.injection.JavaPropertyValueObjectFactory;
+import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
+import org.apache.tuscany.sca.implementation.spring.impl.SCAApplicationContext;
+import org.apache.tuscany.sca.implementation.spring.impl.SCAParentApplicationContext;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Invoker;
import org.apache.tuscany.sca.provider.ImplementationProvider;
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProviderFactory.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java
index f2bb1fd6e8..eb83a92f6a 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationProviderFactory.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringImplementationProviderFactory.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.provider;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory;
@@ -26,6 +26,7 @@ import org.apache.tuscany.sca.databinding.DataBindingExtensionPoint;
import org.apache.tuscany.sca.databinding.TransformerExtensionPoint;
import org.apache.tuscany.sca.databinding.impl.MediatorImpl;
import org.apache.tuscany.sca.implementation.java.injection.JavaPropertyValueObjectFactory;
+import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
import org.apache.tuscany.sca.provider.ImplementationProvider;
import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvocationException.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvocationException.java
index 410525a054..a195549851 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvocationException.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvocationException.java
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.provider;
/**
* @version $Rev$ $Date$
diff --git a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvoker.java b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvoker.java
index 5eeb802727..b63518d1c7 100644
--- a/branches/sca-equinox/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringInvoker.java
+++ b/branches/sca-equinox/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/provider/SpringInvoker.java
@@ -16,11 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.tuscany.sca.implementation.spring;
+package org.apache.tuscany.sca.implementation.spring.provider;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import org.apache.tuscany.sca.implementation.spring.SpringImplementation;
import org.apache.tuscany.sca.implementation.spring.xml.SpringBeanElement;
import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;