added implementation of Identifier and Identifiable from yangtools.concepts 02/2102/4
authorMartin Bobak <mbobak@cisco.com>
Wed, 23 Oct 2013 13:14:46 +0000 (15:14 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Thu, 24 Oct 2013 16:52:31 +0000 (16:52 +0000)
Change-Id: I33a106e3c7b7db8ea74921409b931c3eea06a548
Signed-off-by: Martin Bobak <mbobak@cisco.com>
32 files changed:
opendaylight/commons/opendaylight/pom.xml
opendaylight/config/config-api/.gitignore
opendaylight/config/config-api/pom.xml
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/api/ModuleIdentifier.java
opendaylight/config/config-api/src/main/java/org/opendaylight/controller/config/spi/Module.java
opendaylight/config/config-manager/pom.xml
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigRegistryImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ConfigTransactionControllerImpl.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/DestroyedModule.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ModuleInternalInfo.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/ModuleInternalTransactionalInfo.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/TransactionIdentifier.java
opendaylight/config/config-manager/src/main/java/org/opendaylight/controller/config/manager/impl/dependencyresolver/DependencyResolverImpl.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/AbstractMockedModule.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/impl/util/InterfacesHelperTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/TestingParallelAPSPModule.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/parallelapsp/test/MockedDependenciesTest.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/scheduledthreadpool/TestingScheduledThreadPoolModule.java
opendaylight/config/config-manager/src/test/java/org/opendaylight/controller/config/manager/testingservices/threadpool/TestingFixedThreadPoolModule.java
opendaylight/config/logback-config/src/main/java/org/opendaylight/controller/config/yang/logback/config/LogbackModule.java
opendaylight/config/pom.xml
opendaylight/config/yang-jmx-generator-plugin/src/main/resources/freeMarker/module_abs_template_new.ftl
opendaylight/config/yang-jmx-generator-plugin/src/main/resources/freeMarker/module_stub_template.ftl
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/DepTestImplModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/NetconfTestImplModule.java
opendaylight/config/yang-test/src/main/java/org/opendaylight/controller/config/yang/test/impl/TestImplModule.java
opendaylight/netconf/config-netconf-connector/pom.xml
opendaylight/netconf/config-persister-impl/pom.xml
opendaylight/netconf/netconf-api/pom.xml
opendaylight/netconf/netconf-client/pom.xml
opendaylight/netconf/netconf-impl/pom.xml
opendaylight/netconf/netconf-util/pom.xml

index 30c0e47..6bbb2ac 100644 (file)
        <artifactId>yang-ext</artifactId>
        <version>${yang-ext.version}</version>
       </dependency>
-
       <!-- bgppcep dependencies -->
       <dependency>
        <groupId>org.opendaylight.bgpcep</groupId>
        <artifactId>util</artifactId>
        <version>${bgpcep.version}</version>
       </dependency>
-
-        <dependency>
-            <groupId>org.opendaylight.bgpcep</groupId>
-            <artifactId>framework</artifactId>
-            <version>${bgpcep.version}</version>
-        </dependency>
-
+    <dependency>
+        <groupId>org.opendaylight.bgpcep</groupId>
+        <artifactId>framework</artifactId>
+        <version>${bgpcep.version}</version>
+     </dependency>
         <!--Netty-->
         <dependency>
             <groupId>io.netty</groupId>
index 218362a..394831d 100644 (file)
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>concepts</artifactId>
+            <version>${opendaylight.yangtools.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -34,7 +39,7 @@
                     <instructions>
                         <Import-Package>
                             javax.management,
-                            org.opendaylight.protocol.concepts,
+                            org.opendaylight.yangtools.concepts,
                             org.osgi.framework,
                         </Import-Package>
                         <Export-Package>
index f5ccb4a..c654f5f 100644 (file)
@@ -7,7 +7,9 @@
  */
 package org.opendaylight.controller.config.api;
 
-public class ModuleIdentifier {
+import org.opendaylight.yangtools.concepts.Identifier;
+
+public class ModuleIdentifier implements Identifier {
     private static final long serialVersionUID = 1L;
     private final String factoryName, instanceName;
 
index 01f81a3..ff14841 100644 (file)
@@ -11,6 +11,7 @@ import javax.annotation.concurrent.NotThreadSafe;
 
 import org.opendaylight.controller.config.api.ModuleIdentifier;
 import org.opendaylight.controller.config.api.annotations.RequireInterface;
+import org.opendaylight.yangtools.concepts.Identifiable;
 
 
 /**
@@ -28,7 +29,7 @@ import org.opendaylight.controller.config.api.annotations.RequireInterface;
  * </p>
  */
 @NotThreadSafe
-public interface Module {
+public interface Module extends Identifiable<ModuleIdentifier>{
     /**
      * This method will be called as first phase in two phase commit. Instance
      * can check attributes, but is not allowed to do any kind of work that
@@ -55,6 +56,4 @@ public interface Module {
      */
     AutoCloseable getInstance();
 
-    ModuleIdentifier getName();
-
 }
index 2019cb6..138f500 100644 (file)
             <artifactId>guava</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>concepts</artifactId>
+            <version>${opendaylight.yangtools.version}</version>
+        </dependency>
     </dependencies>
 
     <build>
@@ -85,7 +90,7 @@
                             org.slf4j,
                             javax.management,
                             org.osgi.framework,
-                            org.opendaylight.protocol.concepts,
+                            org.opendaylight.yangtools.concepts.*,
                             org.apache.commons.io,
                             org.osgi.util.tracker,
                         </Import-Package>
index 18b4d3b..75db0e8 100644 (file)
@@ -209,7 +209,7 @@ public class ConfigRegistryImpl implements AutoCloseable, ConfigRegistryImplMXBe
                                    // runtime jmx registrator),
             // also closes osgi registration and ModuleJMXRegistrator
             // registration
-            currentConfig.remove(toBeDestroyed.getName());
+            currentConfig.remove(toBeDestroyed.getIdentifier());
         }
 
         // set RuntimeBeanRegistrators on beans implementing
index 5e8fac6..740a741 100644 (file)
@@ -37,6 +37,7 @@ import org.opendaylight.controller.config.manager.impl.jmx.TransactionModuleJMXR
 import org.opendaylight.controller.config.manager.impl.util.LookupBeansUtil;
 import org.opendaylight.controller.config.spi.Module;
 import org.opendaylight.controller.config.spi.ModuleFactory;
+import org.opendaylight.yangtools.concepts.Identifiable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,7 +48,8 @@ import org.slf4j.LoggerFactory;
  */
 class ConfigTransactionControllerImpl implements
         ConfigTransactionControllerInternal,
-        ConfigTransactionControllerImplMXBean {
+        ConfigTransactionControllerImplMXBean,
+        Identifiable<TransactionIdentifier>{
     private static final Logger logger = LoggerFactory.getLogger(ConfigTransactionControllerImpl.class);
 
     private final TransactionIdentifier transactionIdentifier;
@@ -131,7 +133,7 @@ class ConfigTransactionControllerImpl implements
             Set<? extends Module> defaultModules = moduleFactory.getDefaultModules(dependencyResolverManager);
             for (Module module : defaultModules) {
                 try {
-                    putConfigBeanToJMXAndInternalMaps(module.getName(), module, moduleFactory, null);
+                    putConfigBeanToJMXAndInternalMaps(module.getIdentifier(), module, moduleFactory, null);
                 } catch (InstanceAlreadyExistsException e) {
                     throw new IllegalStateException(e);
                 }
@@ -197,9 +199,9 @@ class ConfigTransactionControllerImpl implements
             @Nullable ModuleInternalInfo maybeOldConfigBeanInfo)
             throws InstanceAlreadyExistsException {
         logger.debug("Adding module {} to transaction {}", moduleIdentifier, this);
-        if (moduleIdentifier.equals(module.getName())==false) {
+        if (moduleIdentifier.equals(module.getIdentifier())==false) {
             throw new IllegalStateException("Incorrect name reported by module. Expected "
-             + moduleIdentifier + ", got " + module.getName());
+             + moduleIdentifier + ", got " + module.getIdentifier());
         }
         DynamicMBean writableDynamicWrapper = new DynamicWritableWrapper(
                 module, moduleIdentifier, transactionIdentifier,
@@ -453,4 +455,9 @@ class ConfigTransactionControllerImpl implements
     public List<ModuleFactory> getCurrentlyRegisteredFactories() {
         return currentlyRegisteredFactories;
     }
+
+    @Override
+    public TransactionIdentifier getIdentifier() {
+        return transactionIdentifier;
+    }
 }
index 4913604..682d4a1 100644 (file)
@@ -10,6 +10,7 @@ package org.opendaylight.controller.config.manager.impl;
 import org.opendaylight.controller.config.api.ModuleIdentifier;
 import org.opendaylight.controller.config.manager.impl.jmx.ModuleJMXRegistrator;
 import org.opendaylight.controller.config.manager.impl.osgi.BeanToOsgiServiceManager.OsgiRegistration;
+import org.opendaylight.yangtools.concepts.Identifiable;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -20,47 +21,43 @@ import org.slf4j.LoggerFactory;
  * compareTo method.
  */
 public class DestroyedModule implements AutoCloseable,
-        Comparable<DestroyedModule> {
+        Comparable<DestroyedModule>, Identifiable<ModuleIdentifier> {
     private static final Logger logger = LoggerFactory
             .getLogger(DestroyedModule.class);
 
-    private final ModuleIdentifier name;
+    private final ModuleIdentifier identifier;
     private final AutoCloseable instance;
     private final ModuleJMXRegistrator oldJMXRegistrator;
     private final OsgiRegistration osgiRegistration;
     private final int orderingIdx;
 
-    DestroyedModule(ModuleIdentifier name, AutoCloseable instance,
+    DestroyedModule(ModuleIdentifier identifier, AutoCloseable instance,
             ModuleJMXRegistrator oldJMXRegistrator,
             OsgiRegistration osgiRegistration, int orderingIdx) {
-        this.name = name;
+        this.identifier = identifier;
         this.instance = instance;
         this.oldJMXRegistrator = oldJMXRegistrator;
         this.osgiRegistration = osgiRegistration;
         this.orderingIdx = orderingIdx;
     }
 
-    public ModuleIdentifier getName() {
-        return name;
-    }
-
     @Override
     public void close() {
-        logger.info("Destroying {}", name);
+        logger.info("Destroying {}", identifier);
         try {
             instance.close();
         } catch (Exception e) {
-            logger.error("Error while closing instance of {}", name, e);
+            logger.error("Error while closing instance of {}", identifier, e);
         }
         try {
             oldJMXRegistrator.close();
         } catch (Exception e) {
-            logger.error("Error while closing jmx registrator of {}", name, e);
+            logger.error("Error while closing jmx registrator of {}", identifier, e);
         }
         try {
             osgiRegistration.close();
         } catch (Exception e) {
-            logger.error("Error while closing osgi registration of {}", name, e);
+            logger.error("Error while closing osgi registration of {}", identifier, e);
         }
     }
 
@@ -68,4 +65,9 @@ public class DestroyedModule implements AutoCloseable,
     public int compareTo(DestroyedModule o) {
         return Integer.compare(orderingIdx, o.orderingIdx);
     }
+
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return identifier;
+    }
 }
index 0d5f18e..c675db5 100644 (file)
@@ -14,11 +14,13 @@ import org.opendaylight.controller.config.manager.impl.dynamicmbean.DynamicReada
 import org.opendaylight.controller.config.manager.impl.jmx.ModuleJMXRegistrator;
 import org.opendaylight.controller.config.manager.impl.jmx.RootRuntimeBeanRegistratorImpl;
 import org.opendaylight.controller.config.manager.impl.osgi.BeanToOsgiServiceManager.OsgiRegistration;
+import org.opendaylight.yangtools.concepts.Identifiable;
 
 /**
  * Provides metadata about Module from controller to registry.
  */
-public class ModuleInternalInfo implements Comparable<ModuleInternalInfo> {
+public class ModuleInternalInfo implements Comparable<ModuleInternalInfo>,
+                Identifiable<ModuleIdentifier>{
 
     private final ModuleIdentifier name;
     // this registrator is passed to runtime bean registrator and config
@@ -85,6 +87,7 @@ public class ModuleInternalInfo implements Comparable<ModuleInternalInfo> {
         return osgiRegistration;
     }
 
+    @Deprecated
     public ModuleIdentifier getName() {
         return name;
     }
@@ -109,4 +112,9 @@ public class ModuleInternalInfo implements Comparable<ModuleInternalInfo> {
                 getReadableModule().getInstance(), getModuleJMXRegistrator(),
                 getOsgiRegistration(), getOrderingIdx());
     }
+
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return name;
+    }
 }
index 571bbad..1dc8a2b 100644 (file)
@@ -16,8 +16,9 @@ import org.opendaylight.controller.config.manager.impl.jmx.TransactionModuleJMXR
         .TransactionModuleJMXRegistration;
 import org.opendaylight.controller.config.spi.Module;
 import org.opendaylight.controller.config.spi.ModuleFactory;
+import org.opendaylight.yangtools.concepts.Identifiable;
 
-public class ModuleInternalTransactionalInfo {
+public class ModuleInternalTransactionalInfo implements Identifiable<ModuleIdentifier> {
     private final ModuleIdentifier name;
     private final Module module;
     private final ModuleFactory moduleFactory;
@@ -56,6 +57,7 @@ public class ModuleInternalTransactionalInfo {
                 maybeOldInternalInfo.getOrderingIdx());
     }
 
+    @Deprecated
     public Module getModule() {
         return module;
     }
@@ -74,4 +76,9 @@ public class ModuleInternalTransactionalInfo {
     public TransactionModuleJMXRegistration getTransactionModuleJMXRegistration() {
         return transactionModuleJMXRegistration;
     }
+
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return name;
+    }
 }
index de8440c..5ab09be 100644 (file)
@@ -7,7 +7,10 @@
  */
 package org.opendaylight.controller.config.manager.impl;
 
-public class TransactionIdentifier {
+import org.opendaylight.yangtools.concepts.Identifier;
+
+public class TransactionIdentifier implements Identifier {
+
     private final String name;
 
     public TransactionIdentifier(String name) {
index ecb02a1..f817b41 100644 (file)
@@ -25,6 +25,7 @@ import org.opendaylight.controller.config.api.jmx.ObjectNameUtil;
 import org.opendaylight.controller.config.manager.impl.TransactionStatus;
 import org.opendaylight.controller.config.spi.Module;
 import org.opendaylight.controller.config.spi.ModuleFactory;
+import org.opendaylight.yangtools.concepts.Identifiable;
 
 /**
  * Protect {@link org.opendaylight.controller.config.spi.Module#getInstance()}
@@ -32,7 +33,7 @@ import org.opendaylight.controller.config.spi.ModuleFactory;
  * during validation. Tracks dependencies for ordering purposes.
  */
 final class DependencyResolverImpl implements DependencyResolver,
-       Comparable<DependencyResolverImpl> {
+       Identifiable<ModuleIdentifier>, Comparable<DependencyResolverImpl> {
     private final ModulesHolder modulesHolder;
     private final ModuleIdentifier name;
     private final TransactionStatus transactionStatus;
@@ -46,6 +47,7 @@ final class DependencyResolverImpl implements DependencyResolver,
         this.modulesHolder = modulesHolder;
     }
 
+    @Deprecated
     public ModuleIdentifier getName() {
         return name;
     }
@@ -199,4 +201,9 @@ final class DependencyResolverImpl implements DependencyResolver,
         impl.maxDependencyDepth = maxDepth;
         return maxDepth;
     }
+
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return name;
+    }
 }
index 89ac9a3..87d6e8b 100644 (file)
@@ -34,9 +34,5 @@ public abstract class AbstractMockedModule implements Module {
         return instance;
     }
 
-    @Override
-    public ModuleIdentifier getName() {
-        return new ModuleIdentifier(getClass().getCanonicalName(), "mock");
-    }
 
 }
index 2509750..9a5452a 100644 (file)
@@ -15,6 +15,7 @@ import javax.management.MXBean;
 
 import org.junit.Test;
 import org.opendaylight.controller.config.spi.Module;
+import org.opendaylight.yangtools.concepts.Identifiable;
 
 import com.google.common.collect.Sets;
 
@@ -48,7 +49,7 @@ public class InterfacesHelperTest {
     @Test
     public void testGetAllInterfaces() {
         Set<Class<?>> expected = Sets.<Class<?>> newHashSet(SuperA.class, SuperBMXBean.class, SuperC.class,
-                SubA.class, Module.class);
+                SubA.class, Identifiable.class, Module.class);
         assertEquals(expected,
                 InterfacesHelper.getAllInterfaces(SubClass.class));
     }
index 81ba49e..3c55f4d 100644 (file)
@@ -40,26 +40,21 @@ public class TestingParallelAPSPModule implements Module,
     private final DependencyResolver dependencyResolver;
     private final AutoCloseable oldCloseable;
     private final TestingParallelAPSPImpl oldInstance;
-    private final ModuleIdentifier name;
+    private final ModuleIdentifier identifier;
     private ObjectName threadPoolON;
     private TestingParallelAPSPImpl instance;
     private String someParam;
 
-    public TestingParallelAPSPModule(ModuleIdentifier name,
+    public TestingParallelAPSPModule(ModuleIdentifier identifier,
             DependencyResolver dependencyResolver,
             @Nullable AutoCloseable oldCloseable,
             @Nullable TestingParallelAPSPImpl oldInstance) {
-        this.name = name;
+        this.identifier = identifier;
         this.dependencyResolver = dependencyResolver;
         this.oldCloseable = oldCloseable;
         this.oldInstance = oldInstance;
     }
 
-    @Override
-    public ModuleIdentifier getName() {
-        return name;
-    }
-
     @Override
     public ObjectName getThreadPool() {
         return threadPoolON;
@@ -142,4 +137,11 @@ public class TestingParallelAPSPModule implements Module,
         }
         return instance;
     }
+
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return identifier;
+    }
+
+
 }
index 29e91fd..e385136 100644 (file)
@@ -60,11 +60,6 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
             this.moduleIdentifier = moduleIdentifier;
         }
 
-        @Override
-        public ModuleIdentifier getName() {
-            return moduleIdentifier;
-        }
-
         @Override
         public int getThreadCount() {
             return threadCount;
@@ -84,6 +79,11 @@ public class MockedDependenciesTest extends AbstractParallelAPSPTest {
         public Closeable getInstance() {
             return new MockedThreadPool(threadCount);
         }
+
+        @Override
+        public ModuleIdentifier getIdentifier() {
+            return moduleIdentifier;
+        }
     }
 
     public static class MockedThreadPool implements TestingThreadPoolIfc,
index 4716d58..77d1f8b 100644 (file)
@@ -30,7 +30,7 @@ public class TestingScheduledThreadPoolModule implements Module,
         RuntimeBeanRegistratorAwareModule,
         TestingScheduledThreadPoolServiceInterface {
 
-    private final ModuleIdentifier name;
+    private final ModuleIdentifier identifier;
     @Nullable
     private final AutoCloseable oldCloseable;
     @Nullable
@@ -41,19 +41,14 @@ public class TestingScheduledThreadPoolModule implements Module,
     private RootRuntimeBeanRegistrator runtimeBeanRegistrator;
     private boolean recreate;
 
-    public TestingScheduledThreadPoolModule(ModuleIdentifier name,
+    public TestingScheduledThreadPoolModule(ModuleIdentifier identifier,
             @Nullable AutoCloseable oldCloseable,
             @Nullable TestingScheduledThreadPoolImpl oldInstance) {
-        this.name = name;
+        this.identifier = identifier;
         this.oldCloseable = oldCloseable;
         this.oldInstance = oldInstance;
     }
 
-    @Override
-    public ModuleIdentifier getName() {
-        return name;
-    }
-
     @Override
     public void setRuntimeBeanRegistrator(
             RootRuntimeBeanRegistrator runtimeBeanRegistrator) {
@@ -108,4 +103,10 @@ public class TestingScheduledThreadPoolModule implements Module,
         this.recreate = recreate;
     }
 
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return identifier;
+    }
+
+
 }
index ff33b16..0069b44 100644 (file)
@@ -37,10 +37,6 @@ public class TestingFixedThreadPoolModule implements
         this.oldInstance = oldInstance;
     }
 
-    @Override
-    public ModuleIdentifier getName() {
-        return name;
-    }
 
     // attributes
     @Override
@@ -100,4 +96,9 @@ public class TestingFixedThreadPoolModule implements
         return instance;
     }
 
+    @Override
+    public ModuleIdentifier getIdentifier() {
+        return name;
+    }
+
 }
index 9b5cbfc..09c3cb8 100644 (file)
@@ -12,6 +12,7 @@ import java.util.Set;
 
 import org.opendaylight.controller.config.api.JmxAttribute;
 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
+import org.opendaylight.controller.config.api.ModuleIdentifier;
 
 import com.google.common.collect.Sets;
 
@@ -149,4 +150,5 @@ public final class LogbackModule
 
         return setter;
     }
+
 }
