Moved builders under impl in CPS Service 68/139968/1
authorleventecsanyi <levente.csanyi@est.tech>
Mon, 20 Jan 2025 20:58:19 +0000 (21:58 +0100)
committerleventecsanyi <levente.csanyi@est.tech>
Mon, 20 Jan 2025 20:58:24 +0000 (21:58 +0100)
  - moved builders and fixed the Arch test

Issue-ID: CPS-2542
Change-Id: Iac9d47f20fff2e6fa415ada8bc17880b0b032591
Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
18 files changed:
cps-application/src/test/java/org/onap/cps/architecture/ArchitectureTestBase.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/CmHandleRegistrationServicePropertyHandler.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/models/CompositeStateBuilderSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/CmHandleRegistrationServicePropertyHandlerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy
cps-rest/src/test/groovy/org/onap/cps/rest/controller/QueryRestControllerSpec.groovy
cps-ri/src/main/java/org/onap/cps/ri/CpsDataPersistenceServiceImpl.java
cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy
cps-service/src/main/java/org/onap/cps/api/model/DataNode.java
cps-service/src/main/java/org/onap/cps/api/model/DeltaReport.java
cps-service/src/main/java/org/onap/cps/impl/CpsDataServiceImpl.java
cps-service/src/main/java/org/onap/cps/impl/CpsDeltaServiceImpl.java
cps-service/src/main/java/org/onap/cps/impl/DataNodeBuilder.java [moved from cps-service/src/main/java/org/onap/cps/api/model/DataNodeBuilder.java with 99% similarity]
cps-service/src/main/java/org/onap/cps/impl/DeltaReportBuilder.java [moved from cps-service/src/main/java/org/onap/cps/api/model/DeltaReportBuilder.java with 97% similarity]
cps-service/src/test/groovy/org/onap/cps/impl/CpsDataServiceImplSpec.groovy
cps-service/src/test/groovy/org/onap/cps/impl/DataNodeBuilderSpec.groovy [moved from cps-service/src/test/groovy/org/onap/cps/api/model/DataNodeBuilderSpec.groovy with 99% similarity]
cps-service/src/test/groovy/org/onap/cps/impl/DeltaReportBuilderSpec.groovy [moved from cps-service/src/test/groovy/org/onap/cps/api/model/DeltaReportBuilderSpec.groovy with 98% similarity]
cps-service/src/test/groovy/org/onap/cps/utils/DataMapUtilsSpec.groovy

