Renamed local variable to match the regular expression
[appc.git] / appc-dg / appc-dg-shared / appc-dg-mdsal-store / appc-dg-mdsal-bundle / src / main / java / org / onap / appc / mdsal / provider / MdsalStoreProvider.java
index 18ff522..4c02332 100644 (file)
@@ -2,9 +2,11 @@
  * ============LICENSE_START=======================================================
  * ONAP : APPC
  * ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
+ * ================================================================================
+ * Modifications (C) 2019 Ericsson
  * =============================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 package org.onap.appc.mdsal.provider;
 
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import com.google.common.util.concurrent.Futures;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import org.onap.appc.Constants;
+import org.onap.appc.mdsal.MDSALStore;
+import org.onap.appc.mdsal.impl.MDSALStoreFactory;
+import org.onap.appc.mdsal.objects.BundleInfo;
 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.controller.md.sal.binding.api.NotificationPublishService;
 import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
 import org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.rev170925.MdsalStoreService;
 import org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.rev170925.StoreYangInput;
@@ -38,29 +45,23 @@ import org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.rev170925.response
 import org.opendaylight.yang.gen.v1.org.onap.appc.mdsal.store.rev170925.response.StatusBuilder;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-import org.onap.appc.Constants;
-import org.onap.appc.mdsal.MDSALStore;
-import org.onap.appc.mdsal.impl.MDSALStoreFactory;
-import org.onap.appc.mdsal.objects.BundleInfo;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
 
 public class MdsalStoreProvider implements MdsalStoreService ,AutoCloseable{
 
     protected DataBroker dataBroker;
     protected RpcProviderRegistry rpcRegistry;
-    protected NotificationProviderService notificationService;
+    protected NotificationPublishService notificationService;
 
     protected BindingAwareBroker.RpcRegistration<MdsalStoreService> rpcRegistration;
     private final EELFLogger log = EELFManager.getInstance().getLogger(MdsalStoreProvider.class);
     private final ExecutorService executor;
-    private final static String APP_NAME = "MdsalStoreProvider";
+    private static final String APP_NAME = "MdsalStoreProvider";
 
-    public MdsalStoreProvider(DataBroker dataBroker2, NotificationProviderService notificationProviderService
+    public MdsalStoreProvider(DataBroker dataBroker2, NotificationPublishService notificationProviderService
             , RpcProviderRegistry rpcRegistry2){
         log.info("Creating provider for " + APP_NAME);
         executor = Executors.newFixedThreadPool(1);
@@ -89,8 +90,9 @@ public class MdsalStoreProvider implements MdsalStoreService ,AutoCloseable{
     }
 
     @Override
-    public Future<RpcResult<StoreYangOutput>> storeYang(StoreYangInput input) {
-        Status status =null;String message=null;
+    public ListenableFuture<RpcResult<StoreYangOutput>> storeYang(StoreYangInput input) {
+        Status status = null;
+        String message = null;
         try{
             BundleInfo bundleInfo = new BundleInfo();
             bundleInfo.setName(input.getModuleName());