tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramku...@apache.org
Subject svn commit: r820238 [1/2] - in /tuscany/java/sca: itest/implementation-spring/src/main/resources/context/multiple/ itest/implementation-spring/src/main/resources/context/multiple/META-INF/ itest/implementation-spring/src/main/resources/context/multiple...
Date Wed, 30 Sep 2009 10:46:21 GMT
Author: ramkumar
Date: Wed Sep 30 10:46:20 2009
New Revision: 820238

URL: http://svn.apache.org/viewvc?rev=820238&view=rev
Log:
Fixes for TUSCANY-3287: Complaince with OASIS specs

Added:
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
  (with props)
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
  (with props)
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
  (with props)
    tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
  (with props)
Removed:
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/META-INF/
Modified:
    tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
    tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringBeanElement.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringConstructorArgElement.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationConstants.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringPropertyElement.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAReferenceElement.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAServiceElement.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/introspect/SpringXMLComponentTypeLoader.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/invocation/SpringContextStub.java
    tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/xml/SpringImplementationProcessor.java
    tuscany/java/sca/modules/implementation-spring/src/main/resources/impl-spring-validation-messages.properties

Modified: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
(original)
+++ tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/MultipleContext.composite
Wed Sep 30 10:46:20 2009
@@ -21,15 +21,10 @@
 	xmlns:sca="http://docs.oasis-open.org/ns/opencsa/sca/200903"
 	targetNamespace="http://stockquote"
 	xmlns:hw="http://stockquote"
-      name="MultipleContext">
-    
-    <service name="StockQuoteService" promote="StockQuoteServiceComponent">
-        <interface.java interface="bigbank.stockquote.StockQuoteService"/>
-        <binding.ws uri="http://localhost:8081/services/StockQuoteWebService"/>
-    </service>
+    name="MultipleContext">
 
     <component name="StockQuoteServiceComponent">
-        <implementation.spring location="META-INF/spring/beanRefContext.xml"/>
+        <implementation.spring location="springapp"/>
     </component>
 
 </composite>

Added: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF?rev=820238&view=auto
==============================================================================
--- tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
(added)
+++ tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/MANIFEST.MF
Wed Sep 30 10:46:20 2009
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Spring-Context: META-INF/spring/beanRefContext.xml; META-INF/spring/StockQuoteService-context.xml
+

Added: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml?rev=820238&view=auto
==============================================================================
--- tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
(added)
+++ tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
Wed Sep 30 10:46:20 2009
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<!-- Application context for the SpringHelloWorld testcase -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:sca="http://www.springframework.org/schema/sca"
+       xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+
+    <bean id="testBean" class="org.apache.tuscany.sca.itest.spring.TestHelloWorldBean"
lazy-init="true">
+    </bean>
+
+</beans>
\ No newline at end of file

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/SpringHelloWorld-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml?rev=820238&view=auto
==============================================================================
--- tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
(added)
+++ tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
Wed Sep 30 10:46:20 2009
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.    
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:sca="http://www.springframework.org/schema/sca"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+       
+    <sca:service name="StockQuoteService"
+        type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
+
+    <bean id="StockQuoteServiceBean" class="bigbank.stockquote.StockQuoteImpl">
+    </bean>
+    
+    <bean id="applicationContextProvider" class="context.access.SCAApplicationContextProvider">
+    </bean>
+
+</beans>
\ No newline at end of file

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/StockQuoteService-context.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
URL: http://svn.apache.org/viewvc/tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml?rev=820238&view=auto
==============================================================================
--- tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
(added)
+++ tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
Wed Sep 30 10:46:20 2009
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.    
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:sca="http://www.springframework.org/schema/sca"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
+       
+    <bean id="beanRefFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">
+	   <constructor-arg>
+		  <list>
+			 <value>context/multiple/META-INF/spring/SpringHelloWorld-context.xml</value>
+		  </list>
+	   </constructor-arg>
+    </bean>
+</beans>
\ No newline at end of file

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/itest/implementation-spring/src/main/resources/context/multiple/springapp/META-INF/spring/beanRefContext.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java?rev=820238&view=auto
==============================================================================
--- tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
(added)
+++ tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
Wed Sep 30 10:46:20 2009
@@ -0,0 +1,29 @@
+package org.apache.tuscany.sca.implementation.spring.runtime.context;
+
+import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
+import org.springframework.beans.factory.support.DefaultListableBeanFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.GenericApplicationContext;
+
+public class SCAGenericApplicationContext extends GenericApplicationContext {
+
+	 ClassLoader classloader = null;
+	 
+	 public SCAGenericApplicationContext(DefaultListableBeanFactory beanFactory, 
+             							 ApplicationContext parent,
+             							 ClassLoader classloader) {
+		 super(beanFactory, parent);
+		 this.classloader = classloader;
+	 }
+	 
+	 public SCAGenericApplicationContext(ApplicationContext parent,
+				 						 ClassLoader classloader) {
+		 super(parent);
+		 this.classloader = classloader;
+	 }
+
+	 @Override
+	 protected void postProcessBeanFactory (ConfigurableListableBeanFactory beanFactory) {
+		 beanFactory.setBeanClassLoader(classloader);
+	 }
+}