index 1ea922e..a16472b 100755 (executable)
@@ -43,6 +43,7 @@
         <jolokia.version>1.1.1</jolokia.version>
         <opendaylight.yang.version>0.5.9-SNAPSHOT</opendaylight.yang.version>
         <opendaylight.binding.version>0.6.0-SNAPSHOT</opendaylight.binding.version>
+        <opendaylight.yangtools.version>0.1.1-SNAPSHOT</opendaylight.yangtools.version>
         <jmxGeneratorPath>${project.build.directory}/generated-sources/config</jmxGeneratorPath>
     </properties>
 
index 90412d7..7351822 100644 (file)
@@ -15,20 +15,20 @@ package ${packageName};
     private final ${instanceType} oldInstance;
     private ${instanceType} instance;
     private final ${dependencyResolverType} dependencyResolver;
-    private final ${moduleNameType} name;
+    private final ${moduleNameType} identifier;
     <#if runtime=true>
     private ${registratorType} rootRuntimeBeanRegistratorWrapper;
     </#if>
 
-    public ${typeDeclaration.name}(${moduleNameType} name, ${dependencyResolverType} dependencyResolver) {
-        this.name = name;
+    public ${typeDeclaration.name}(${moduleNameType} identifier, ${dependencyResolverType} dependencyResolver) {
+        this.identifier = identifier;
         this.dependencyResolver = dependencyResolver;
         this.oldInstance = null;
         this.oldModule = null;
     }
 
-    public ${typeDeclaration.name}(${moduleNameType} name, ${dependencyResolverType} dependencyResolver, ${typeDeclaration.name} oldModule, ${instanceType} oldInstance) {
-        this.name = name;
+    public ${typeDeclaration.name}(${moduleNameType} identifier, ${dependencyResolverType} dependencyResolver, ${typeDeclaration.name} oldModule, ${instanceType} oldInstance) {
+        this.identifier = identifier;
         this.dependencyResolver = dependencyResolver;
         this.oldInstance = oldInstance;
         this.oldModule = oldModule;
@@ -104,8 +104,8 @@ package ${packageName};
     }
 
     @Override
-    public final ${moduleNameType} getName() {
-        return name;
+    public ${moduleNameType} getIdentifier() {
+        return identifier;
     }
 
     public boolean canReuseInstance(${typeDeclaration.name} oldModule){
index d2350ac..23dce93 100644 (file)
@@ -5,12 +5,12 @@ package ${packageName};
 <@typeDeclarationD object=typeDeclaration/>
 {
 
-    public ${typeDeclaration.name}(${moduleNameType} name, ${dependencyResolverType} dependencyResolver) {
-        super(name, dependencyResolver);
+    public ${typeDeclaration.name}(${moduleNameType} identifier, ${dependencyResolverType} dependencyResolver) {
+        super(identifier, dependencyResolver);
     }
 
-    public ${typeDeclaration.name}(${moduleNameType} name, ${dependencyResolverType} dependencyResolver, ${typeDeclaration.name} oldModule, ${instanceType} oldInstance) {
-        super(name, dependencyResolver, oldModule, oldInstance);
+    public ${typeDeclaration.name}(${moduleNameType} identifier, ${dependencyResolverType} dependencyResolver, ${typeDeclaration.name} oldModule, ${instanceType} oldInstance) {
+        super(identifier, dependencyResolver, oldModule, oldInstance);
     }
 
     @Override
index 3e3e3f2..989bd9e 100755 (executable)
@@ -90,6 +90,7 @@
         <dependency>
             <groupId>org.opendaylight.bgpcep</groupId>
             <artifactId>mockito-configuration</artifactId>
+            <version>${bgpcep.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
index ffc80c0..603f40b 100644 (file)
@@ -50,6 +50,7 @@
         <dependency>
             <groupId>org.opendaylight.bgpcep</groupId>
             <artifactId>mockito-configuration</artifactId>
+            <version>${bgpcep.version}</version>
             <scope>test</scope>
         </dependency>
     </dependencies>
index 69c0660..3c62094 100644 (file)
@@ -21,6 +21,7 @@
         <dependency>
             <groupId>org.opendaylight.bgpcep</groupId>
             <artifactId>framework</artifactId>
+            <version>${bgpcep.version}</version>
         </dependency>
     </dependencies>
 
index edd8493..0864a52 100644 (file)
@@ -24,6 +24,7 @@
         <dependency>
             <groupId>org.opendaylight.bgpcep</groupId>
             <artifactId>framework</artifactId>
+            <version>${bgpcep.version}</version>
         </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
index ba0723d..c355cb0 100644 (file)
@@ -59,6 +59,7 @@
         <dependency>
             <groupId>org.opendaylight.bgpcep</groupId>
             <artifactId>mockito-configuration</artifactId>
+            <version>${bgpcep.version}</version>
             <scope>test</scope>
         </dependency>
         <dependency>
index b180a67..20603c4 100644 (file)
@@ -50,6 +50,7 @@
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-handler</artifactId>
+            <version>${netconf.netty.version}</version>
         </dependency>
     </dependencies>