felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1466444 - in /felix/trunk/ipojo: manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/ runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/
Date Wed, 10 Apr 2013 12:33:01 GMT
Author: clement
Date: Wed Apr 10 12:33:01 2013
New Revision: 1466444

URL: http://svn.apache.org/r1466444
Log:
Fix FELIX-3995

Add the proxy attribute in the @Bind and @Unbind annotations

Modified:
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
    felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Bind.java
    felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Unbind.java

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java?rev=1466444&r1=1466443&r2=1466444&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
(original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
Wed Apr 10 12:33:01 2013
@@ -73,6 +73,11 @@ public abstract class AbstractBindVisito
     protected String m_from;
 
     /**
+     * proxy attribute.
+     */
+    protected String m_proxy;
+
+    /**
      * Visit annotation's attributes.
      *
      * @param name : annotation name
@@ -112,6 +117,9 @@ public abstract class AbstractBindVisito
         if (name.equals("from")) {
             m_from = value.toString();
         }
+        if (name.equals("proxy")) {
+            m_proxy = value.toString();
+        }
 
     }
 
@@ -156,6 +164,9 @@ public abstract class AbstractBindVisito
         if (!completeAttribute(requires, "from", m_from))
             return false;
 
+        if(!completeAttribute(requires, "proxy", m_proxy))
+            return false;
+
         return true;
     }
 
@@ -203,6 +214,9 @@ public abstract class AbstractBindVisito
         if (m_from != null) {
             requires.addAttribute(new Attribute("from", m_from));
         }
+        if (m_proxy != null) {
+            requires.addAttribute(new Attribute("proxy", m_proxy));
+        }
         return requires;
     }
 

Modified: felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Bind.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Bind.java?rev=1466444&r1=1466443&r2=1466444&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Bind.java
(original)
+++ felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Bind.java
Wed Apr 10 12:33:01 2013
@@ -77,4 +77,11 @@ public @interface Bind {
      */
     String from() default "";
 
+    /**
+     * Set to true if the service dependency is injected
+     * as a proxy.
+     * Default: true
+     */
+    boolean proxy() default true;
+
 }

Modified: felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Unbind.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Unbind.java?rev=1466444&r1=1466443&r2=1466444&view=diff
==============================================================================
--- felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Unbind.java
(original)
+++ felix/trunk/ipojo/runtime/annotations/src/main/java/org/apache/felix/ipojo/annotations/Unbind.java
Wed Apr 10 12:33:01 2013
@@ -77,5 +77,12 @@ public @interface Unbind {
      * Set the from attribute.
      */
     String from() default "";
+
+    /**
+     * Set to true if the service dependency is injected
+     * as a proxy.
+     * Default: true
+     */
+    boolean proxy() default true;
     
 }



Mime
View raw message