diff options
author | cmrizhangzhen <781953240@qq.com> | 2022-07-25 17:53:32 +0800 |
---|---|---|
committer | cmrizhangzhen <781953240@qq.com> | 2022-07-25 17:54:04 +0800 |
commit | 7753765f0712e846ff87a8b2dd6b9586b2e02f47 (patch) | |
tree | f223643feb9ca1c02afc058fd6ce13231553fabb | |
parent | de96c7a9e34dcad201231a37e9beabfe4bf26ffd (diff) |
updata for code review
Issue-ID: USECASEUI-696
Signed-off-by: cmrizhangzhen <781953240@qq.com>
Change-Id: I42a39127b31b63ef692f49e23c13b25ab1ec11a1
3 files changed, 9 insertions, 12 deletions
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java index cd5ca8c..785a001 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java @@ -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) diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java index b3a05b2..bccc416 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java @@ -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(); diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java index edf4e7f..71bf8fa 100644 --- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java +++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java @@ -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; |