index 1d39060..c1d6575 100644 (file)
@@ -36,6 +36,7 @@ public class ArchitectureTestBase {
                                                             "lombok..",
                                                             "org.apache..",
                                                             "org.mapstruct..",
+                                                            "org.opendaylight..",
                                                             "org.slf4j..",
                                                             "org.springframework..",
                                                             "reactor.."
index b7a13d9..86d1d70 100644 (file)
@@ -49,7 +49,7 @@ import org.onap.cps.api.CpsDataService;
 import org.onap.cps.api.exceptions.DataNodeNotFoundException;
 import org.onap.cps.api.exceptions.DataValidationException;
 import org.onap.cps.api.model.DataNode;
-import org.onap.cps.api.model.DataNodeBuilder;
+import org.onap.cps.impl.DataNodeBuilder;
 import org.onap.cps.ncmp.api.inventory.models.CmHandleRegistrationResponse;
 import org.onap.cps.ncmp.api.inventory.models.NcmpServiceCmHandle;
 import org.onap.cps.ncmp.impl.inventory.models.YangModelCmHandle;
index 4d42e62..8b04568 100644 (file)
@@ -24,7 +24,7 @@ package org.onap.cps.ncmp.api.inventory.models
 
 import org.onap.cps.ncmp.api.inventory.DataStoreSyncState
 import org.onap.cps.api.model.DataNode
-import org.onap.cps.api.model.DataNodeBuilder
+import org.onap.cps.impl.DataNodeBuilder
 import spock.lang.Specification
 
 import java.time.OffsetDateTime
index b600d02..70bd418 100644 (file)
@@ -32,7 +32,7 @@ import org.onap.cps.ncmp.api.inventory.models.NcmpServiceCmHandle
 import org.onap.cps.api.exceptions.DataNodeNotFoundException
 import org.onap.cps.api.exceptions.DataValidationException
 import org.onap.cps.api.model.DataNode
-import org.onap.cps.api.model.DataNodeBuilder
+import org.onap.cps.impl.DataNodeBuilder
 import org.onap.cps.utils.ContentType
 import org.onap.cps.utils.JsonObjectMapper
 import org.slf4j.LoggerFactory
index ca89faf..f2f9624 100755 (executable)
@@ -30,8 +30,8 @@ import org.onap.cps.api.CpsAnchorService
 import org.onap.cps.api.CpsDataService
 import org.onap.cps.api.parameters.FetchDescendantsOption
 import org.onap.cps.api.model.DataNode
-import org.onap.cps.api.model.DataNodeBuilder
-import org.onap.cps.api.model.DeltaReportBuilder
+import org.onap.cps.impl.DataNodeBuilder
+import org.onap.cps.impl.DeltaReportBuilder
 import org.onap.cps.utils.ContentType
 import org.onap.cps.utils.DateTimeUtility
 import org.onap.cps.utils.JsonObjectMapper
index f29654c..2b5c471 100644 (file)
@@ -27,7 +27,7 @@ import com.fasterxml.jackson.databind.ObjectMapper
 import org.onap.cps.api.CpsAnchorService
 import org.onap.cps.api.CpsQueryService
 import org.onap.cps.api.parameters.PaginationOption
-import org.onap.cps.api.model.DataNodeBuilder
+import org.onap.cps.impl.DataNodeBuilder
 import org.onap.cps.utils.JsonObjectMapper
 import org.onap.cps.utils.PrefixResolver
 import org.spockframework.spring.SpringBean
index c43c8e2..52fd7f2 100644 (file)
@@ -50,12 +50,12 @@ import org.onap.cps.api.exceptions.CpsPathException;
 import org.onap.cps.api.exceptions.DataNodeNotFoundException;
 import org.onap.cps.api.exceptions.DataNodeNotFoundExceptionBatch;
 import org.onap.cps.api.model.DataNode;
-import org.onap.cps.api.model.DataNodeBuilder;
 import org.onap.cps.api.parameters.FetchDescendantsOption;
 import org.onap.cps.api.parameters.PaginationOption;
 import org.onap.cps.cpspath.parser.CpsPathQuery;
 import org.onap.cps.cpspath.parser.CpsPathUtil;
 import org.onap.cps.cpspath.parser.PathParsingException;
+import org.onap.cps.impl.DataNodeBuilder;
 import org.onap.cps.ri.models.AnchorEntity;
 import org.onap.cps.ri.models.DataspaceEntity;
 import org.onap.cps.ri.models.FragmentEntity;
index c818f3b..e927922 100644 (file)
@@ -33,7 +33,7 @@ import org.onap.cps.api.parameters.FetchDescendantsOption
 import org.onap.cps.api.exceptions.ConcurrencyException
 import org.onap.cps.api.exceptions.DataValidationException
 import org.onap.cps.api.model.DataNode
-import org.onap.cps.api.model.DataNodeBuilder
+import org.onap.cps.impl.DataNodeBuilder
 import org.onap.cps.utils.JsonObjectMapper
 import org.springframework.dao.DataIntegrityViolationException
 import spock.lang.Specification
index be80b63..be55970 100644 (file)
@@ -26,19 +26,18 @@ import java.io.Serializable;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Map;
-import lombok.AccessLevel;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.Setter;
 
-@Setter(AccessLevel.PROTECTED)
+@Setter
 @Getter
 @EqualsAndHashCode
 public class DataNode implements Serializable {
 
     private static final long serialVersionUID = 1482619410918597467L;
 
-    DataNode() {}
+    public DataNode() {}
 
     private String dataspace;
     private String schemaSetName;
index df64262..77d8d77 100644 (file)
@@ -23,11 +23,10 @@ package org.onap.cps.api.model;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import java.io.Serializable;
 import java.util.Map;
-import lombok.AccessLevel;
 import lombok.Getter;
 import lombok.Setter;
 
-@Setter(AccessLevel.PROTECTED)
+@Setter
 @Getter
 @JsonInclude(JsonInclude.Include.NON_NULL)
 public class DeltaReport {
@@ -36,7 +35,7 @@ public class DeltaReport {
     public static final String REMOVE_ACTION = "remove";
     public static final String REPLACE_ACTION = "replace";
 
-    DeltaReport() {}
+    public DeltaReport() {}
 
     private String action;
     private String xpath;
index f251317..653fd48 100644 (file)
@@ -42,7 +42,6 @@ import org.onap.cps.api.CpsDeltaService;
 import org.onap.cps.api.exceptions.DataValidationException;
 import org.onap.cps.api.model.Anchor;
 import org.onap.cps.api.model.DataNode;
-import org.onap.cps.api.model.DataNodeBuilder;
 import org.onap.cps.api.model.DeltaReport;
 import org.onap.cps.api.parameters.FetchDescendantsOption;
 import org.onap.cps.cpspath.parser.CpsPathUtil;
index 7a9d142..d532001 100644 (file)
@@ -32,7 +32,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.api.CpsDeltaService;
 import org.onap.cps.api.model.DataNode;
 import org.onap.cps.api.model.DeltaReport;
-import org.onap.cps.api.model.DeltaReportBuilder;
 import org.springframework.stereotype.Service;
 
 @Slf4j
@@ -20,7 +20,7 @@
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.api.model;
+package org.onap.cps.impl;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
@@ -33,6 +33,7 @@ import java.util.Set;
 import java.util.stream.Collectors;
 import lombok.extern.slf4j.Slf4j;
 import org.onap.cps.api.exceptions.DataValidationException;
+import org.onap.cps.api.model.DataNode;
 import org.onap.cps.utils.YangUtils;
 import org.opendaylight.yangtools.yang.common.Ordering;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.api.model;
+package org.onap.cps.impl;
 
 import java.io.Serializable;
 import java.util.Map;
 import lombok.extern.slf4j.Slf4j;
+import org.onap.cps.api.model.DeltaReport;
 
 @Slf4j
 public class DeltaReportBuilder {
index 3ea859a..a828d26 100644 (file)
@@ -40,7 +40,6 @@ import org.onap.cps.api.exceptions.DataValidationException
 import org.onap.cps.api.exceptions.SessionManagerException
 import org.onap.cps.api.exceptions.SessionTimeoutException
 import org.onap.cps.api.model.Anchor
-import org.onap.cps.api.model.DataNodeBuilder
 import org.onap.cps.utils.ContentType
 import org.onap.cps.utils.JsonObjectMapper
 import org.onap.cps.utils.PrefixResolver
  *  ============LICENSE_END=========================================================
  */
 
-package org.onap.cps.api.model
+package org.onap.cps.impl
 
 import org.onap.cps.TestUtils
 import org.onap.cps.api.exceptions.DataValidationException
+import org.onap.cps.api.model.DataNode
 import org.onap.cps.utils.ContentType
 import org.onap.cps.utils.DataMapUtils
 import org.onap.cps.utils.YangParserHelper
index bb0f5b0..6ff41c1 100644 (file)
@@ -22,7 +22,7 @@
 
 package org.onap.cps.utils
 
-import org.onap.cps.api.model.DataNodeBuilder
+import org.onap.cps.impl.DataNodeBuilder
 import spock.lang.Specification
 
 class DataMapUtilsSpec extends Specification {