Author: antelder
Date: Fri May  1 14:47:04 2009
New Revision: 770699

URL: http://svn.apache.org/viewvc?rev=770699&view=rev
Log:
Start bringing up the spring annotation support

Modified:
    
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
    
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java

Modified: 
tuscany/java/sca/modules/implementation-spring-runtime/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-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java?rev=770699&r1=770698&r2=770699&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
 (original)
+++ 
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringContextTie.java
 Fri May  1 14:47:04 2009
@@ -146,15 +146,15 @@
         BeanPostProcessor initDestroyProcessor = new 
InitDestroyAnnotationProcessor();
         beanFactory.addBeanPostProcessor(initDestroyProcessor);
 
-        ComponentStub component = null; //TODO
         // Processor to deal with @Reference SCA Annotations
-//        BeanPostProcessor referenceProcessor = new 
ReferenceAnnotationProcessor(component);
-//        beanFactory.addBeanPostProcessor(referenceProcessor);
+        ComponentStub component = new 
ComponentStub(implementation.getComponentStub());
+        BeanPostProcessor referenceProcessor = new 
ReferenceAnnotationProcessor(component);
+        beanFactory.addBeanPostProcessor(referenceProcessor);
         
-        PropertyValueStub pvs = null; //TODO
         // Processor to deal with @Property SCA Annotations
-//        BeanPostProcessor propertyProcessor = new 
PropertyAnnotationProcessor(pvs);
-//        beanFactory.addBeanPostProcessor(propertyProcessor);
+        PropertyValueStub pvs = new 
PropertyValueStub(implementation.getPropertyValueStub());
+        BeanPostProcessor propertyProcessor = new 
PropertyAnnotationProcessor(pvs);
+        beanFactory.addBeanPostProcessor(propertyProcessor);
         
         // Processor to deal with @ComponentName SCA Annotations
         BeanPostProcessor componentNameProcessor = new 
ComponentNameAnnotationProcessor(implementation.getComponentName());

Modified: 
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
URL: 
http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java?rev=770699&r1=770698&r2=770699&view=diff
==============================================================================
--- 
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
 (original)
+++ 
tuscany/java/sca/modules/implementation-spring-runtime/src/main/java/org/apache/tuscany/sca/implementation/spring/runtime/context/SpringImplementationStub.java
 Fri May  1 14:47:04 2009
@@ -37,6 +37,8 @@
     Method getURI;
     Method getBean;
     Method getComponentName;
+    Method getComponentStub;
+    Method getPropertyValueStub;
     
     public SpringImplementationStub(Object tie) {
         this.tie = tie;
@@ -45,6 +47,8 @@
             getURI = tieClass.getMethod("getURI", new Class<?>[]{});
             getBean = tieClass.getMethod("getBean", new 
Class<?>[]{String.class, Class.class});
             getComponentName = tieClass.getMethod("getComponentName");
+            getComponentStub = tieClass.getMethod("getComponentStub");
+            getPropertyValueStub = tieClass.getMethod("getPropertyValueStub");
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
@@ -89,6 +93,25 @@
         } catch (Exception e) {
             throw new RuntimeException(e);
         }
+    }
+
+    public Object getComponentStub() {
+        try {
+
+            return (String)getComponentStub.invoke(tie);
 
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public Object getPropertyValueStub() {
+        try {
+
+            return (String)getPropertyValueStub.invoke(tie);
+
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
     }
 }


Reply via email to