Propchange: tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SCAGenericApplicationContext.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
(original)
+++ tuscany/java/sca/modules/implementation-spring-sca/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
Wed Sep 30 10:46:20 2009
@@ -20,7 +20,6 @@
 package org.apache.tuscany.sca.implementation.spring.runtime.context;
 
 import java.net.URL;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.tuscany.sca.implementation.spring.processor.ComponentNameAnnotationProcessor;
@@ -31,16 +30,11 @@
 import org.apache.tuscany.sca.implementation.spring.processor.PropertyValueStub;
 import org.apache.tuscany.sca.implementation.spring.processor.ReferenceAnnotationProcessor;
 import org.springframework.beans.BeansException;
-import org.springframework.beans.factory.config.BeanDefinition;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
-import org.springframework.beans.factory.config.ConstructorArgumentValues;
-import org.springframework.beans.factory.config.TypedStringValue;
-import org.springframework.beans.factory.support.ManagedList;
 import org.springframework.beans.factory.xml.XmlBeanFactory;
+import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
 import org.springframework.context.support.AbstractApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-import org.springframework.context.support.FileSystemXmlApplicationContext;
 import org.springframework.context.support.GenericApplicationContext;
 import org.springframework.core.io.UrlResource;
 
@@ -55,7 +49,7 @@
     private AbstractApplicationContext springContext;
     private SpringImplementationStub implementation;
     
