aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/IntentFunctionType.java35
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportArea.java35
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportInterface.java36
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java35
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunction.java2
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java57
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java31
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java69
-rw-r--r--intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDistributionService.java1
9 files changed, 300 insertions, 1 deletions
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/IntentFunctionType.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/IntentFunctionType.java
new file mode 100644
index 0000000..93a5221
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/IntentFunctionType.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * * 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.bean.enums;
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+public enum IntentFunctionType {
+ INTERNALFUNCTION(0,"internalFunction"),
+ EXTERNALFUNCTION(1,"externalFunction");
+ private int type;
+ private String desc;
+
+ IntentFunctionType(int type, String desc) {
+ this.type = type;
+ this.desc = desc;
+ }
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportArea.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportArea.java
new file mode 100644
index 0000000..3cf08f7
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportArea.java
@@ -0,0 +1,35 @@
+/*
+ *
+ * * 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.bean.enums;
+
+import lombok.Getter;
+
+@Getter
+public enum SupportArea {
+ SLICING(0, "slicing"),
+ FEMALE(1, "5g"),
+ MALE(2, "4g");
+ private int type;
+ private String desc;
+
+
+ SupportArea(int type, String desc) {
+ this.type = type;
+ this.desc = desc;
+ }
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportInterface.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportInterface.java
new file mode 100644
index 0000000..2ae7262
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/SupportInterface.java
@@ -0,0 +1,36 @@
+/*
+ *
+ * * 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.bean.enums;
+
+import lombok.Getter;
+
+@Getter
+public enum SupportInterface {
+ //CREATE,DELETE,UPDATE,SEARCH;
+ CREATE(0,"CREATE"),
+ DELETE(1,"DELETE"),
+ UPDATE(2,"UPDATE"),
+ SEARCH(3,"SEARCH");
+ private int type;
+ private String name;
+ SupportInterface(int type, String name) {
+ this.type = type;
+ this.name = name;
+ }
+
+}
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/IntentManagerRegInfo.java
new file mode 100644
index 0000000..24ef19e
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentManagerRegInfo.java
@@ -0,0 +1,35 @@
+/*
+ * 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.bean.models;
+
+import lombok.Data;
+import org.onap.usecaseui.intentanalysis.bean.enums.IntentFunctionType;
+import org.onap.usecaseui.intentanalysis.bean.enums.SupportArea;
+import org.onap.usecaseui.intentanalysis.bean.enums.SupportInterface;
+
+import java.util.List;
+
+@Data
+public class IntentManagerRegInfo {
+ private String id;
+ private String description;
+ private List<SupportArea> supportArea;
+ private String supportModel;
+ private List<SupportInterface> supportInterfaces;
+ private String handleName;
+ private IntentFunctionType intentFunctionType;
+
+}
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 fc4696f..53e13e0 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
@@ -24,8 +24,10 @@ import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.Actuatio
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();
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
new file mode 100644
index 0000000..785a001
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentFunctionManageController.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * * 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.controller;
+
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@RestController
+@RequestMapping(value = "/intentFunctionManage")
+public class IntentFunctionManageController {
+ @Resource(name = "intentFunctionManageService")
+ IntentFunctionManageService intentFunctionManageService;
+
+ @PostMapping(produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity createIntentManage(@RequestBody IntentManagerRegInfo intentManage) {
+ return ResponseEntity.ok(intentFunctionManageService.createFunctionManage(intentManage));
+ }
+
+ @DeleteMapping(produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity deleteIntentManage(@PathVariable(value = "id") String id) {
+ return ResponseEntity.ok(intentFunctionManageService.deleteFunctionManage(id));
+ }
+
+ @PutMapping(value = "/{intentId}", produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity updateIntentManageById(
+ @PathVariable(value = "id") String id, @RequestBody IntentManagerRegInfo intentManage) {
+ return ResponseEntity.ok(intentFunctionManageService.updateIntentManageById(id, intentManage));
+ }
+
+ @GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity<List<IntentManagerRegInfo>> getIntentManageByID() {
+ return ResponseEntity.ok(intentFunctionManageService.getIntentManage());
+ }
+
+}
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
new file mode 100644
index 0000000..bccc416
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/IntentFunctionManageService.java
@@ -0,0 +1,31 @@
+/*
+ * 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.intentFunctionManageService;
+
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+
+import java.util.List;
+
+public interface IntentFunctionManageService {
+ int createFunctionManage(IntentManagerRegInfo intentManage) ;
+
+ int deleteFunctionManage(String id);
+
+ 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
new file mode 100644
index 0000000..71bf8fa
--- /dev/null
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentFunctionManageService/impl/IntentFunctionManageServiceImpl.java
@@ -0,0 +1,69 @@
+/*
+ * 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.intentFunctionManageService.impl;
+
+import org.onap.usecaseui.intentanalysis.bean.models.Intent;
+import org.onap.usecaseui.intentanalysis.bean.models.IntentManagerRegInfo;
+import org.onap.usecaseui.intentanalysis.intentBaseService.IntentManagementFunction;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentFunctionManageService.IntentFunctionManageService;
+import org.onap.usecaseui.intentanalysis.intentBaseService.intentModule.ActuationModule;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Service;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+@Service("intentFunctionManageService")
+public class IntentFunctionManageServiceImpl implements IntentFunctionManageService {
+ @Autowired
+ private ApplicationContext applicationContext;
+ @Override
+ public int createFunctionManage(IntentManagerRegInfo intentManage) {
+ return 0;
+ }
+
+ @Override
+ public int deleteFunctionManage(String id) {
+ return 0;
+ }
+
+ @Override
+ public int updateIntentManageById(String id, IntentManagerRegInfo intentManage) {
+ return 0;
+ }
+
+ @Override
+ public List<IntentManagerRegInfo> getIntentManage() {
+ return null;
+ }
+
+ public List<IntentManagementFunction> filterHandleFunction(IntentManagerRegInfo managementRegInfo) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {
+ String managetFunctionRegName =managementRegInfo.getHandleName();
+
+ IntentManagementFunction function =
+ (IntentManagementFunction)applicationContext.getBean(managetFunctionRegName);
+
+ ActuationModule actuationModule = function.getActuationModule();
+ actuationModule.sendToNonIntentHandler();
+ IntentManagementFunction intentManagementFunction =
+ (IntentManagementFunction) Class.forName(managetFunctionRegName)
+ .getDeclaredConstructor().newInstance();
+ ActuationModule actuationModule1 = intentManagementFunction.getActuationModule();
+ return null;
+ }
+
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDistributionService.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDistributionService.java
index eb58546..4622aa1 100644
--- a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDistributionService.java
+++ b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/intentBaseService/intentProcessService/IntentDistributionService.java
@@ -23,7 +23,6 @@ import org.springframework.stereotype.Service;
@Service
public class IntentDistributionService {
- @Autowired
private IntentManagementFunction intentHandler;
private IntentManagementFunction intentOwner;