felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r1002041 - in /felix/trunk/ipojo: annotations/src/main/java/org/apache/felix/ipojo/handlers/event/ handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/ handler/eventadmin/src/main/java/org/apache/felix/ipojo/han...
Date Tue, 28 Sep 2010 07:19:05 GMT
Author: clement
Date: Tue Sep 28 07:19:04 2010
New Revision: 1002041

URL: http://svn.apache.org/viewvc?rev=1002041&view=rev
Log:
Fix FELIX-2631 Rename @Publisher and @Subscriber attributes to follow the java naming conventions

Added:
    felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSubDeprecated.java
      - copied, changed from r999267, felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java
Modified:
    felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Publisher.java
    felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Subscriber.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
    felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
    felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/EventAdmin.java
    felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java

Modified: felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Publisher.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Publisher.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Publisher.java
(original)
+++ felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Publisher.java
Tue Sep 28 07:19:04 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -24,18 +24,18 @@ import java.lang.annotation.Target;
 
 /**
  * Event Admin Publisher handler.
- * Be aware that despite is it provided in the annotations jar, 
+ * Be aware that despite is it provided in the annotations jar,
  * it refers to an external handler.
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 @Target(ElementType.FIELD)
 public @interface Publisher {
-    
+
     /**
      * Sets the publisher name.
      */
     String name();
-    
+
     /**
      * Sets topics on which event are sent.
      * The topics are separated by a ',' such as in
@@ -43,18 +43,26 @@ public @interface Publisher {
      * Default : no topics (configured in the instance configuration)
      */
     String topics() default "";
-    
+
     /**
      * Enables/Disables synchronous sending.
-     * Default : false (asynchronous) 
+     * Default : false (asynchronous)
      */
     boolean synchronous() default false;
-    
+
     /**
      * Sets the data key in which the data is
      * put.
      * Default : user.data
+     * @deprecated replaced by dataKey
      */
     String data_key() default "user.data";
 
+    /**
+     * Sets the data key in which the data is
+     * put.
+     * Default : user.data
+     */
+    String dataKey() default "user.data";
+
 }

Modified: felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Subscriber.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Subscriber.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Subscriber.java
(original)
+++ felix/trunk/ipojo/annotations/src/main/java/org/apache/felix/ipojo/handlers/event/Subscriber.java
Tue Sep 28 07:19:04 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -24,18 +24,18 @@ import java.lang.annotation.Target;
 
 /**
  * Event Admin Subscriber handler.
- * Be aware that despite is it provided in the annotations jar, 
+ * Be aware that despite is it provided in the annotations jar,
  * it refers to an external handler.
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 @Target(ElementType.METHOD)
 public @interface Subscriber {
-    
+
     /**
      * Sets the subscriber name.
      */
     String name();
-    
+
     /**
      * Sets topics on which event are received.
      * The topics are separated by a ',' such as in
@@ -43,23 +43,38 @@ public @interface Subscriber {
      * Default : no topics (configured in the instance configuration)
      */
     String topics() default "";
-    
+
     /**
      * Sets the data key in which the data is
      * stored.
      * Default : no key
+     * @deprecated replaced by dataKey
      */
     String data_key() default "";
-    
+
     /**
      * Sets the data type (type of the received data).
      * Default : no type.
+     * @deprecated replaced by dataType
      */
     String data_type() default "";
