updata for code review 22/130022/1
authorcmrizhangzhen <781953240@qq.com>
Mon, 25 Jul 2022 09:53:32 +0000 (17:53 +0800)
committercmrizhangzhen <781953240@qq.com>
Mon, 25 Jul 2022 09:54:04 +0000 (17:54 +0800)
Issue-ID: USECASEUI-696
Signed-off-by: cmrizhangzhen <781953240@qq.com>
Change-Id: I42a39127b31b63ef692f49e23c13b25ab1ec11a1

intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java

index cd5ca8c..785a001 100644 (file)
@@ -44,9 +44,9 @@ public class IntentFunctionManageController {
     }
 
     @PutMapping(value = "/{intentId}", produces = MediaType.APPLICATION_JSON_VALUE)
-    public ResponseEntity updateIntentById(
+    public ResponseEntity updateIntentManageById(
             @PathVariable(value = "id") String id, @RequestBody IntentManagerRegInfo intentManage) {
-        return ResponseEntity.ok(intentFunctionManageService.updateIntentById(id, intentManage));
+        return ResponseEntity.ok(intentFunctionManageService.updateIntentManageById(id, intentManage));
     }
 
     @GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
index b3a05b2..bccc416 100644 (file)
@@ -24,7 +24,7 @@ public interface IntentFunctionManageService {
 
     int deleteFunctionManage(String id);
 
-    int updateIntentById(String id, IntentManagerRegInfo intentManage);
+    int updateIntentManageById(String id, IntentManagerRegInfo intentManage);
 
     List<IntentManagerRegInfo> getIntentManage();
 
index edf4e7f..71bf8fa 100644 (file)
@@ -29,12 +29,10 @@ import java.util.List;
 
 @Service("intentFunctionManageService")
 public class IntentFunctionManageServiceImpl implements IntentFunctionManageService {
-    @Autowired 
+    @Autowired
     private ApplicationContext applicationContext;
-    
     @Override
     public int createFunctionManage(IntentManagerRegInfo intentManage)  {
-        IntentManagementFunction intentManagementFunction = (IntentManagementFunction)applicationContext.getBean("CLLBusinessIntentManagementFunction");
         return 0;
     }
 
@@ -44,7 +42,7 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
     }
 
     @Override
-    public int updateIntentById(String id, IntentManagerRegInfo intentManage) {
+    public int updateIntentManageById(String id, IntentManagerRegInfo intentManage) {
         return 0;
     }
 
@@ -53,17 +51,16 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
         return null;
     }
 
-    public List<IntentManagementFunction> filterHanleFunction(Intent intent) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
-        String functionName ="CLLBusinessIntentManagementFunction";
+    public List<IntentManagementFunction> filterHandleFunction(IntentManagerRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
+        String managetFunctionRegName =managementRegInfo.getHandleName();
 
         IntentManagementFunction function =
-                (IntentManagementFunction)applicationContext.getBean(functionName);
+                (IntentManagementFunction)applicationContext.getBean(managetFunctionRegName);
 
         ActuationModule actuationModule = function.getActuationModule();
         actuationModule.sendToNonIntentHandler();
-//
         IntentManagementFunction intentManagementFunction =
-                (IntentManagementFunction) Class.forName(functionName)
+                (IntentManagementFunction) Class.forName(managetFunctionRegName)
                         .getDeclaredConstructor().newInstance();
         ActuationModule actuationModule1 = intentManagementFunction.getActuationModule();
         return null;