Added conflict handling between configuration and state choice nodes.
[controller.git] / opendaylight / md-sal / sal-dom-broker / src / main / java / org / opendaylight / controller / sal / dom / broker / BrokerConfigActivator.xtend
index 54c94dca9f83601dfbbd666a49e48476091feb02..482cfa959f2b8e11ce125a53da97d52b5990a808 100644 (file)
@@ -13,20 +13,22 @@ import org.opendaylight.yangtools.yang.parser.impl.YangParserImpl
 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier
 import org.opendaylight.controller.sal.core.api.data.DataStore
 import org.opendaylight.controller.sal.dom.broker.impl.SchemaAwareDataStoreAdapter
+import org.opendaylight.controller.sal.core.api.model.SchemaServiceListener
 
 class BrokerConfigActivator implements AutoCloseable {
     
     
     private static val ROOT = InstanceIdentifier.builder().toInstance();
+
+    @Property
+    private var DataBrokerImpl dataService;
     
     private var ServiceRegistration<SchemaService> schemaReg;
     private var ServiceRegistration<DataBrokerService> dataReg;
     private var ServiceRegistration<DataProviderService> dataProviderReg;
     private var ServiceRegistration<MountService> mountReg;
     private var ServiceRegistration<MountProvisionService> mountProviderReg;
-    
     private var SchemaServiceImpl schemaService;
-    private var DataBrokerImpl dataService;
     private var MountPointManagerImpl mountService;
     
     SchemaAwareDataStoreAdapter wrappedStore
@@ -51,6 +53,8 @@ class BrokerConfigActivator implements AutoCloseable {
         wrappedStore = new SchemaAwareDataStoreAdapter();
         wrappedStore.changeDelegate(store);
         wrappedStore.setValidationEnabled(false);
+       
+        context.registerService(SchemaServiceListener,wrappedStore,emptyProperties)  
         
         dataService.registerConfigurationReader(ROOT, wrappedStore);
         dataService.registerCommitHandler(ROOT, wrappedStore);