-    public SpringContextTie(SpringImplementationStub implementation, URL resource) {
+    public SpringContextTie(SpringImplementationStub implementation, List<URL> resource)
{
         this.implementation = implementation;
         SCAParentApplicationContext scaParentContext = new SCAParentApplicationContext(implementation);
         springContext = createApplicationContext(scaParentContext, resource);  
@@ -77,56 +71,30 @@
     /**
      * Include BeanPostProcessor to deal with SCA Annotations in Spring Bean
      */
-    private AbstractApplicationContext createApplicationContext(SCAParentApplicationContext
scaParentContext, URL resource) {
+    private AbstractApplicationContext createApplicationContext(SCAParentApplicationContext
scaParentContext, List<URL> resources) {
 
-        XmlBeanFactory beanFactory = new XmlBeanFactory(new UrlResource(resource));
-        beanFactory.setBeanClassLoader(implementation.getClassLoader());
-        AbstractApplicationContext appContext = null;
-        
-        for (String bean : beanFactory.getBeanDefinitionNames()) {
-	        String beanClassName = (beanFactory.getType(bean)).getName();
-	        if (beanClassName.indexOf(".ClassPathXmlApplicationContext") != -1 || 
-	                        beanClassName.indexOf(".FileSystemXmlApplicationContext") != -1)

-	        {
-                BeanDefinition beanDef = beanFactory.getBeanDefinition(bean);           
               
-                String[] configLocations = null;
-                List<ConstructorArgumentValues.ValueHolder> conArgs = 
-                        beanDef.getConstructorArgumentValues().getGenericArgumentValues();
-                for (ConstructorArgumentValues.ValueHolder conArg : conArgs) {
-                    if (conArg.getValue() instanceof TypedStringValue) {
-                        TypedStringValue value = (TypedStringValue) conArg.getValue();
-                        if (value.getValue().indexOf(".xml") != -1)
-                        	configLocations = new String[]{value.getValue()};
-                    }
-                    if (conArg.getValue() instanceof ManagedList) {
-                        Iterator itml = ((ManagedList)conArg.getValue()).iterator();
-                        StringBuffer values = new StringBuffer();
-                        while (itml.hasNext()) {
-                            TypedStringValue next = (TypedStringValue)itml.next();
-                            if (next.getValue().indexOf(".xml") != -1) {
-                            	values.append(implementation.getClassLoader().getResource(next.getValue()).toString());
-                                values.append("~");
-                            }
-                        }
-                        configLocations = (values.toString()).split("~");               
                    
-                    }
-                }
-                
-                if (beanClassName.indexOf(".ClassPathXmlApplicationContext") != -1) {   
                                                               
-                    appContext = new ClassPathXmlApplicationContext(configLocations, true,
scaParentContext);                    
-                    includeAnnotationProcessors(appContext.getBeanFactory());
-                    return appContext;
-                } else {
-                    appContext = new FileSystemXmlApplicationContext(configLocations, true,
scaParentContext);
-                    includeAnnotationProcessors(appContext.getBeanFactory());
-                    return appContext;
-                }
-	        }               
-        }
+    	XmlBeanFactory beanFactory = null;
+    	AbstractApplicationContext appContext = null;
+    	
+    	if (resources.size() > 1) {
+    		GenericApplicationContext appCtx = 
+    			new SCAGenericApplicationContext(scaParentContext, implementation.getClassLoader());
+    		XmlBeanDefinitionReader xmlReader = new XmlBeanDefinitionReader(appCtx);
+    		for (URL resource : resources) {
+    			xmlReader.loadBeanDefinitions(new UrlResource(resource));
+    		}
+    		xmlReader.setBeanClassLoader(implementation.getClassLoader());    		
+           	includeAnnotationProcessors(appCtx.getBeanFactory());
+    		return appCtx;    		
+    	} 
         
-        // use the generic application context as default 
+    	// use the generic application context as default
+    	beanFactory = new XmlBeanFactory(new UrlResource(resources.get(0)));
+        beanFactory.setBeanClassLoader(implementation.getClassLoader());
         includeAnnotationProcessors(beanFactory);
-        appContext = new GenericApplicationContext(beanFactory, scaParentContext);
+        appContext = new SCAGenericApplicationContext(beanFactory, 
+                                                      scaParentContext,
+                                                      implementation.getClassLoader());
         return appContext;
     }
 

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringBeanElement.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringBeanElement.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringBeanElement.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringBeanElement.java
Wed Sep 30 10:46:20 2009
@@ -31,11 +31,13 @@
 public class SpringBeanElement {
 
     private String id;
-    private String className;
+    private String className = null;
     private boolean innerBean = false;
     private boolean abstractBean = false;
-    private boolean refParentBean = false;
-    private boolean reffactoryBean = false;
+    private boolean parentAttribute = false;
+    private boolean factoryBeanAttribute = false;
+    private boolean factoryMethodAttribute = false;
+    
     private List<SpringPropertyElement> properties = new ArrayList<SpringPropertyElement>();
     private List<SpringConstructorArgElement> constructorargs = new ArrayList<SpringConstructorArgElement>();
 
@@ -51,6 +53,10 @@
     public String getId() {
         return id;
     }
+    
+    public void setId(String id) {
+        this.id = id;
+    }
 
     public List<SpringPropertyElement> getProperties() {
         return properties;
@@ -83,5 +89,29 @@
     public void setAbstractBean(boolean abstractBean) {
         this.abstractBean = abstractBean;
     }
+    
+    public boolean hasParentAttribute() {
+        return parentAttribute;
+    }
+    
+    public void setParentAttribute(boolean parentAttribute) {
+        this.parentAttribute = parentAttribute;
+    }
+    
+    public boolean hasFactoryBeanAttribute() {
+        return factoryBeanAttribute;
+    }
+    
+    public void setFactoryBeanAttribute(boolean factoryBeanAttribute) {
+        this.factoryBeanAttribute = factoryBeanAttribute;
+    }
+    
+    public boolean hasFactoryMethodAttribute() {
+        return factoryMethodAttribute;
+    }
+    
+    public void setFactoryMethodAttribute(boolean factoryMethodAttribute) {
+        this.factoryMethodAttribute = factoryMethodAttribute;
+    }
 
 } // end class SpringBeanElement

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringConstructorArgElement.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringConstructorArgElement.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringConstructorArgElement.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringConstructorArgElement.java
Wed Sep 30 10:46:20 2009
@@ -29,14 +29,13 @@
  */
 public class SpringConstructorArgElement {
     
-    private String ref;
-    private String type;
+	private String type;
     private int autoIndex = -1;
     private int index = -1;
+    private List<String> refs = new ArrayList<String>();
     private List<String> values = new ArrayList<String>();
 
-    public SpringConstructorArgElement(String ref, String type) {
-        this.ref = ref;
+    public SpringConstructorArgElement(String type) {
         this.type = type;
     }
     
@@ -44,12 +43,12 @@
         return this.type;
     }
     
-    public String getRef() {
-        return this.ref;
+    public List<String> getRefs() {
+        return this.refs;
     }
     
-    public void setRef(String ref) {
-        this.ref = ref;
+    public void addRef(String ref) {
+        this.refs.add(ref);
     }
     
     public int getIndex() {

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementation.java
Wed Sep 30 10:46:20 2009
@@ -46,7 +46,7 @@
     // The location attribute which points to the Spring application-context XML file
     private String location;
     // The application-context file as a Spring Resource
-    private URL resource;
+    private List<URL> resource;
     private ComponentType componentType;
     // Mapping of Services to Beans
     private Hashtable<String, SpringBeanElement> serviceMap;
@@ -80,11 +80,11 @@
         return;
     }
 
-    public void setResource(URL resource) {
+    public void setResource(List<URL> resource) {
         this.resource = resource;
     }
 
-    public URL getResource() {
+    public List<URL> getResource() {
         return resource;
     }
 

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationConstants.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationConstants.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationConstants.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringImplementationConstants.java
Wed Sep 30 10:46:20 2009
@@ -30,14 +30,14 @@
     String SPRING_NS = "http://www.springframework.org/schema/beans";
     
     String PROPERTY = "property";
-    QName SCAPROPERTY_ELEMENT = new QName(SCA_NS, PROPERTY);
+    QName SCA_PROPERTY_ELEMENT = new QName(SCA_NS, PROPERTY);
     QName PROPERTY_ELEMENT = new QName(SPRING_NS, PROPERTY);
     
-    String SERVICE = "service";
-    QName SERVICE_ELEMENT = new QName(SCA_NS, SERVICE);
+    String SCASERVICE = "service";
+    QName SCA_SERVICE_ELEMENT = new QName(SCA_NS, SCASERVICE);
     
-    String REFERENCE = "reference";
-    QName REFERENCE_ELEMENT = new QName(SCA_NS, REFERENCE);
+    String SCAREFERENCE = "reference";
+    QName SCA_REFERENCE_ELEMENT = new QName(SCA_NS, SCAREFERENCE);
     
     String BEANS = "beans";
     QName BEANS_ELEMENT = new QName(SPRING_NS, BEANS);
@@ -54,11 +54,20 @@
     String LIST = "list";
     QName LIST_ELEMENT = new QName(SPRING_NS, LIST); 
     
+    String SET = "set";
+    QName SET_ELEMENT = new QName(SPRING_NS, SET);
+    
+    String MAP = "map";
+    QName MAP_ELEMENT = new QName(SPRING_NS, MAP);
+    
     String VALUE = "value";
     QName VALUE_ELEMENT = new QName(SPRING_NS, VALUE);
     
     String REF = "ref";
     QName REF_ELEMENT = new QName(SPRING_NS, REF);
+    
+    String ENTRY = "entry";
+    QName ENTRY_ELEMENT = new QName(SPRING_NS, ENTRY);
 
     String APPLICATION_CONTEXT = "application-context.xml";
 }

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringPropertyElement.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringPropertyElement.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringPropertyElement.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringPropertyElement.java
Wed Sep 30 10:46:20 2009
@@ -30,24 +30,23 @@
 public class SpringPropertyElement {
 
     private String name;
-    private String ref;
+    private List<String> refs = new ArrayList<String>();
     private List<String> values = new ArrayList<String>();
 
-    public SpringPropertyElement(String name, String ref) {
+    public SpringPropertyElement(String name) {
         this.name = name;
-        this.ref = ref;
     }
 
     public String getName() {
         return name;
     }
 
-    public String getRef() {
-        return ref;
+    public List<String> getRefs() {
+        return this.refs;
     }
     
-    public void setRef(String ref) {
-        this.ref = ref;
+    public void addRef(String ref) {
+        this.refs.add(ref);
     }
     
     public List<String> getValues() {
@@ -57,5 +56,5 @@
     public void addValue(String value) {
         this.values.add(value);
     }
-
+    
 } // end class SpringPropertyElement

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAReferenceElement.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAReferenceElement.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAReferenceElement.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAReferenceElement.java
Wed Sep 30 10:46:20 2009
@@ -29,6 +29,9 @@
 
     private String name;
     private String type;
+    private String defaultBean;
+    private String requiredIntents;
+    private String policySets;
 
     public SpringSCAReferenceElement(String name, String type) {
         this.name = name;
@@ -50,5 +53,29 @@
     public String getType() {
         return type;
     }
+    
+    public void setDefaultBean(String defaultBean) {
+        this.defaultBean = defaultBean;
+    }
+
+    public String getDefaultBean() {
+        return defaultBean;
+    }
+    
+    public void setRequiredIntents(String requiredIntents) {    	
+    	this.requiredIntents = requiredIntents;
+    }
+    
+    public String getRequiredIntents() {   	
+    	return requiredIntents;
+    }
+    
+    public void setPolicySets(String policySets) {    	
+    	this.policySets = policySets;
+    }
+    
+    public String getPolicySets() {   	
+    	return policySets;
+    }
 
 } // end class SpringSCAReferenceElement

Modified: tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAServiceElement.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAServiceElement.java?rev=820238&r1=820237&r2=820238&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAServiceElement.java
(original)
+++ tuscany/java/sca/modules/implementation-spring/src/main/java/org/apache/tuscany/sca/implementation/spring/SpringSCAServiceElement.java
Wed Sep 30 10:46:20 2009
@@ -30,10 +30,11 @@
     private String name;
     private String type;
     private String target;
+    private String requiredIntents;
+    private String policySets;
 
-    public SpringSCAServiceElement(String name, String type, String target) {
+    public SpringSCAServiceElement(String name, String target) {
         this.name = name;
-        this.type = type;
         this.target = target;
     }
     
@@ -60,5 +61,21 @@
     public String getTarget() {
         return target;
     }
+    
+    public void setRequiredIntents(String requiredIntents) {    	
+    	this.requiredIntents = requiredIntents;
+    }
+    
+    public String getRequiredIntents() {   	
+    	return requiredIntents;
+    }
+    
+    public void setPolicySets(String policySets) {    	
+    	this.policySets = policySets;
+    }
+    
+    public String getPolicySets() {   	
+    	return policySets;
+    }
 
 } // end class SpringSCAServiceElement



Mime
View raw message