Change static string litral. 26/86126/1
authorh00397475 <hena.choudhury@huawei.com>
Wed, 24 Apr 2019 08:39:10 +0000 (14:09 +0530)
committerh00397475 <hena.choudhury@huawei.com>
Wed, 24 Apr 2019 08:39:10 +0000 (14:09 +0530)
Change static string litrals name according to the guidelines.
Issue-ID: SO-1490

Change-Id: Iadabb204c5615f3bc559076999429bc0b9f615f6
Signed-off-by: h00397475 <hena.choudhury@huawei.com>
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCDeactivateTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCQueryTasks.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/sdnc/tasks/SDNCUnassignTasks.java

index 3a15289..e587830 100644 (file)
@@ -51,7 +51,8 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class SDNCDeactivateTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCDeactivateTasks.class);
+
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCNetworkResources sdncNetworkResources;
     @Autowired
@@ -80,7 +81,7 @@ public class SDNCDeactivateTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -107,7 +108,7 @@ public class SDNCDeactivateTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -132,7 +133,7 @@ public class SDNCDeactivateTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -157,7 +158,7 @@ public class SDNCDeactivateTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
index 7ae6117..fcc67d0 100644 (file)
@@ -39,7 +39,8 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class SDNCQueryTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCQueryTasks.class);
+
+    public static final String SDNCQUERY_RESPONSE = "SDNCQueryResponse_";
     @Autowired
     private SDNCVnfResources sdncVnfResources;
     @Autowired
@@ -61,7 +62,7 @@ public class SDNCQueryTasks {
                 genericVnf.setSelflink(selfLink);
             }
             String response = sdncVnfResources.queryVnf(genericVnf);
-            execution.setVariable("SDNCQueryResponse_" + genericVnf.getVnfId(), response);
+            execution.setVariable(SDNCQUERY_RESPONSE + genericVnf.getVnfId(), response);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -82,7 +83,7 @@ public class SDNCQueryTasks {
             }
             if (vfModule.getSelflink() != null && !vfModule.getSelflink().isEmpty()) {
                 String response = sdncVfModuleResources.queryVfModule(vfModule);
-                execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), response);
+                execution.setVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId(), response);
             } else {
                 throw new Exception("Vf Module " + vfModule.getVfModuleId()
                         + " exists in gBuildingBlock but does not have a selflink value");
@@ -97,7 +98,7 @@ public class SDNCQueryTasks {
             VfModule vfModule = extractPojosForBB.extractByKey(execution, ResourceKey.VF_MODULE_ID);
             if (vfModule.getSelflink() != null && !vfModule.getSelflink().isEmpty()) {
                 String response = sdncVfModuleResources.queryVfModule(vfModule);
-                execution.setVariable("SDNCQueryResponse_" + vfModule.getVfModuleId(), response);
+                execution.setVariable(SDNCQUERY_RESPONSE + vfModule.getVfModuleId(), response);
             } else {
                 throw new Exception("Vf Module " + vfModule.getVfModuleId()
                         + " exists in gBuildingBlock but does not have a selflink value");
index e9848d1..fba189f 100644 (file)
@@ -51,7 +51,8 @@ import org.springframework.stereotype.Component;
 
 @Component
 public class SDNCUnassignTasks {
-    private static final Logger logger = LoggerFactory.getLogger(SDNCUnassignTasks.class);
+
+    public static final String SDNC_REQUEST = "SDNCRequest";
     @Autowired
     private SDNCServiceInstanceResources sdncSIResources;
     @Autowired
@@ -77,7 +78,7 @@ public class SDNCUnassignTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.SERVICE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -94,7 +95,7 @@ public class SDNCUnassignTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VFMODULE);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -114,7 +115,7 @@ public class SDNCUnassignTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.VNF);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }
@@ -136,7 +137,7 @@ public class SDNCUnassignTasks {
             SDNCRequest sdncRequest = new SDNCRequest();
             sdncRequest.setSDNCPayload(req);
             sdncRequest.setTopology(SDNCTopology.NETWORK);
-            execution.setVariable("SDNCRequest", sdncRequest);
+            execution.setVariable(SDNC_REQUEST, sdncRequest);
         } catch (Exception ex) {
             exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
         }