Change all fulfilment/Fulfilment to fulfillment/Fulfillment 96/134496/2
authorxudan16 <xudan16@huawei.com>
Mon, 8 May 2023 08:15:05 +0000 (16:15 +0800)
committerxudan16 <xudan16@huawei.com>
Mon, 8 May 2023 08:34:05 +0000 (16:34 +0800)
In the previous patch, it has been changed to use fulfillment/Fulfillment.
However there are still some missing.
Change all to be the new word to keep it unify and avoid the confusion.

Issue-ID: USECASEUI-785
Signed-off-by: xudan16 <xudan16@huawei.com>
Change-Id: I5cf018248a6aba320e547c4a566ddbfab4781dae

34 files changed:
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/FulfillmentStatus.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/FulfilmentStatus.java with 92% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/enums/NotFulfilledState.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/Expectation.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/ExpectationTarget.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/FulfillmentInfo.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/FulfilmentInfo.java with 86% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/Intent.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/bean/models/IntentReport.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModule.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/controller/IntentReportController.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/mapper/FulfillmentInfoMapper.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/mapper/FulfilmentInfoMapper.java with 66% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/FulfillmentInfoService.java [moved from intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/FulfilmentInfoService.java with 63% similarity]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/ExpectationServiceImpl.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/ExpectationTargetServiceImpl.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfillmentInfoServiceImpl.java [new file with mode: 0644]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfilmentInfoServiceImpl.java [deleted file]
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/ImfRegInfoServiceImpl.java
intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/IntentServiceImpl.java
intentanalysis/src/main/resources/intent-analysis-init.sql
intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml [new file with mode: 0644]
intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml [deleted file]
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/bean/models/ExpectationTargetTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/bean/models/ExpectationTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/bean/models/FulfillmentInfoTest.java [moved from intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/bean/models/FulfilmentInfoTest.java with 76% similarity]
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/bean/models/IntentTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/CLLBusinessIntentManagementFunctionTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/cllBusinessIntentMgt/cllBusinessModule/CLLBusinessDecisionModuleTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/clldeliveryIntentmgt/clldeliverymodule/CLLDeliveryDecisionModuleTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/FormatIntentInputManagementFunctionTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/formatintentinputModule/FormatIntentInputDecisionModuleTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/formatintentinputMgt/formatintentinputModule/FormatIntentInputKnowledgeModuleTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/service/ExpectationServiceTest.java
intentanalysis/src/test/java/org/onap/usecaseui/intentanalysis/service/IntentServiceTest.java
intentanalysis/src/test/resources/intentdb-test-data.sql
intentanalysis/src/test/resources/intentdb-test-init.sql

