Fixed binding-parent groupId. It was causing build failure
[ovsdb.git] / ovsdb-plugin-compatibility-layer / src / main / java / org / opendaylight / ovsdb / compatibility / plugin / internal / Activator.java
index 68df6cb08ef8c068d49dc94c2eaa5f1226a94bfc..bec2632a8d3054abf55d18e0ae4f7d3d53f5ae17 100644 (file)
@@ -12,6 +12,7 @@ import java.util.Hashtable;
 
 import org.apache.felix.dm.Component;
 import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase;
+import org.opendaylight.controller.sal.core.Node;
 import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConfigurationService;
 import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbConnectionService;
 import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbInventoryListener;
@@ -19,8 +20,6 @@ import org.opendaylight.ovsdb.compatibility.plugin.api.OvsdbInventoryService;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.ConfigurationServiceImpl;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.ConnectionServiceImpl;
 import org.opendaylight.ovsdb.compatibility.plugin.impl.InventoryServiceImpl;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * Activator for ovsdb plugin compatibility layer
@@ -28,8 +27,6 @@ import org.slf4j.LoggerFactory;
  *
  */
 public class Activator extends ComponentActivatorAbstractBase {
-    protected static final Logger logger = LoggerFactory
-            .getLogger(Activator.class);
 
     /**
      * Function called when the activator starts just after some initializations
@@ -39,6 +36,7 @@ public class Activator extends ComponentActivatorAbstractBase {
      */
     @Override
     public void init() {
+        Node.NodeIDType.registerIDType("OVS", String.class);
     }
 
     /**
@@ -48,18 +46,18 @@ public class Activator extends ComponentActivatorAbstractBase {
      */
     @Override
     public void destroy() {
+        Node.NodeIDType.unRegisterIDType("OVS");
     }
     @Override
     public Object[] getGlobalImplementations() {
-        Object[] res = { ConnectionServiceImpl.class, ConfigurationServiceImpl.class, InventoryServiceImpl.class };
-        return res;
+        return new Object[]{ ConnectionServiceImpl.class, ConfigurationServiceImpl.class, InventoryServiceImpl.class };
     }
 
     @Override
     public void configureGlobalInstance(Component c, Object imp){
         if (imp.equals(ConfigurationServiceImpl.class)) {
             // export the service to be used by SAL
-            Dictionary<String, Object> props = new Hashtable<String, Object>();
+            Dictionary<String, Object> props = new Hashtable<>();
             c.setInterface(new String[] { OvsdbConfigurationService.class.getName()}, props);
             c.add(createServiceDependency()
                     .setService(org.opendaylight.ovsdb.plugin.api.OvsdbConfigurationService.class)
@@ -69,7 +67,7 @@ public class Activator extends ComponentActivatorAbstractBase {
 
         if (imp.equals(ConnectionServiceImpl.class)) {
             // export the service to be used by SAL
-            Dictionary<String, Object> props = new Hashtable<String, Object>();
+            Dictionary<String, Object> props = new Hashtable<>();
             c.setInterface(
                     new String[] {OvsdbConnectionService.class.getName()}, props);
             c.add(createServiceDependency()