felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1776374 - in /felix/trunk/eventadmin/bridge.configuration: ./ src/main/java/org/apache/felix/eventadmin/bridge/configuration/ src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ src/main/resources/
Date Thu, 29 Dec 2016 06:37:52 GMT
Author: cziegeler
Date: Thu Dec 29 06:37:52 2016
New Revision: 1776374

URL: http://svn.apache.org/viewvc?rev=1776374&view=rev
Log:
Update cm event bridge project 

Added:
    felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/
    felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/Activator.java
      - copied, changed from r1776230, felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/Activator.java
    felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ConfigurationEventToEventAdminBridge.java
      - copied, changed from r1776230, felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/ConfigurationEventToEventAdminBridge.java
Removed:
    felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/Activator.java
    felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/ConfigurationEventToEventAdminBridge.java
    felix/trunk/eventadmin/bridge.configuration/src/main/resources/
Modified:
    felix/trunk/eventadmin/bridge.configuration/pom.xml

Modified: felix/trunk/eventadmin/bridge.configuration/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/bridge.configuration/pom.xml?rev=1776374&r1=1776373&r2=1776374&view=diff
==============================================================================
--- felix/trunk/eventadmin/bridge.configuration/pom.xml (original)
+++ felix/trunk/eventadmin/bridge.configuration/pom.xml Thu Dec 29 06:37:52 2016
@@ -17,48 +17,68 @@
  under the License.
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>felix-parent</artifactId>
-    <version>2.1</version>
-    <relativePath>../../pom/pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <packaging>bundle</packaging>
-  <name>Apache Felix EventAdmin Bridge Configuration</name>
-  <version>0.9.0-SNAPSHOT</version>
-  <artifactId>org.apache.felix.eventadmin.bridge.configuration</artifactId>
-  <description>
-	This bundle provides a bridge between Configuration and EventAdmin events.
-  </description>
-  <dependencies>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <version>5.0.0</version>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.enterprise</artifactId>
-      <version>5.0.0</version>
-    </dependency>
-  </dependencies>
-  <build>
-    <plugins>
-      <plugin>
+    <parent>
         <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.5.3</version>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Bundle-Activator>${pom.artifactId}.Activator</Bundle-Activator>
-            <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
-            <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
-            <Private-Package>${pom.artifactId}.*</Private-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+        <artifactId>felix-parent</artifactId>
+        <version>4</version>
+        <relativePath>../../pom/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.felix.eventadmin.bridge.configuration</artifactId>
+    <version>0.9.0-SNAPSHOT</version>
+    <name>Apache Felix EventAdmin Bridge Configuration</name>
+    <description>
+        This bundle provides a bridge between Configuration and EventAdmin events.
+    </description>
+    <packaging>bundle</packaging>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/eventadmin/bridge.configuration</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/eventadmin/bridge.configuration</developerConnection>
+        <url>http://svn.apache.org/repos/asf/felix/eventadmin/bridge.configuration</url>
+    </scm>
+
+    <properties>
+        <felix.java.version>6</felix.java.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>5.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.event</artifactId>
+            <version>1.3.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.service.cm</artifactId>
+            <version>1.5.0</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>3.2.0</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Activator>${project.artifactId}.impl.Activator</Bundle-Activator>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Vendor>The Apache Software Foundation</Bundle-Vendor>
+                        <Private-Package>${project.artifactId}.impl</Private-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>

Copied: felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/Activator.java
(from r1776230, felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/Activator.java)
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/Activator.java?p2=felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/Activator.java&p1=felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/Activator.java&r1=1776230&r2=1776374&rev=1776374&view=diff
==============================================================================
--- felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/Activator.java
(original)
+++ felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/Activator.java
Thu Dec 29 06:37:52 2016
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.eventadmin.bridge.configuration;
+package org.apache.felix.eventadmin.bridge.configuration.impl;
 
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;

Copied: felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ConfigurationEventToEventAdminBridge.java
(from r1776230, felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/ConfigurationEventToEventAdminBridge.java)
URL: http://svn.apache.org/viewvc/felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ConfigurationEventToEventAdminBridge.java?p2=felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ConfigurationEventToEventAdminBridge.java&p1=felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/ConfigurationEventToEventAdminBridge.java&r1=1776230&r2=1776374&rev=1776374&view=diff
==============================================================================
--- felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/ConfigurationEventToEventAdminBridge.java
(original)
+++ felix/trunk/eventadmin/bridge.configuration/src/main/java/org/apache/felix/eventadmin/bridge/configuration/impl/ConfigurationEventToEventAdminBridge.java
Thu Dec 29 06:37:52 2016
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.eventadmin.bridge.configuration;
+package org.apache.felix.eventadmin.bridge.configuration.impl;
 
 import java.util.Arrays;
 import java.util.Dictionary;
@@ -44,17 +44,18 @@ public class ConfigurationEventToEventAd
     {
         m_context = context;
 
-        m_context.registerService(ConfigurationListener.class.getName(), this,
+        m_context.registerService(ConfigurationListener.class, this,
             null);
     }
 
+    @Override
     public void configurationEvent(final ConfigurationEvent event)
     {
-        final ServiceReference ref = m_context.getServiceReference(EventAdmin.class.getName());
+        final ServiceReference<EventAdmin> ref = m_context.getServiceReference(EventAdmin.class);
 
         if (null != ref)
         {
-            final EventAdmin eventAdmin = (EventAdmin) m_context.getService(ref);
+            final EventAdmin eventAdmin = m_context.getService(ref);
 
             if (null != eventAdmin)
             {
@@ -77,7 +78,7 @@ public class ConfigurationEventToEventAd
                             return;
                     }
 
-                    final Hashtable properties = new Hashtable();
+                    final Dictionary<String, Object> properties = new Hashtable<String,
Object>();
 
                     if (null != event.getFactoryPid())
                     {
@@ -86,7 +87,7 @@ public class ConfigurationEventToEventAd
 
                     properties.put("cm.pid", event.getPid());
 
-                    final ServiceReference eventRef = event.getReference();
+                    final ServiceReference<ConfigurationAdmin> eventRef = event.getReference();
 
                     if (null == eventRef)
                     {
@@ -115,7 +116,7 @@ public class ConfigurationEventToEventAd
                     properties.put(EventConstants.SERVICE_PID, eventRef.getProperty(
                         EventConstants.SERVICE_PID));
 
-                    eventAdmin.postEvent(new Event(topic, (Dictionary)properties));
+                    eventAdmin.postEvent(new Event(topic, properties));
                 }
                 finally
                 {



Mime
View raw message