@@ -20,7 +20,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 @Getter
-public enum FulfilmentStatus {
+public enum FulfillmentStatus {
     FULFILLED(0, "fulfilled"),
     NOT_FULFILLED(1, "not_fulfilled");
 
@@ -28,7 +28,7 @@ public enum FulfilmentStatus {
 
     private String desc;
 
-    FulfilmentStatus(int index, String desc) {
+    FulfillmentStatus(int index, String desc) {
         this.index = index;
         this.desc = desc;
     }
index efa3581..b99806b 100644 (file)
@@ -26,7 +26,7 @@ public enum NotFulfilledState {
     DEGRADED(2, "degraded"),
     SUSPENDED(3, "suspended"),
     TERMINATED(4, "terminated"),
-    FULFILMENTFAILED(5, "fulfilmentfailed");
+    FULFILMENTFAILED(5, "fulfillmentfailed");
 
     private int index;
 
index 7ebeec2..84c5a78 100644 (file)
@@ -40,5 +40,5 @@ public class Expectation {
 
     private List<Context> expectationContexts;
 
-    private FulfilmentInfo expectationFulfilmentInfo;
+    private FulfillmentInfo expectationFulfillmentInfo;
 }
 package org.onap.usecaseui.intentanalysis.bean.models;
 
 import lombok.Data;
-import org.onap.usecaseui.intentanalysis.bean.enums.FulfilmentStatus;
+import org.onap.usecaseui.intentanalysis.bean.enums.FulfillmentStatus;
 import org.onap.usecaseui.intentanalysis.bean.enums.NotFulfilledState;
 
 @Data
 
-public class FulfilmentInfo {
+public class FulfillmentInfo {
     private String fulfillmentId;
 
-    private FulfilmentStatus fulfillmentStatus;
+    private FulfillmentStatus fulfillmentStatus;
 
     private NotFulfilledState notFulfilledState;
 
index 46c4acb..9b6c9d7 100644 (file)
@@ -33,7 +33,7 @@ public class Intent {
 
     private List<Context> intentContexts;
 
-    private FulfilmentInfo intentFulfilmentInfo;
+    private FulfillmentInfo intentFulfillmentInfo;
 
     private IntentGenerateType intentGenerateType;
 
index 016fb66..5dfc7a8 100644 (file)
@@ -24,7 +24,7 @@ import java.util.List;
 public class IntentReport {
     private String intentReportId;
     private String intentReference;
-    private List<FulfilmentInfo> fulfillmentInfos;
+    private List<FulfillmentInfo> fulfillmentInfos;
     private List<String> objectInstance;
     private Date reportTime;
 }
index 4ec76e7..9975ef3 100644 (file)
@@ -108,7 +108,7 @@ public class CLLBusinessDecisionModule extends DecisionModule {
                 subIntent.setIntentName(objEntry.getValue().get(0).getExpectationName().replace("Expectation", "Intent"));
                 subIntent.setIntentExpectations(objEntry.getValue());
                 subIntent.setIntentGenerateType(IntentGenerateType.SYSTEMGENARATE);
-                //TODO      intentFulfilmentInfo intentContexts
+                //TODO      intentFulfillmentInfo intentContexts
                 subIntentGoalBean.setIntentGoalType(intentGoalType);
                 subIntentGoalBean.setIntent(subIntent);
                 subIntentGoalList.add(subIntentGoalBean);
index 4d7369f..a4dbb45 100644 (file)
@@ -16,7 +16,7 @@
 package org.onap.usecaseui.intentanalysis.controller;
 
 import lombok.extern.log4j.Log4j2;
-import org.onap.usecaseui.intentanalysis.bean.enums.FulfilmentStatus;
+import org.onap.usecaseui.intentanalysis.bean.enums.FulfillmentStatus;
 import org.onap.usecaseui.intentanalysis.bean.enums.NotFulfilledState;
 import org.onap.usecaseui.intentanalysis.bean.models.*;
 import org.springframework.http.MediaType;
@@ -51,15 +51,15 @@ public class IntentReportController {
         //report.setFulfillmentInfos();
         LocalDateTime now = LocalDateTime.now();
         report.setReportTime(Date.from( now.atZone( ZoneId.systemDefault()).toInstant()));
-        FulfilmentInfo fu1= new FulfilmentInfo();
-        fu1.setFulfillmentId("fulfilmentInfo1");
-        fu1.setFulfillmentStatus(FulfilmentStatus.FULFILLED);
-        FulfilmentInfo fu2= new FulfilmentInfo();
-        fu2.setFulfillmentId("fulfilmentInfo2");
-        fu2.setFulfillmentStatus(FulfilmentStatus.NOT_FULFILLED);
+        FulfillmentInfo fu1= new FulfillmentInfo();
+        fu1.setFulfillmentId("fulfillmentInfo1");
+        fu1.setFulfillmentStatus(FulfillmentStatus.FULFILLED);
+        FulfillmentInfo fu2= new FulfillmentInfo();
+        fu2.setFulfillmentId("fulfillmentInfo2");
+        fu2.setFulfillmentStatus(FulfillmentStatus.NOT_FULFILLED);
         fu2.setNotFulfilledState(NotFulfilledState.DEGRADED);
         fu2.setNotFulfilledReason("not fulfilled Reason");
-        List<FulfilmentInfo> list = new ArrayList<>();
+        List<FulfillmentInfo> list = new ArrayList<>();
         list.add(fu1);
         list.add(fu2);
         report.setFulfillmentInfos(list);
@@ -19,19 +19,19 @@ package org.onap.usecaseui.intentanalysis.mapper;
 
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
-import org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo;
 
 
 @Mapper
-public interface FulfilmentInfoMapper {
+public interface FulfillmentInfoMapper {
 
-    int insertFulfilmentInfo(@Param(value = "fulfilmentInfo") FulfilmentInfo fulfilmentInfo,
+    int insertFulfillmentInfo(@Param(value = "fulfillmentInfo") FulfillmentInfo fulfillmentInfo,
                               @Param(value = "parentId") String parentId);
 
-    FulfilmentInfo selectFulfilmentInfo(@Param(value = "parentId") String parentId);
+    FulfillmentInfo selectFulfillmentInfo(@Param(value = "parentId") String parentId);
 
-    int updateFulfilmentInfo(@Param(value = "fulfilmentInfo") FulfilmentInfo fulfilmentInfo,
+    int updateFulfillmentInfo(@Param(value = "fulfillmentInfo") FulfillmentInfo fulfillmentInfo,
                              @Param(value = "parentId") String parentId);
 
-    int deleteFulfilmentInfo(@Param(value = "parentId") String parentId);
+    int deleteFulfillmentInfo(@Param(value = "parentId") String parentId);
 }
 
 package org.onap.usecaseui.intentanalysis.service;
 
-import org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo;
 
-public interface FulfilmentInfoService {
+public interface FulfillmentInfoService {
 
-    void createFulfilmentInfo(FulfilmentInfo fulfilmentInfo, String parentId);
+    void createFulfillmentInfo(FulfillmentInfo fulfillmentInfo, String parentId);
 
-    void deleteFulfilmentInfo(String parentId);
+    void deleteFulfillmentInfo(String parentId);
 
-    void updateFulfilmentInfo(FulfilmentInfo fulfilmentInfo, String parentId);
+    void updateFulfillmentInfo(FulfillmentInfo fulfillmentInfo, String parentId);
 
-    FulfilmentInfo getFulfilmentInfo(String parentId);
+    FulfillmentInfo getFulfillmentInfo(String parentId);
 }
index 7052ed3..31329b3 100644 (file)
@@ -32,7 +32,7 @@ import org.onap.usecaseui.intentanalysis.service.ContextService;
 import org.onap.usecaseui.intentanalysis.service.ExpectationService;
 import org.onap.usecaseui.intentanalysis.service.ExpectationObjectService;
 import org.onap.usecaseui.intentanalysis.service.ExpectationTargetService;
-import org.onap.usecaseui.intentanalysis.service.FulfilmentInfoService;
+import org.onap.usecaseui.intentanalysis.service.FulfillmentInfoService;
 import org.springframework.util.CollectionUtils;
 
 
@@ -56,7 +56,7 @@ public class ExpectationServiceImpl implements ExpectationService {
     private ContextService contextService;
 
     @Autowired
-    private FulfilmentInfoService fulfilmentInfoService;
+    private FulfillmentInfoService fulfillmentInfoService;
 
     private ContextParentType contextParentType;
 
@@ -70,7 +70,7 @@ public class ExpectationServiceImpl implements ExpectationService {
                 expectationTargetService.createExpectationTargetList(expectation.getExpectationTargets(),
                         expectationId);
                 contextService.createContextList(expectation.getExpectationContexts(), expectationId);
-                fulfilmentInfoService.createFulfilmentInfo(expectation.getExpectationFulfilmentInfo(),
+                fulfillmentInfoService.createFulfillmentInfo(expectation.getExpectationFulfillmentInfo(),
                         expectationId);
             }
         }
@@ -90,7 +90,7 @@ public class ExpectationServiceImpl implements ExpectationService {
                 expectation.getExpectationId());
         contextService.createContextList(expectation.getExpectationContexts(),
                 expectation.getExpectationId());
-        fulfilmentInfoService.createFulfilmentInfo(expectation.getExpectationFulfilmentInfo(),
+        fulfillmentInfoService.createFulfillmentInfo(expectation.getExpectationFulfillmentInfo(),
                 expectation.getExpectationId());
 
         if (expectationMapper.insertIntentExpectation(expectation, intentId) < 1) {
@@ -110,7 +110,7 @@ public class ExpectationServiceImpl implements ExpectationService {
                 expectation.setExpectationObject(expectationObjectService.getExpectationObject(expectationId));
                 expectation.setExpectationTargets(expectationTargetService.getExpectationTargetList(expectationId));
                 expectation.setExpectationContexts(contextService.getContextList(expectationId));
-                expectation.setExpectationFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(expectationId));
+                expectation.setExpectationFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(expectationId));
             }
         } else {
             log.info(String.format("Expectation list is null, intentId = %s", intentId));
@@ -125,7 +125,7 @@ public class ExpectationServiceImpl implements ExpectationService {
             expectation.setExpectationObject(expectationObjectService.getExpectationObject(expectationId));
             expectation.setExpectationTargets(expectationTargetService.getExpectationTargetList(expectationId));
             expectation.setExpectationContexts(contextService.getContextList(expectationId));
-            expectation.setExpectationFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(expectationId));
+            expectation.setExpectationFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(expectationId));
         } else {
             log.info(String.format("Expectation is null, expectationId = %s", expectationId));
         }
@@ -150,7 +150,7 @@ public class ExpectationServiceImpl implements ExpectationService {
                     expectationObjectService.updateExpectationObject(expectation.getExpectationObject(), expectation.getExpectationId());
                     expectationTargetService.updateExpectationTargetList(expectation.getExpectationTargets(), expectation.getExpectationId());
                     contextService.updateContextList(expectation.getExpectationContexts(), expectation.getExpectationId());
-                    fulfilmentInfoService.updateFulfilmentInfo(expectation.getExpectationFulfilmentInfo(), expectation.getExpectationId());
+                    fulfillmentInfoService.updateFulfillmentInfo(expectation.getExpectationFulfillmentInfo(), expectation.getExpectationId());
                     if (expectationMapper.updateIntentExpectation(expectation) < 1) {
                         String msg = "Failed to update expectation to database.";
                         log.error(msg);
@@ -176,7 +176,7 @@ public class ExpectationServiceImpl implements ExpectationService {
             expectationObjectService.deleteExpectationObject(expectationId);
             expectationTargetService.deleteExpectationTargetList(expectationId);
             contextService.deleteContextList(expectationId);
-            fulfilmentInfoService.deleteFulfilmentInfo(expectationId);
+            fulfillmentInfoService.deleteFulfillmentInfo(expectationId);
             if (expectationMapper.deleteIntentExpectation(expectationId) < 1) {
                 String msg = "Failed to delete expectation to database.";
                 log.error(msg);
@@ -196,7 +196,7 @@ public class ExpectationServiceImpl implements ExpectationService {
                 expectationObjectService.deleteExpectationObject(expectationId);
                 expectationTargetService.deleteExpectationTargetList(expectationId);
                 contextService.deleteContextList(expectationId);
-                fulfilmentInfoService.deleteFulfilmentInfo(expectationId);
+                fulfillmentInfoService.deleteFulfillmentInfo(expectationId);
             }
             if (expectationMapper.deleteIntentExpectationList(intentId) < 1) {
                 String msg = "Failed to delete expectation list to database.";
index 1dff5a7..7dcce03 100644 (file)
@@ -32,7 +32,7 @@ import org.onap.usecaseui.intentanalysis.bean.models.ExpectationTarget;
 import org.onap.usecaseui.intentanalysis.mapper.ExpectationTargetMapper;
 import org.onap.usecaseui.intentanalysis.service.ContextService;
 import org.onap.usecaseui.intentanalysis.service.ExpectationTargetService;
-import org.onap.usecaseui.intentanalysis.service.FulfilmentInfoService;
+import org.onap.usecaseui.intentanalysis.service.FulfillmentInfoService;
 import org.springframework.util.CollectionUtils;
 
 
@@ -51,7 +51,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
     private ExpectationTargetService expectationTargetService;
 
     @Autowired
-    private FulfilmentInfoService fulfilmentInfoService;
+    private FulfillmentInfoService fulfillmentInfoService;
 
     @Autowired
     private ContextService contextService;
@@ -63,7 +63,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
     public void createExpectationTarget(ExpectationTarget expectationTarget, String expectationId) {
         String expectationTargetId = expectationTarget.getTargetId();
         contextService.createContextList(expectationTarget.getTargetContexts(), expectationTargetId);
-        fulfilmentInfoService.createFulfilmentInfo(expectationTarget.getTargetFulfilmentInfo(),
+        fulfillmentInfoService.createFulfillmentInfo(expectationTarget.getTargetFulfillmentInfo(),
                 expectationTargetId);
         conditionService.createConditionList(expectationTarget.getTargetConditions(), expectationTargetId);
         if (expectationTargetMapper.insertExpectationTarget(expectationTarget, expectationId) < 1) {
@@ -81,7 +81,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
             for (ExpectationTarget expectationTarget : expectationTargetList) {
                 String expectationTargetId = expectationTarget.getTargetId();
                 contextService.createContextList(expectationTarget.getTargetContexts(), expectationTargetId);
-                fulfilmentInfoService.createFulfilmentInfo(expectationTarget.getTargetFulfilmentInfo(),
+                fulfillmentInfoService.createFulfillmentInfo(expectationTarget.getTargetFulfillmentInfo(),
                         expectationTargetId);
                 conditionService.createConditionList(expectationTarget.getTargetConditions(), expectationTargetId);
             }
@@ -103,7 +103,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
                 String expectationTargetId = expectationTarget.getTargetId();
                 expectationTarget.setTargetConditions(conditionService.getConditionList(expectationTargetId));
                 expectationTarget.setTargetContexts(contextService.getContextList(expectationTargetId));
-                expectationTarget.setTargetFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(expectationTargetId));
+                expectationTarget.setTargetFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(expectationTargetId));
             }
         } else {
             log.info(String.format("Expectation target list is null, expectationId = %s", expectationId));
@@ -118,7 +118,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
         if (expectationTarget != null) {
             expectationTarget.setTargetConditions(conditionService.getConditionList(expectationTargetId));
             expectationTarget.setTargetContexts(contextService.getContextList(expectationTargetId));
-            expectationTarget.setTargetFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(expectationTargetId));
+            expectationTarget.setTargetFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(expectationTargetId));
         } else {
             log.info(String.format("Expectation target is null, expectationTargetId = %s", expectationTargetId));
         }
@@ -142,7 +142,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
                 String expectationTargetId = expectationTarget.getTargetId();
                 if (expectationTargetIdListFromDB.contains(expectationTargetId)) {
                     contextService.updateContextList(expectationTarget.getTargetContexts(), expectationTargetId);
-                    fulfilmentInfoService.updateFulfilmentInfo(expectationTarget.getTargetFulfilmentInfo(), expectationTargetId);
+                    fulfillmentInfoService.updateFulfillmentInfo(expectationTarget.getTargetFulfillmentInfo(), expectationTargetId);
                     conditionService.updateConditionList(expectationTarget.getTargetConditions(), expectationTargetId);
                     if (expectationTargetMapper.updateExpectationTarget(expectationTarget, expectationTargetId) < 1) {
                         String msg = "Failed to update expectation target list to database.";
@@ -167,7 +167,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
         ExpectationTarget expectationTarget = expectationTargetService.getExpectationTarget(expectationTargetId);
         if (expectationTarget != null) {
             contextService.deleteContextList(expectationTargetId);
-            fulfilmentInfoService.deleteFulfilmentInfo(expectationTargetId);
+            fulfillmentInfoService.deleteFulfillmentInfo(expectationTargetId);
             conditionService.deleteConditionList(expectationTargetId);
             if (expectationTargetMapper.deleteExpectationTarget(expectationTargetId) < 1) {
                 String msg = "Failed to delete expectation target to database.";
@@ -185,7 +185,7 @@ public class ExpectationTargetServiceImpl implements ExpectationTargetService {
             for (ExpectationTarget expectationTarget : expectationTargetList) {
                 String expectationTargetId = expectationTarget.getTargetId();
                 contextService.deleteContextList(expectationTargetId);
-                fulfilmentInfoService.deleteFulfilmentInfo(expectationTargetId);
+                fulfillmentInfoService.deleteFulfillmentInfo(expectationTargetId);
                 conditionService.deleteConditionList(expectationTargetId);
             }
             if (expectationTargetMapper.deleteExpectationTargetList(expectationId) < 1) {
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfillmentInfoServiceImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfillmentInfoServiceImpl.java
new file mode 100644 (file)
index 0000000..6a72aea
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+ * Copyright 2022 Huawei Technologies Co., Ltd.
+ *
+ * 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.service.impl;
+
+
+import org.onap.usecaseui.intentanalysis.common.ResponseConsts;
+import org.onap.usecaseui.intentanalysis.exception.DataBaseException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo;
+import org.onap.usecaseui.intentanalysis.mapper.FulfillmentInfoMapper;
+import org.onap.usecaseui.intentanalysis.service.FulfillmentInfoService;
+import lombok.extern.slf4j.Slf4j;
+
+
+@Service
+@Slf4j
+public class FulfillmentInfoServiceImpl implements FulfillmentInfoService {
+
+    @Autowired
+    private FulfillmentInfoMapper fulfillmentInfoMapper;
+
+    @Autowired
+    private FulfillmentInfoService fulfillmentInfoService;
+
+    @Override
+    public void createFulfillmentInfo(FulfillmentInfo fulfillmentInfo, String parentId) {
+        if (fulfillmentInfo != null) {
+            if (fulfillmentInfoMapper.insertFulfillmentInfo(fulfillmentInfo, parentId) < 1) {
+                String msg = "Failed to create fulfillment info to database.";
+                log.error(msg);
+                throw new DataBaseException(msg, ResponseConsts.RET_INSERT_DATA_FAIL);
+            }
+            log.info("Successfully created fulfillment info to database.");
+        }
+    }
+
+    @Override
+    public void deleteFulfillmentInfo(String parentId) {
+        if (fulfillmentInfoService.getFulfillmentInfo(parentId) != null) {
+            if (fulfillmentInfoMapper.deleteFulfillmentInfo(parentId) < 1) {
+                String msg = "Failed to delete fulfillment info to database.";
+                log.error(msg);
+                throw new DataBaseException(msg, ResponseConsts.RET_DELETE_DATA_FAIL);
+            }
+            log.info("Successfully deleted fulfillment info to database.");
+        }
+    }
+
+    @Override
+    public void updateFulfillmentInfo(FulfillmentInfo fulfillmentInfo, String parentId) {
+
+        FulfillmentInfo fulfillmentInfoDB = fulfillmentInfoService.getFulfillmentInfo(parentId);
+        if (fulfillmentInfoDB == null && fulfillmentInfo != null) {
+            fulfillmentInfoService.createFulfillmentInfo(fulfillmentInfo, parentId);
+        } else if (fulfillmentInfoDB != null && fulfillmentInfo == null) {
+            fulfillmentInfoService.deleteFulfillmentInfo(parentId);
+        } else if (fulfillmentInfoDB != null) {
+            if (fulfillmentInfoMapper.updateFulfillmentInfo(fulfillmentInfo, parentId) < 1) {
+                String msg = "Failed to update fulfillment info to database.";
+                log.error(msg);
+                throw new DataBaseException(msg, ResponseConsts.RET_UPDATE_DATA_FAIL);
+            }
+            log.info("Successfully updated fulfillment info to database.");
+        }
+    }
+
+    @Override
+    public FulfillmentInfo getFulfillmentInfo(String parentId) {
+        FulfillmentInfo fulfillmentInfo = fulfillmentInfoMapper.selectFulfillmentInfo(parentId);
+        if (fulfillmentInfo == null) {
+            log.info(String.format("FulfillmentInfo is null, parentId = %s", parentId));
+        }
+        return fulfillmentInfo;
+    }
+}
diff --git a/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfilmentInfoServiceImpl.java b/intentanalysis/src/main/java/org/onap/usecaseui/intentanalysis/service/impl/FulfilmentInfoServiceImpl.java
deleted file mode 100644 (file)
index 0b2c20d..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright 2022 Huawei Technologies Co., Ltd.
- *
- * 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.service.impl;
-
-
-import org.onap.usecaseui.intentanalysis.common.ResponseConsts;
-import org.onap.usecaseui.intentanalysis.exception.DataBaseException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo;
-import org.onap.usecaseui.intentanalysis.mapper.FulfilmentInfoMapper;
-import org.onap.usecaseui.intentanalysis.service.FulfilmentInfoService;
-import lombok.extern.slf4j.Slf4j;
-
-
-@Service
-@Slf4j
-public class FulfilmentInfoServiceImpl implements FulfilmentInfoService {
-
-    @Autowired
-    private FulfilmentInfoMapper fulfilmentInfoMapper;
-
-    @Autowired
-    private FulfilmentInfoService fulfilmentInfoService;
-
-    @Override
-    public void createFulfilmentInfo(FulfilmentInfo fulfilmentInfo, String parentId) {
-        if (fulfilmentInfo != null) {
-            if (fulfilmentInfoMapper.insertFulfilmentInfo(fulfilmentInfo, parentId) < 1) {
-                String msg = "Failed to create fulfilment info to database.";
-                log.error(msg);
-                throw new DataBaseException(msg, ResponseConsts.RET_INSERT_DATA_FAIL);
-            }
-            log.info("Successfully created fulfilment info to database.");
-        }
-    }
-
-    @Override
-    public void deleteFulfilmentInfo(String parentId) {
-        if (fulfilmentInfoService.getFulfilmentInfo(parentId) != null) {
-            if (fulfilmentInfoMapper.deleteFulfilmentInfo(parentId) < 1) {
-                String msg = "Failed to delete fulfilment info to database.";
-                log.error(msg);
-                throw new DataBaseException(msg, ResponseConsts.RET_DELETE_DATA_FAIL);
-            }
-            log.info("Successfully deleted fulfilment info to database.");
-        }
-    }
-
-    @Override
-    public void updateFulfilmentInfo(FulfilmentInfo fulfilmentInfo, String parentId) {
-
-        FulfilmentInfo fulfillmentInfoDB = fulfilmentInfoService.getFulfilmentInfo(parentId);
-        if (fulfillmentInfoDB == null && fulfilmentInfo != null) {
-            fulfilmentInfoService.createFulfilmentInfo(fulfilmentInfo, parentId);
-        } else if (fulfillmentInfoDB != null && fulfilmentInfo == null) {
-            fulfilmentInfoService.deleteFulfilmentInfo(parentId);
-        } else if (fulfillmentInfoDB != null) {
-            if (fulfilmentInfoMapper.updateFulfilmentInfo(fulfilmentInfo, parentId) < 1) {
-                String msg = "Failed to update fulfilment info to database.";
-                log.error(msg);
-                throw new DataBaseException(msg, ResponseConsts.RET_UPDATE_DATA_FAIL);
-            }
-            log.info("Successfully updated fulfilment info to database.");
-        }
-    }
-
-    @Override
-    public FulfilmentInfo getFulfilmentInfo(String parentId) {
-        FulfilmentInfo fulfilmentInfo = fulfilmentInfoMapper.selectFulfilmentInfo(parentId);
-        if (fulfilmentInfo == null) {
-            log.info(String.format("FulfilmentInfo is null, parentId = %s", parentId));
-        }
-        return fulfilmentInfo;
-    }
-}
index eaa1f58..e9fcbe4 100644 (file)
@@ -84,7 +84,7 @@ public class ImfRegInfoServiceImpl implements ImfRegInfoService {
             log.error(msg,intentName);
             throw new IntentInputException(msg, ResponseConsts.RET_FIND_CORRESPONDING_FAIL);
         }
-        //TODO call probe  interface  if fail  intentFulfilmentInfo throw exception
+        //TODO call probe  interface  if fail  intentFulfillmentInfo throw exception
         return imfList.get(0);
     }
 }
\ No newline at end of file
index 8656587..10fd059 100644 (file)
@@ -36,7 +36,7 @@ import org.onap.usecaseui.intentanalysis.exception.DataBaseException;
 import org.onap.usecaseui.intentanalysis.mapper.IntentMapper;
 import org.onap.usecaseui.intentanalysis.service.ContextService;
 import org.onap.usecaseui.intentanalysis.service.ExpectationService;
-import org.onap.usecaseui.intentanalysis.service.FulfilmentInfoService;
+import org.onap.usecaseui.intentanalysis.service.FulfillmentInfoService;
 import org.onap.usecaseui.intentanalysis.service.IntentService;
 
 
@@ -56,7 +56,7 @@ public class IntentServiceImpl implements IntentService {
     private ContextParentType contextParentType;
 
     @Autowired
-    private FulfilmentInfoService fulfilmentInfoService;
+    private FulfillmentInfoService fulfillmentInfoService;
 
     @Autowired
     private IntentService intentService;
@@ -71,7 +71,7 @@ public class IntentServiceImpl implements IntentService {
         }
         expectationService.createIntentExpectationList(intent.getIntentExpectations(), intent.getIntentId());
         contextService.createContextList(intent.getIntentContexts(), intent.getIntentId());
-        fulfilmentInfoService.createFulfilmentInfo(intent.getIntentFulfilmentInfo(), intent.getIntentId());
+        fulfillmentInfoService.createFulfillmentInfo(intent.getIntentFulfillmentInfo(), intent.getIntentId());
         log.info("Successfully created intent to database.");
         return intent;
     }
@@ -94,7 +94,7 @@ public class IntentServiceImpl implements IntentService {
         if (intent != null) {
             intent.setIntentExpectations(expectationService.getIntentExpectationList(intentId));
             intent.setIntentContexts(contextService.getContextList(intentId));
-            intent.setIntentFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(intentId));
+            intent.setIntentFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(intentId));
         } else {
             log.info(String.format("Intent is null, intentId = %s", intentId));
         }
@@ -112,7 +112,7 @@ public class IntentServiceImpl implements IntentService {
         }
         expectationService.updateIntentExpectationList(intent.getIntentExpectations(), intentId);
         contextService.updateContextList(intent.getIntentContexts(), intentId);
-        fulfilmentInfoService.updateFulfilmentInfo(intent.getIntentFulfilmentInfo(), intentId);
+        fulfillmentInfoService.updateFulfillmentInfo(intent.getIntentFulfillmentInfo(), intentId);
         if (intentMapper.updateIntent(intent) < 1) {
             String msg = "Failed to update intent to database.";
             log.error(msg);
@@ -130,7 +130,7 @@ public class IntentServiceImpl implements IntentService {
             log.error(msg);
             throw new DataBaseException(msg, ResponseConsts.RET_QUERY_DATA_EMPTY);
         }
-        fulfilmentInfoService.deleteFulfilmentInfo(intentId);
+        fulfillmentInfoService.deleteFulfillmentInfo(intentId);
         contextService.deleteContextList(intentId);
         expectationService.deleteIntentExpectationList(intentId);
         if (intentMapper.deleteIntent(intentId) < 1) {
@@ -148,7 +148,7 @@ public class IntentServiceImpl implements IntentService {
             for (Intent intent : intentList) {
                 intent.setIntentExpectations(expectationService.getIntentExpectationList(intent.getIntentId()));
                 intent.setIntentContexts(contextService.getContextList(intent.getIntentId()));
-                intent.setIntentFulfilmentInfo(fulfilmentInfoService.getFulfilmentInfo(intent.getIntentId()));
+                intent.setIntentFulfillmentInfo(fulfillmentInfoService.getFulfillmentInfo(intent.getIntentId()));
             }
 
         } else {
index 4c985e4..4a349e7 100644 (file)
@@ -39,9 +39,9 @@ create table if not exists context_mapping(
     parent_id varchar(255)
 );
 
-create table if not exists fulfilment_info(
-    fulfilment_info_id varchar(255) primary key,
-    fulfilment_info_status varchar(255),
+create table if not exists fulfillment_info(
+    fulfillment_info_id varchar(255) primary key,
+    fulfillment_info_status varchar(255),
     not_fulfilled_state varchar(255),
     not_fulfilled_reason varchar(255)
 );
diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfillmentInfoMapper.xml
new file mode 100644 (file)
index 0000000..5aa65c5
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.onap.usecaseui.intentanalysis.mapper.FulfillmentInfoMapper">
+
+
+    <insert id="insertFulfillmentInfo">
+        insert into fulfillment_info(fulfillment_info_id, fulfillment_info_status, not_fulfilled_state, not_fulfilled_reason)
+        values (#{parentId}, #{fulfillmentInfo.fulfillmentStatus}, #{fulfillmentInfo.notFulfilledState}, #{fulfillmentInfo.notFulfilledReason})
+    </insert>
+
+    <select id="selectFulfillmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo">
+        select fulfillment_info_status fulfillmentStatus, not_fulfilled_state notFulfilledState,
+               not_fulfilled_reason notFulfilledReason
+        from fulfillment_info
+        where fulfillment_info_id = #{parentId}
+    </select>
+
+    <update id="updateFulfillmentInfo">
+        update fulfillment_info
+        <trim prefix="set" suffixOverrides=",">
+            <if test="fulfillmentInfo.fulfillmentStatus != null">fulfillment_info_status = #{fulfillmentInfo.fulfillmentStatus},</if>
+            <if test="fulfillmentInfo.notFulfilledState != null">not_fulfilled_state = #{fulfillmentInfo.notFulfilledState},</if>
+            <if test="fulfillmentInfo.notFulfilledReason != null">not_fulfilled_reason = #{fulfillmentInfo.notFulfilledReason},</if>
+        </trim>
+        where fulfillment_info_id = #{parentId}
+    </update>
+
+    <delete id="deleteFulfillmentInfo" parameterType="string">
+        delete from fulfillment_info
+        where fulfillment_info_id = #{parentId}
+    </delete>
+</mapper>
diff --git a/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml b/intentanalysis/src/main/resources/mybatis/sql/FulfilmentInfoMapper.xml
deleted file mode 100644 (file)
index d9b9f7f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.onap.usecaseui.intentanalysis.mapper.FulfilmentInfoMapper">
-
-
-    <insert id="insertFulfilmentInfo">
-        insert into fulfilment_info(fulfilment_info_id, fulfilment_info_status, not_fulfilled_state, not_fulfilled_reason)
-        values (#{parentId}, #{fulfilmentInfo.fulfilmentStatus}, #{fulfilmentInfo.notFulfilledState}, #{fulfilmentInfo.notFulfilledReason})
-    </insert>
-
-    <select id="selectFulfilmentInfo" resultType="org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo">
-        select fulfilment_info_status fulfilmentStatus, not_fulfilled_state notFulfilledState,
-               not_fulfilled_reason notFulfilledReason
-        from fulfilment_info
-        where fulfilment_info_id = #{parentId}
-    </select>
-
-    <update id="updateFulfilmentInfo">
-        update fulfilment_info
-        <trim prefix="set" suffixOverrides=",">
-            <if test="fulfilmentInfo.fulfilmentStatus != null">fulfilment_info_status = #{fulfilmentInfo.fulfilmentStatus},</if>
-            <if test="fulfilmentInfo.notFulfilledState != null">not_fulfilled_state = #{fulfilmentInfo.notFulfilledState},</if>
-            <if test="fulfilmentInfo.notFulfilledReason != null">not_fulfilled_reason = #{fulfilmentInfo.notFulfilledReason},</if>
-        </trim>
-        where fulfilment_info_id = #{parentId}
-    </update>
-
-    <delete id="deleteFulfilmentInfo" parameterType="string">
-        delete from fulfilment_info
-        where fulfilment_info_id = #{parentId}
-    </delete>
-</mapper>
index e879b11..7a64302 100644 (file)
@@ -40,7 +40,7 @@ public class ExpectationTargetTest {
         test.getExpectationObject();
         test.getExpectationTargets();
         test.getExpectationContexts();
-        test.getExpectationFulfilmentInfo();
+        test.getExpectationFulfillmentInfo();
     }
 
     @Test
@@ -52,6 +52,6 @@ public class ExpectationTargetTest {
         test.setExpectationObject(new ExpectationObject());
         test.setExpectationTargets(new ArrayList<>());
         test.setExpectationContexts(new ArrayList<>());
-        test.setExpectationFulfilmentInfo(new FulfilmentInfo());
+        test.setExpectationFulfillmentInfo(new FulfillmentInfo());
     }
 }
index a3c2a09..5c87ac5 100644 (file)
@@ -38,7 +38,7 @@ public class ExpectationTest {
         test.getExpectationContexts();
         test.getExpectationName();
         test.getExpectationType();
-        test.getExpectationFulfilmentInfo();
+        test.getExpectationFulfillmentInfo();
         test.getExpectationObject();
         test.getExpectationTargets();
     }
@@ -51,7 +51,7 @@ public class ExpectationTest {
         test.setExpectationName("");
         test.setExpectationTargets(new ArrayList<ExpectationTarget>());
         test.setExpectationType(ExpectationType.ASSURANCE);
-        test.setExpectationFulfilmentInfo(new FulfilmentInfo());
+        test.setExpectationFulfillmentInfo(new FulfillmentInfo());
         test.setExpectationObject(new ExpectationObject());
     }
 }
@@ -18,10 +18,10 @@ package org.onap.usecaseui.intentanalysis.bean.models;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.onap.usecaseui.intentanalysis.bean.enums.FulfilmentStatus;
+import org.onap.usecaseui.intentanalysis.bean.enums.FulfillmentStatus;
 import org.onap.usecaseui.intentanalysis.bean.enums.NotFulfilledState;
 
-public class FulfilmentInfoTest {
+public class FulfillmentInfoTest {
     @Before
     public void before() throws Exception {
     }
@@ -31,8 +31,8 @@ public class FulfilmentInfoTest {
     }
 
     @Test
-    public void testGetFulfilmentInfoTest() {
-        FulfilmentInfo test = new FulfilmentInfo();
+    public void testGetFulfillmentInfoTest() {
+        FulfillmentInfo test = new FulfillmentInfo();
         test.getFulfillmentStatus();
         test.getNotFulfilledState();
         test.getNotFulfilledReason();
@@ -40,9 +40,9 @@ public class FulfilmentInfoTest {
     }
 
     @Test
-    public void testSetFulfilmentInfoTest() {
-        FulfilmentInfo test = new FulfilmentInfo();
-        test.setFulfillmentStatus(FulfilmentStatus.FULFILLED);
+    public void testSetFulfillmentInfoTest() {
+        FulfillmentInfo test = new FulfillmentInfo();
+        test.setFulfillmentStatus(FulfillmentStatus.FULFILLED);
         test.setNotFulfilledState(NotFulfilledState.ACKNOWLEDGED);
         test.setNotFulfilledReason("");
 
index 33609e9..65e29df 100644 (file)
@@ -37,7 +37,7 @@ public class IntentTest {
         test.getIntentName();
         test.getIntentExpectations();
         test.getIntentContexts();
-        test.getIntentFulfilmentInfo();
+        test.getIntentFulfillmentInfo();
     }
 
     @Test
@@ -47,6 +47,6 @@ public class IntentTest {
         test.setIntentName("");
         test.setIntentExpectations(new ArrayList<Expectation>());
         test.setIntentContexts(new ArrayList<Context>());
-        test.setIntentFulfilmentInfo(new FulfilmentInfo());
+        test.setIntentFulfillmentInfo(new FulfillmentInfo());
     }
 }
index 055ac2e..f8332fe 100644 (file)
@@ -92,7 +92,7 @@ public class CLLBusinessIntentManagementFunctionTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
 
@@ -102,7 +102,7 @@ public class CLLBusinessIntentManagementFunctionTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
         expectationList.add(assurance);
 
index a7a997b..d6bbe1f 100644 (file)
@@ -72,7 +72,7 @@ public class CLLBusinessDecisionModuleTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
 
@@ -82,7 +82,7 @@ public class CLLBusinessDecisionModuleTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
         expectationList.add(assurance);
 
index ce0823e..4b75322 100644 (file)
@@ -54,7 +54,7 @@ public class CLLDeliveryDecisionModuleTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
 
         List<ExpectationTarget> expectationTargetList = new ArrayList<>();
         ExpectationTarget expectationTarget = new ExpectationTarget();
@@ -80,7 +80,7 @@ public class CLLDeliveryDecisionModuleTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
         expectationList.add(assurance);
 
index 9aba940..483508a 100644 (file)
@@ -85,7 +85,7 @@ public class FormatIntentInputManagementFunctionTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
 
@@ -95,7 +95,7 @@ public class FormatIntentInputManagementFunctionTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
         expectationList.add(assurance);
 
@@ -156,7 +156,7 @@ public class FormatIntentInputManagementFunctionTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
         originalIntent.setIntentExpectations(expectationList);
index f2be749..07e2835 100644 (file)
@@ -59,7 +59,7 @@ public class FormatIntentInputDecisionModuleTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
 
@@ -69,7 +69,7 @@ public class FormatIntentInputDecisionModuleTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
         expectationList.add(assurance);
 
@@ -103,7 +103,7 @@ public class FormatIntentInputDecisionModuleTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         expectationList.add(delivery);
         originalIntent.setIntentExpectations(expectationList);
index 9b2a6c4..5f7ecbf 100644 (file)
@@ -62,7 +62,7 @@ public class FormatIntentInputKnowledgeModuleTest {
         delivery.setExpectationType(ExpectationType.DELIVERY);
         ExpectationObject expectationObject = new ExpectationObject();
         expectationObject.setObjectType(ObjectType.SLICING);
-        //expetationTarget  Context  FulfilmentInfo is empty
+        //expetationTarget  Context  FulfillmentInfo is empty
         delivery.setExpectationObject(expectationObject);
         List<ExpectationTarget> expectationTargets = new ArrayList<>();
         ExpectationTarget expectationTarget = new ExpectationTarget();
@@ -77,7 +77,7 @@ public class FormatIntentInputKnowledgeModuleTest {
         assurance.setExpectationType(ExpectationType.ASSURANCE);
         ExpectationObject expectationObject1 = new ExpectationObject();
         expectationObject1.setObjectType(ObjectType.CCVPN);
-        //expetationTarget  Context  FulfilmentInfo  is empty
+        //expetationTarget  Context  FulfillmentInfo  is empty
         assurance.setExpectationObject(expectationObject1);
 
         List<ExpectationTarget> expectationTarget2 = new ArrayList<>();
index 6f10f10..7539b6c 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 import org.junit.runner.RunWith;
 import org.onap.usecaseui.intentanalysis.bean.enums.ExpectationType;
-import org.onap.usecaseui.intentanalysis.bean.enums.FulfilmentStatus;
+import org.onap.usecaseui.intentanalysis.bean.enums.FulfillmentStatus;
 import org.onap.usecaseui.intentanalysis.bean.enums.NotFulfilledState;
 import org.onap.usecaseui.intentanalysis.bean.enums.ObjectType;
 import org.onap.usecaseui.intentanalysis.bean.enums.OperatorType;
@@ -33,7 +33,7 @@ import org.onap.usecaseui.intentanalysis.bean.models.Condition;
 import org.onap.usecaseui.intentanalysis.bean.models.Expectation;
 import org.onap.usecaseui.intentanalysis.bean.models.ExpectationObject;
 import org.onap.usecaseui.intentanalysis.bean.models.ExpectationTarget;
-import org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo;
 import org.onap.usecaseui.intentanalysis.exception.DataBaseException;
 import org.onap.usecaseui.intentanalysis.IntentAnalysisApplicationTests;
 import org.onap.usecaseui.intentanalysis.util.SpringContextUtil;
@@ -83,17 +83,17 @@ class ExpectationServiceTest extends AbstractJUnit4SpringContextTests {
         List<ExpectationTarget> expectationTargetList = new ArrayList<>();
         expectationTargetList.add(target);
 
-        FulfilmentInfo expectationFulfilmentInfo = new FulfilmentInfo();
-        expectationFulfilmentInfo.setFulfillmentStatus(FulfilmentStatus.valueOf("NOT_FULFILLED"));
-        expectationFulfilmentInfo.setNotFulfilledReason("NotFulfilledReason");
-        expectationFulfilmentInfo.setNotFulfilledState(NotFulfilledState.valueOf("COMPLIANT"));
+        FulfillmentInfo expectationFulfillmentInfo = new FulfillmentInfo();
+        expectationFulfillmentInfo.setFulfillmentStatus(FulfillmentStatus.valueOf("NOT_FULFILLED"));
+        expectationFulfillmentInfo.setNotFulfilledReason("NotFulfilledReason");
+        expectationFulfillmentInfo.setNotFulfilledState(NotFulfilledState.valueOf("COMPLIANT"));
 
         expectation.setExpectationId(testName + "-expectationId");
         expectation.setExpectationName(testName + "expectationName");
         expectation.setExpectationType(ExpectationType.valueOf("DELIVERY"));
         expectation.setExpectationObject(object);
         expectation.setExpectationTargets(expectationTargetList);
-        expectation.setExpectationFulfilmentInfo(expectationFulfilmentInfo);
+        expectation.setExpectationFulfillmentInfo(expectationFulfillmentInfo);
 
         return expectation;
     }
index 310c8c9..f1003f0 100644 (file)
@@ -25,7 +25,7 @@ import org.junit.runner.RunWith;
 import org.onap.usecaseui.intentanalysis.bean.enums.*;
 import org.onap.usecaseui.intentanalysis.bean.models.Intent;
 import org.onap.usecaseui.intentanalysis.bean.models.Condition;
-import org.onap.usecaseui.intentanalysis.bean.models.FulfilmentInfo;
+import org.onap.usecaseui.intentanalysis.bean.models.FulfillmentInfo;
 import org.onap.usecaseui.intentanalysis.bean.models.Context;
 import org.onap.usecaseui.intentanalysis.bean.models.Expectation;
 import org.onap.usecaseui.intentanalysis.bean.models.ExpectationTarget;
@@ -63,7 +63,7 @@ public class IntentServiceTest extends AbstractJUnit4SpringContextTests {
         ExpectationTarget target1 = new ExpectationTarget();
         ExpectationObject object1 = new ExpectationObject();
         Context intentContext = new Context();
-        FulfilmentInfo intentFulfilmentInfo = new FulfilmentInfo();
+        FulfillmentInfo intentFulfillmentInfo = new FulfillmentInfo();
         Condition targetCondition1 = new Condition();
         targetCondition1.setConditionId("conditionId");
         targetCondition1.setConditionName("conditionName");
@@ -89,14 +89,14 @@ public class IntentServiceTest extends AbstractJUnit4SpringContextTests {
         intentContext.setContextName("intentContextName");
         List<Context> intentContextList = new ArrayList<>();
         intentContextList.add(intentContext);
-        intentFulfilmentInfo.setFulfillmentStatus(FulfilmentStatus.valueOf("NOT_FULFILLED"));
-        intentFulfilmentInfo.setNotFulfilledReason("NotFulfilledReason");
-        intentFulfilmentInfo.setNotFulfilledState(NotFulfilledState.valueOf("COMPLIANT"));
+        intentFulfillmentInfo.setFulfillmentStatus(FulfillmentStatus.valueOf("NOT_FULFILLED"));
+        intentFulfillmentInfo.setNotFulfilledReason("NotFulfilledReason");
+        intentFulfillmentInfo.setNotFulfilledState(NotFulfilledState.valueOf("COMPLIANT"));
         intent.setIntentId("testIntentId");
         intent.setIntentName("testIntentName");
         intent.setIntentContexts(intentContextList);
         intent.setIntentExpectations(expectationList);
-        intent.setIntentFulfilmentInfo(intentFulfilmentInfo);
+        intent.setIntentFulfillmentInfo(intentFulfillmentInfo);
 
         Intent intentTmp = intentService.createIntent(intent);
         Assert.assertNotNull(intentTmp);
@@ -130,9 +130,9 @@ public class IntentServiceTest extends AbstractJUnit4SpringContextTests {
         intentContext.setContextName("new context name");
         contextList.set(0, intentContext);
         intent.setIntentContexts(contextList);
-        FulfilmentInfo intentFulfilmentInfo = intent.getIntentFulfilmentInfo();
-        intentFulfilmentInfo.setNotFulfilledReason("new reason");
-        intent.setIntentFulfilmentInfo(intentFulfilmentInfo);
+        FulfillmentInfo intentFulfillmentInfo = intent.getIntentFulfillmentInfo();
+        intentFulfillmentInfo.setNotFulfilledReason("new reason");
+        intent.setIntentFulfillmentInfo(intentFulfillmentInfo);
         List<Expectation> expectationList = intent.getIntentExpectations();
         Expectation expectation = expectationList.get(0);
         expectation.setExpectationName("new expectation name");
index 4a1f120..1105411 100644 (file)
@@ -94,11 +94,11 @@ MERGE INTO context (context_id, context_name, parent_id) KEY (context_id)
 values ('72f6c546-f234-4be5-a2fe-5740139e20cb', 'intentContextName', 'intentId2');
 
 -- ----------------------------
--- Records of fulfilment_info
+-- Records of fulfillment_info
 -- ----------------------------
-MERGE INTO fulfilment_info (fulfilment_info_id, fulfilment_info_status, not_fulfilled_state, not_fulfilled_reason) KEY (fulfilment_info_id)
+MERGE INTO fulfillment_info (fulfillment_info_id, fulfillment_info_status, not_fulfilled_state, not_fulfilled_reason) KEY (fulfillment_info_id)
 values ('intentId1', 'NOT_FULFILLED', 'COMPLIANT', 'NotFulfilledReason');
-MERGE INTO fulfilment_info (fulfilment_info_id, fulfilment_info_status, not_fulfilled_state, not_fulfilled_reason) KEY (fulfilment_info_id)
+MERGE INTO fulfillment_info (fulfillment_info_id, fulfillment_info_status, not_fulfilled_state, not_fulfilled_reason) KEY (fulfillment_info_id)
 values ('intentId2', 'NOT_FULFILLED', 'COMPLIANT', 'NotFulfilledReason');
 
 
index d53f04c..1741585 100644 (file)
@@ -21,7 +21,7 @@ DROP TABLE IF EXISTS expectation;
 DROP TABLE IF EXISTS expectation_object;
 DROP TABLE IF EXISTS expectation_target;
 DROP TABLE IF EXISTS context;
-DROP TABLE IF EXISTS fulfilment_info;
+DROP TABLE IF EXISTS fulfillment_info;
 DROP TABLE IF EXISTS condition;
 
 create table if not exists intent
@@ -62,10 +62,10 @@ create table if not exists context
     parent_id    varchar(255)
 );
 
-create table if not exists fulfilment_info
+create table if not exists fulfillment_info
 (
-    fulfilment_info_id     varchar(255) primary key,
-    fulfilment_info_status varchar(255),
+    fulfillment_info_id     varchar(255) primary key,
+    fulfillment_info_status varchar(255),
     not_fulfilled_state    varchar(255),
     not_fulfilled_reason   varchar(255)
 );