-    
-    
+
+    /**
+     * Sets the data key in which the data is
+     * stored.
+     * Default : no key
+     */
+    String dataKey() default "";
+
+    /**
+     * Sets the data type (type of the received data).
+     * Default : no type.
+     */
+    String dataType() default "";
+
+
     /**
-     * Sets the event filter. Only event matching with the 
+     * Sets the event filter. Only event matching with the
      * specified LDAP filter are received.
      * default : no filter;
      */

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
(original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/publisher/EventAdminPublisherMetadata.java
Tue Sep 28 07:19:04 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -25,7 +25,7 @@ import org.apache.felix.ipojo.parser.Par
 
 /**
  * Represent a publisher.
- * 
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 class EventAdminPublisherMetadata {
@@ -96,7 +96,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Constructs a publisher from its metadata description.
-     * 
+     *
      * @param publisher the publisher metadata description.
      * @throws ConfigurationException if the configuration of the component or
      *             the instance is invalid.
@@ -151,7 +151,11 @@ class EventAdminPublisherMetadata {
         if (publisher.containsAttribute(DATA_KEY_ATTRIBUTE)) {
             m_dataKey = publisher.getAttribute(DATA_KEY_ATTRIBUTE);
         } else if (publisher.containsAttribute("data_key")) {
+        	// XML Case
             m_dataKey = publisher.getAttribute("data_key");
+        } else if (publisher.containsAttribute("dataKey")) {
+        	// Annotation case.
+        	m_dataKey = publisher.getAttribute("dataKey");
         } else {
             m_dataKey = DEFAULT_DATA_KEY_VALUE;
         }
@@ -159,7 +163,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Sets the topics attribute of the publisher.
-     * 
+     *
      * @param topicsString the comma separated list of the topics on which
      *            events are sent
      * @throws ConfigurationException the specified topic string is malformed
@@ -180,7 +184,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Checks that the required instance configurable attributes are all set.
-     * 
+     *
      * @throws ConfigurationException if a required attribute is missing
      */
     public void check() throws ConfigurationException {
@@ -193,7 +197,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Gets the name attribute of the publisher.
-     * 
+     *
      * @return the name
      */
     public String getName() {
@@ -202,7 +206,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Gets the field attribute of the publisher.
-     * 
+     *
      * @return the field
      */
     public String getField() {
@@ -211,7 +215,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Gets the topics attribute of the publisher.
-     * 
+     *
      * @return the topics
      */
     public String[] getTopics() {
@@ -220,7 +224,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Gets the synchronous attribute of the publisher.
-     * 
+     *
      * @return the synchronous mode
      */
     public boolean isSynchronous() {
@@ -229,7 +233,7 @@ class EventAdminPublisherMetadata {
 
     /**
      * Gets the dataKey attribute of the publisher.
-     * 
+     *
      * @return the data key
      */
     public String getDataKey() {

Modified: felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
(original)
+++ felix/trunk/ipojo/handler/eventadmin/src/main/java/org/apache/felix/ipojo/handlers/event/subscriber/EventAdminSubscriberMetadata.java
Tue Sep 28 07:19:04 2010
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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
@@ -28,7 +28,7 @@ import org.osgi.framework.InvalidSyntaxE
 
 /**
  * Represent an subscriber.
- * 
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 class EventAdminSubscriberMetadata {
@@ -109,7 +109,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Constructor.
-     * 
+     *
      * @param bundleContext the bundle context of the managed instance.
      * @param subscriber the subscriber metadata.
      * @throws ConfigurationException if the configuration of the component or
@@ -158,15 +158,25 @@ class EventAdminSubscriberMetadata {
 
         // DATA_KEY_ATTRIBUTE
         m_dataKey = subscriber.getAttribute(DATA_KEY_ATTRIBUTE);
-        if (m_dataKey == null) { // Alternative configuration
+        if (m_dataKey == null) { // Alternative configurations (data_key and dataKey)
+        	// XML
             m_dataKey = subscriber.getAttribute("data_key");
+            if (m_dataKey == null) {
+            	// Annotation
+            	m_dataKey = subscriber.getAttribute("dataKey");
+            }
         }
-        
+
         String t = subscriber.getAttribute(DATA_TYPE_ATTRIBUTE);
-        if (t == null) { // Alternative configuration
+        if (t == null) { // Alternative configurations
+        	// XML
             t = subscriber.getAttribute("data_type");
+            if (t == null) {
+            	/// Annotation
+            	t = subscriber.getAttribute("dataType");
+            }
         }
-        
+
         if (t != null) {
             // Check that the data-key attribute is set.
             if (m_dataKey == null) {
@@ -194,7 +204,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Sets the topics attribute of the subscriber.
-     * 
+     *
      * @param topicsString the comma separated list of the topics to listen
      * @throws ConfigurationException if the specified topic list is malformed
      */
@@ -214,7 +224,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Sets the filter attribute of the subscriber.
-     * 
+     *
      * @param filterString the string representation of the event filter
      * @throws ConfigurationException if the LDAP filter is malformed
      */
@@ -228,7 +238,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Checks that the required instance configurable attributes are all set.
-     * 
+     *
      * @throws ConfigurationException if a required attribute is missing
      */
     public void check() throws ConfigurationException {
@@ -241,7 +251,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the name attribute of the subscriber.
-     * 
+     *
      * @return the name
      */
     public String getName() {
@@ -250,7 +260,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the topics attribute of the subscriber.
-     * 
+     *
      * @return the topics
      */
     public String[] getTopics() {
@@ -259,7 +269,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the callback attribute of the subscriber.
-     * 
+     *
      * @return the callback
      */
     public String getCallback() {
@@ -268,7 +278,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the data key attribute of the subscriber.
-     * 
+     *
      * @return the dataKey
      */
     public String getDataKey() {
@@ -277,7 +287,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the data type attribute of the subscriber.
-     * 
+     *
      * @return the dataType
      */
     public Class getDataType() {
@@ -286,7 +296,7 @@ class EventAdminSubscriberMetadata {
 
     /**
      * Gets the filter attribute of the subscriber.
-     * 
+     *
      * @return the filter
      */
     public Filter getFilter() {

Modified: felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/EventAdmin.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/EventAdmin.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/EventAdmin.java
(original)
+++ felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/annotations/EventAdmin.java
Tue Sep 28 07:19:04 2010
@@ -6,21 +6,27 @@ import org.apache.felix.ipojo.metadata.E
 
 public class EventAdmin extends OSGiTestCase {
     String type = "org.apache.felix.ipojo.test.scenarios.component.event.PubSub";
+    String deprecated = "org.apache.felix.ipojo.test.scenarios.component.event.PubSubDeprecated";
+
     String namespace = "org.apache.felix.ipojo.handlers.event";
-    
+
     Element component;
+    Element componentDeprecated;
     private IPOJOHelper helper;
-    
+
     public void setUp() {
         helper = new IPOJOHelper(this);
         component = helper.getMetadata(type);
+        componentDeprecated = helper.getMetadata(deprecated);
         assertNotNull("Check component", component);
     }
-    
+
     public void tearDown() {
         component = null;
+        componentDeprecated = null;
+
     }
-    
+
     public void testP1() {
         //P1, synchronous
         Element elem = getElementByName("p1");
@@ -28,9 +34,19 @@ public class EventAdmin extends OSGiTest
         assertNull("Check topics", elem.getAttribute("topics"));
         assertEquals("Check synchronous", "true", elem.getAttribute("synchronous"));
         assertEquals("Check field", "publisher1", elem.getAttribute("field"));
-        assertNull("Check data_key", elem.getAttribute("data_key"));  
+        assertNull("Check data_key", elem.getAttribute("dataKey"));
     }
-    
+
+    public void testP1Deprecated() {
+        //P1, synchronous
+        Element elem = getDeprecatedElementByName("p1");
+        checkPublisher(elem);
+        assertNull("Check topics", elem.getAttribute("topics"));
+        assertEquals("Check synchronous", "true", elem.getAttribute("synchronous"));
+        assertEquals("Check field", "publisher1", elem.getAttribute("field"));
+        assertNull("Check data_key", elem.getAttribute("data_key"));
+    }
+
     public void testP2() {
         //name="p2", synchronous=false, topics="foo,bar", data_key="data"
         Element elem = getElementByName("p2");
@@ -38,9 +54,19 @@ public class EventAdmin extends OSGiTest
         assertEquals("Check topics (" + elem.getAttribute("topics")+")", "foo,bar", elem.getAttribute("topics"));
         assertEquals("Check synchronous", "false", elem.getAttribute("synchronous"));
         assertEquals("Check field", "publisher2", elem.getAttribute("field"));
-        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));  
+        assertEquals("Check data_key", "data" ,elem.getAttribute("dataKey"));
     }
-    
+
+    public void testP2Deprecated() {
+        //name="p2", synchronous=false, topics="foo,bar", data_key="data"
+        Element elem = getDeprecatedElementByName("p2");
+        checkPublisher(elem);
+        assertEquals("Check topics (" + elem.getAttribute("topics")+")", "foo,bar", elem.getAttribute("topics"));
+        assertEquals("Check synchronous", "false", elem.getAttribute("synchronous"));
+        assertEquals("Check field", "publisher2", elem.getAttribute("field"));
+        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));
+    }
+
     public void testP3() {
         //name="p3", synchronous=true, topics="bar"
         Element elem = getElementByName("p3");
@@ -48,44 +74,87 @@ public class EventAdmin extends OSGiTest
         assertEquals("Check topics", "bar" ,elem.getAttribute("topics"));
         assertEquals("Check synchronous", "true", elem.getAttribute("synchronous"));
         assertEquals("Check field", "publisher3", elem.getAttribute("field"));
-        assertNull("Check data_key", elem.getAttribute("data_key"));  
+        assertNull("Check data_key", elem.getAttribute("dataKey"));
+    }
+
+    public void testP3Deprecated() {
+        //name="p3", synchronous=true, topics="bar"
+        Element elem = getDeprecatedElementByName("p3");
+        checkPublisher(elem);
+        assertEquals("Check topics", "bar" ,elem.getAttribute("topics"));
+        assertEquals("Check synchronous", "true", elem.getAttribute("synchronous"));
+        assertEquals("Check field", "publisher3", elem.getAttribute("field"));
+        assertNull("Check data_key", elem.getAttribute("data_key"));
     }
-    
+
     public void testS1() {
         //name="s1", data_key="data"
         Element elem = getElementByName("s1");
         checkSubscriber(elem);
         assertNull("Check topics",elem.getAttribute("topics"));
         assertEquals("Check method", "receive1", elem.getAttribute("method"));
-        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));  
+        assertEquals("Check data_key", "data" ,elem.getAttribute("dataKey"));
+        assertNull("Check data_type", elem.getAttribute("dataType"));
+        assertNull("Check filter", elem.getAttribute("filter"));
+    }
+
+    public void testS1Deprecated() {
+        //name="s1", data_key="data"
+        Element elem = getDeprecatedElementByName("s1");
+        checkSubscriber(elem);
+        assertNull("Check topics",elem.getAttribute("topics"));
+        assertEquals("Check method", "receive1", elem.getAttribute("method"));
+        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));
         assertNull("Check data_type", elem.getAttribute("data_type"));
         assertNull("Check filter", elem.getAttribute("filter"));
     }
-    
+
     public void testS2() {
         //name="s2", topics="foo,bar", filter="(foo=true)"
         Element elem = getElementByName("s2");
         checkSubscriber(elem);
         assertEquals("Check topics", "foo,bar", elem.getAttribute("topics"));
         assertEquals("Check method", "receive2", elem.getAttribute("method"));
-        assertNull("Check data_key" ,elem.getAttribute("data_key"));  
+        assertNull("Check data_key" ,elem.getAttribute("dataKey"));
+        assertNull("Check data_type", elem.getAttribute("dataType"));
+        assertEquals("Check filter","(foo=true)" , elem.getAttribute("filter"));
+    }
+
+    public void testS2Deprecated() {
+        //name="s2", topics="foo,bar", filter="(foo=true)"
+        Element elem = getDeprecatedElementByName("s2");
+        checkSubscriber(elem);
+        assertEquals("Check topics", "foo,bar", elem.getAttribute("topics"));
+        assertEquals("Check method", "receive2", elem.getAttribute("method"));
+        assertNull("Check data_key" ,elem.getAttribute("data_key"));
         assertNull("Check data_type", elem.getAttribute("data_type"));
         assertEquals("Check filter","(foo=true)" , elem.getAttribute("filter"));
     }
-    
+
     public void testS3() {
         //name="s3", topics="foo", data_key="data", data_type="java.lang.String"
         Element elem = getElementByName("s3");
         checkSubscriber(elem);
         assertEquals("Check topics", "foo", elem.getAttribute("topics"));
         assertEquals("Check method", "receive3", elem.getAttribute("method"));
-        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));  
+        assertEquals("Check data_key", "data" ,elem.getAttribute("dataKey"));
+        assertEquals("Check data_type", "java.lang.String", elem.getAttribute("dataType"));
+        assertNull("Check filter", elem.getAttribute("filter"));
+    }
+
+    public void testS3Deprecated() {
+        //name="s3", topics="foo", data_key="data", data_type="java.lang.String"
+        Element elem = getDeprecatedElementByName("s3");
+        checkSubscriber(elem);
+        assertEquals("Check topics", "foo", elem.getAttribute("topics"));
+        assertEquals("Check method", "receive3", elem.getAttribute("method"));
+        assertEquals("Check data_key", "data" ,elem.getAttribute("data_key"));
         assertEquals("Check data_type", "java.lang.String", elem.getAttribute("data_type"));
         assertNull("Check filter", elem.getAttribute("filter"));
     }
-    
-   
-    
+
+
+
     public Element getElementByName(String name) {
         Element [] elems = component.getElements();
         for (int i = 0; i < elems.length; i++) {
@@ -95,7 +164,17 @@ public class EventAdmin extends OSGiTest
         }
         return null;
     }
-    
+
+    public Element getDeprecatedElementByName(String name) {
+        Element [] elems = componentDeprecated.getElements();
+        for (int i = 0; i < elems.length; i++) {
+            if (elems[i].containsAttribute("name") && elems[i].getAttribute("name").equals(name))
{
+                return elems[i];
+            }
+        }
+        return null;
+    }
+
     public void checkSubscriber(Element elem) {
         assertNotNull("Can't check subscriber : null element",elem);
         String ns = elem.getNameSpace();
@@ -104,7 +183,7 @@ public class EventAdmin extends OSGiTest
         assertEquals("Elem is not a subscriber : bad name", "subscriber", nm);
 
     }
-    
+
     public void checkPublisher(Element elem) {
         assertNotNull("Can't check publisher : null element",elem);
         String ns = elem.getNameSpace();

Modified: felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java?rev=1002041&r1=1002040&r2=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java
(original)
+++ felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java
Tue Sep 28 07:19:04 2010
@@ -9,29 +9,29 @@ import org.osgi.service.event.Event;
 public class PubSub {
     @org.apache.felix.ipojo.handlers.event.Publisher(name="p1", synchronous=true)
     org.apache.felix.ipojo.handlers.event.publisher.Publisher publisher1;
-    
-    @org.apache.felix.ipojo.handlers.event.Publisher(name="p2", synchronous=false, topics="foo,bar",
data_key="data")
+
+    @org.apache.felix.ipojo.handlers.event.Publisher(name="p2", synchronous=false, topics="foo,bar",
dataKey="data")
     org.apache.felix.ipojo.handlers.event.publisher.Publisher publisher2;
-    
+
     @org.apache.felix.ipojo.handlers.event.Publisher(name="p3", synchronous=true, topics="bar")
     org.apache.felix.ipojo.handlers.event.publisher.Publisher publisher3;
-    
-    @Subscriber(name="s1", data_key="data")
+
+    @Subscriber(name="s1", dataKey="data")
     public void receive1(Object foo) {
         // Nothing
     }
-    
+
     @Subscriber(name="s2", topics="foo,bar", filter="(foo=true)")
     public void receive2(Event foo) {
         // Nothing
     }
-    
-    
-    @Subscriber(name="s3", topics="foo", data_key="data", data_type="java.lang.String")
+
+
+    @Subscriber(name="s3", topics="foo", dataKey="data", dataType="java.lang.String")
     public void receive3(String foo) {
         // Nothing
     }
-    
-    
-    
+
+
+
 }

Copied: felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSubDeprecated.java
(from r999267, felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java)
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSubDeprecated.java?p2=felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSubDeprecated.java&p1=felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java&r1=999267&r2=1002041&rev=1002041&view=diff
==============================================================================
--- felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSub.java
(original)
+++ felix/trunk/ipojo/tests/core/annotations/src/main/java/org/apache/felix/ipojo/test/scenarios/component/event/PubSubDeprecated.java
Tue Sep 28 07:19:04 2010
@@ -6,7 +6,7 @@ import org.osgi.service.event.Event;
 
 
 @Component
-public class PubSub {
+public class PubSubDeprecated {
     @org.apache.felix.ipojo.handlers.event.Publisher(name="p1", synchronous=true)
     org.apache.felix.ipojo.handlers.event.publisher.Publisher publisher1;
     



Mime
View raw message