aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagementFunctionRegInfo.java (renamed from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java)2
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java14
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessActuationModule.java (renamed from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/ActuationModuleImpl.java)16
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModule.java (renamed from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/DecisoinModuleImpl.java)4
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java58
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java36
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java10
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java8
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java58
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java8
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java11
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java9
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java8
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java5
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java34
15 files changed, 191 insertions, 90 deletions
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagementFunctionRegInfo.java
index 24ef19e..34f56b7 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagementFunctionRegInfo.java
@@ -23,7 +23,7 @@ import org.onap.usecaseui.intentanalysis.bean.enums.SupportInterface;
import java.util.List;
@Data
-public class IntentManagerRegInfo {
+public class IntentManagementFunctionRegInfo {
private String id;
private String description;
private List<SupportArea> supportArea;
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java
index 53e13e0..9061036 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java
@@ -17,21 +17,21 @@ package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt;
import lombok.Data;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.ActuationModuleImpl;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.DecisoinModuleImpl;
-import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl.KnownledgeModuleImpl;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessActuationModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessDecisionModule;
+import org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule.CLLBusinessKnowledgeModule;
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
-import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.springframework.stereotype.Component;
@Data
@Component("CLLBusinessIntentManagementFunction")
public class CLLBusinessIntentManagementFunction extends IntentManagementFunction {
- private ActuationModule actuationModule = new ActuationModuleImpl();
- private DecisionModule decisoinModule = new DecisoinModuleImpl();
- private KnowledgeModule knowledgeModule = new KnownledgeModuleImpl();
+ private ActuationModule actuationModule = new CLLBusinessActuationModule();
+ private DecisionModule decisoinModule = new CLLBusinessDecisionModule();
+ private KnowledgeModule knowledgeModule = new CLLBusinessKnowledgeModule();
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/ActuationModuleImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessActuationModule.java
index bb7fbb5..1612090 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/ActuationModuleImpl.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessActuationModule.java
@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
+package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentHandleService;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentProcessService;
@@ -23,18 +25,21 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
-public class ActuationModuleImpl implements ActuationModule {
+public class CLLBusinessActuationModule implements ActuationModule {
@Autowired
IntentProcessService processService;
+ @Autowired
+ IntentHandleService intentHandleService;
+
@Override
- public void sendToIntentHandler(IntentManagementFunction intentHandler) {
- processService.setIntentRole(intentHandler, null);
- processService.intentProcess();
+ public void sendToIntentHandler(IntentManagementFunction IntentHandler) {
+
}
@Override
public void sendToNonIntentHandler() {
+
}
@Override
@@ -44,5 +49,6 @@ public class ActuationModuleImpl implements ActuationModule {
@Override
public void saveIntentToDb() {
+
}
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/DecisoinModuleImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModule.java
index 0439a03..8214b46 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/DecisoinModuleImpl.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModule.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
+package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
@@ -21,7 +21,7 @@ import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunct
import org.springframework.stereotype.Service;
@Service
-public class DecisoinModuleImpl implements DecisionModule {
+public class CLLBusinessDecisionModule implements DecisionModule {
@Override
public void determineUltimateGoal() {}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java
new file mode 100644
index 0000000..51a4ee2
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessKnowledgeModule.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.cllBusinessModule;
+
+import org.onap.usecaseui.intentanalysis.bean.models.Expectation;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
+import org.springframework.stereotype.Service;
+
+@Service
+public class CLLBusinessKnowledgeModule implements KnowledgeModule {
+
+ @Override
+ public Intent intentCognition(Intent intent) {
+ intentResolution(intent);
+ //intentReportResolution();
+ getSystemStatus();
+ //interactWithIntentOwner();
+ determineDetectionGoal();
+ return null;
+ }
+
+ //find similar intents in DB
+ void intentResolution(Intent intent) {
+
+ }
+
+ void intentReportResolution() {
+ }
+
+
+ //query the implementation of intent requirements in the system
+ void getSystemStatus() {
+ }
+
+
+ void interactWithIntentOwner() {
+ }
+
+
+ //Determine add, delete, modify according to theobject,target and context of the expectation
+ void determineDetectionGoal() {
+ }
+
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java
deleted file mode 100644
index 14b2ea0..0000000
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/intentModuleImpl/KnownledgeModuleImpl.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.onap.usecaseui.intentanalysis.cllBusinessIntentMgt.intentModuleImpl;
-
-import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
-import org.springframework.stereotype.Service;
-
-@Service
-public class KnownledgeModuleImpl implements KnowledgeModule {
- @Override
- public void intentResolution() {}
-
- @Override
- public void intentReportResolution() {}
-
- @Override
- public void getSystemStatus() {}
-
- @Override
- public void interactWithIntentOwner() {
-
- }
-}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java
index 85b683b..ce51440 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentController.java
@@ -18,6 +18,8 @@ package org.onap.usecaseui.intentanalysis.controller;
import java.util.List;
+
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentHandleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -35,6 +37,9 @@ public class IntentController {
@Autowired
private IntentService intentService;
+ @Autowired
+ private IntentHandleService intentHandleService;
+
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<List<Intent>> getIntentList() {
return ResponseEntity.ok(intentService.getIntentList());
@@ -63,4 +68,9 @@ public class IntentController {
intentService.deleteIntentById(intentId);
}
+ @PostMapping(value="/handleIntent",produces = MediaType.APPLICATION_JSON_VALUE)
+ public void handleIntent(@RequestBody Intent intent) {
+ intentHandleService.handleOriginalIntent(intent);
+
+ }
}
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 785a001..f36df23 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
@@ -18,7 +18,7 @@
package org.onap.usecaseui.intentanalysis.controller;
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -34,7 +34,7 @@ public class IntentFunctionManageController {
IntentFunctionManageService intentFunctionManageService;
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity createIntentManage(@RequestBody IntentManagerRegInfo intentManage) {
+ public ResponseEntity createIntentManage(@RequestBody IntentManagementFunctionRegInfo intentManage) {
return ResponseEntity.ok(intentFunctionManageService.createFunctionManage(intentManage));
}
@@ -45,12 +45,12 @@ public class IntentFunctionManageController {
@PutMapping(value = "/{intentId}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity updateIntentManageById(
- @PathVariable(value = "id") String id, @RequestBody IntentManagerRegInfo intentManage) {
+ @PathVariable(value = "id") String id, @RequestBody IntentManagementFunctionRegInfo intentManage) {
return ResponseEntity.ok(intentFunctionManageService.updateIntentManageById(id, intentManage));
}
@GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
- public ResponseEntity<List<IntentManagerRegInfo>> getIntentManageByID() {
+ public ResponseEntity<List<IntentManagementFunctionRegInfo>> getIntentManageByID() {
return ResponseEntity.ok(intentFunctionManageService.getIntentManage());
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java
new file mode 100644
index 0000000..6144e97
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/IntentHandleService.java
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2022 CMCC, Inc. and others. All rights reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.onap.usecaseui.intentanalysis.intentBaseService;
+
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService.IntentProcessService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+@Service
+public class IntentHandleService {
+ @Autowired
+ private IntentProcessService processService;
+
+ /**
+ * Process the original intent and find the corresponding IntentManagementFunction
+ * @param intent
+ */
+ public void handleOriginalIntent(Intent intent){
+ IntentManagementFunction intentOwner = selectIntentManagementFunction(intent);
+ handleIntent(intent,intentOwner);
+ }
+
+ public void handleIntent(Intent intent, IntentManagementFunction intentOwner) {
+ processService.setIntentRole(intentOwner, null);
+ processService.intentProcess(intent);
+ }
+
+ public IntentManagementFunction selectIntentManagementFunction(Intent intent) {
+ //select the IntentManagementFunctionRegInfo Based on the IMFRegistry information.
+ //Only internalFunction support.
+ //and based on the IntentManagementFunctionRegInfo, get the right IntentManagementFunction bean.
+ //if no IntentManagementFunction selected, that means this intent is not supported by this system.
+ return null;
+ }
+
+ public IntentManagementFunctionRegInfo selectIntentManagementFunctionRegInfo(Intent intent) {
+ //select the IntentManagementFunctionRegInfo Based on the IMFRegistry information.
+ //Both internalFunction and externalFunction support.
+ //This is used to get he IntentManagementFunction for a subIntent decomposition.
+ return null;
+ }
+}
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 bccc416..8a1f918 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
@@ -15,17 +15,17 @@
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService;
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
import java.util.List;
public interface IntentFunctionManageService {
- int createFunctionManage(IntentManagerRegInfo intentManage) ;
+ int createFunctionManage(IntentManagementFunctionRegInfo intentManage) ;
int deleteFunctionManage(String id);
- int updateIntentManageById(String id, IntentManagerRegInfo intentManage);
+ int updateIntentManageById(String id, IntentManagementFunctionRegInfo intentManage);
- List<IntentManagerRegInfo> getIntentManage();
+ List<IntentManagementFunctionRegInfo> 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 71bf8fa..71a6914 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
@@ -15,8 +15,7 @@
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.impl;
-import org.onap.usecaseui.intentanalysis.bean.models.Intent;
-import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagementFunctionRegInfo;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
@@ -32,7 +31,7 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
@Autowired
private ApplicationContext applicationContext;
@Override
- public int createFunctionManage(IntentManagerRegInfo intentManage) {
+ public int createFunctionManage(IntentManagementFunctionRegInfo intentManage) {
return 0;
}
@@ -42,16 +41,16 @@ public class IntentFunctionManageServiceImpl implements IntentFunctionManageServ
}
@Override
- public int updateIntentManageById(String id, IntentManagerRegInfo intentManage) {
+ public int updateIntentManageById(String id, IntentManagementFunctionRegInfo intentManage) {
return 0;
}
@Override
- public List<IntentManagerRegInfo> getIntentManage() {
+ public List<IntentManagementFunctionRegInfo> getIntentManage() {
return null;
}
- public List<IntentManagementFunction> filterHandleFunction(IntentManagerRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
+ public List<IntentManagementFunction> filterHandleFunction(IntentManagementFunctionRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
String managetFunctionRegName =managementRegInfo.getHandleName();
IntentManagementFunction function =
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java
index 2a0032a..4bb803b 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentModule/KnowledgeModule.java
@@ -15,10 +15,9 @@
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentModule;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+
public interface KnowledgeModule {
- void intentResolution();
- void intentReportResolution();
- void getSystemStatus();
- void interactWithIntentOwner();
- //actuationModel & knownledgeModel interact
+ //Parse, decompose, orchestrate the original intent
+ Intent intentCognition(Intent intent);
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java
index 0232620..13ed2fd 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDetectionService.java
@@ -15,6 +15,7 @@
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.KnowledgeModule;
import org.springframework.stereotype.Service;
@@ -34,12 +35,9 @@ public class IntentDetectionService {
}
}
- public void detectionProcess() {
+ public Intent detectionProcess(Intent intent) {
KnowledgeModule ownerKnowledgeModule = intentOwner.getKnowledgeModule();
- ownerKnowledgeModule.intentResolution();
- ownerKnowledgeModule.intentReportResolution();
- ownerKnowledgeModule.getSystemStatus();
- ownerKnowledgeModule.interactWithIntentOwner();
+ return ownerKnowledgeModule.intentCognition(intent);
}
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java
index 2dc740a..8c39066 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentInvestigationService.java
@@ -19,6 +19,8 @@ import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunct
import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.DecisionModule;
import org.springframework.stereotype.Service;
+import java.util.List;
+
@Service
public class IntentInvestigationService {
private IntentManagementFunction intentHandler;
@@ -33,13 +35,14 @@ public class IntentInvestigationService {
}
}
- public void investigationProcess() {
+ public List<IntentManagementFunction> investigationProcess() {
DecisionModule intentDecisionModule = intentOwner.getDecisionModule();
intentDecisionModule.needDecompostion();
intentDecisionModule.intentDecomposition();
intentDecisionModule.intentOrchestration();
intentDecisionModule.decideSuitableAction();
intentDecisionModule.exploreIntentHandlers();//返回handler
+ return null;
}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java
index aadbda0..5fa4b98 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentProcessService.java
@@ -15,14 +15,17 @@
*/
package org.onap.usecaseui.intentanalysis.intentBaseService.intentProcessService;
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import java.util.List;
+
@Service
public class IntentProcessService {
@Autowired
- IntentDetectionService intentDetectionServiceImpl;
+ IntentDetectionService intentDetectionService;
@Autowired
IntentInvestigationService intentInvestigationService;
@Autowired
@@ -44,25 +47,28 @@ public class IntentProcessService {
this.intentHandler= intentHandler;
}
}
- public void intentProcess() {
- intentDetectionServiceImpl.setIntentRole(intentOwner,intentHandler);
- intentDetectionServiceImpl.detectionProcess();
+ public void intentProcess(Intent intent) {
+ intentDetectionService.setIntentRole(intentOwner,intentHandler);
+ Intent detectIntent = intentDetectionService.detectionProcess(intent);
//investigation process
intentInvestigationService.setIntentRole(intentOwner,intentHandler);
- intentInvestigationService.investigationProcess();//List<handler>?
+ List<IntentManagementFunction> intentManagementFunctions =
+ intentInvestigationService.investigationProcess();//List<handler>?
- //definition process
- intentDefinitionService.setIntentRole(intentOwner,intentHandler);
- intentDefinitionService.definitionPorcess();
+ for (IntentManagementFunction intentHandler : intentManagementFunctions) {
+ //definition process
+ intentDefinitionService.setIntentRole(intentOwner,intentHandler);
+ intentDefinitionService.definitionPorcess();
- //distribution process
- intentDistributionService.setIntentRole(intentOwner,intentHandler);
- intentDistributionService.distributionProcess();
+ //distribution process
+ intentDistributionService.setIntentRole(intentOwner,intentHandler);
+ intentDistributionService.distributionProcess();
- //operation process
- intentOperationService.setIntentRole(intentOwner,intentHandler);
- intentOperationService.operationProcess();
+ //operation process
+ intentOperationService.setIntentRole(intentOwner,intentHandler);
+ intentOperationService.operationProcess();
+ }
}