diff options
author | leventecsanyi <levente.csanyi@est.tech> | 2024-11-26 15:29:45 +0100 |
---|---|---|
committer | leventecsanyi <levente.csanyi@est.tech> | 2024-12-05 14:18:49 +0100 |
commit | 2dac434c92dfd20791eda9364783846a5da8c605 (patch) | |
tree | e9f0ede75d3257edf25467f12b9d9a67d6a6b17f /cps-rest/src | |
parent | cd6fc6bf8fb1d28d741199c07b7dd6ecaac6d6a5 (diff) |
Moved common classes under the api package under api
- moved common classes under the api package
- moved Spec files
Issue-ID: CPS-2512
Change-Id: I88046280ce359ce8cc488ad37d4e6f85406b0dbf
Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
Diffstat (limited to 'cps-rest/src')
14 files changed, 60 insertions, 60 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java index 9b78f85201..675c0eaec4 100755 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java @@ -23,8 +23,8 @@ package org.onap.cps.rest.controller; +import static org.onap.cps.api.parameters.CascadeDeleteAllowed.CASCADE_DELETE_PROHIBITED; import static org.onap.cps.rest.utils.MultipartFileUtil.extractYangResourcesMap; -import static org.onap.cps.spi.CascadeDeleteAllowed.CASCADE_DELETE_PROHIBITED; import io.micrometer.core.annotation.Timed; import jakarta.validation.Valid; @@ -36,13 +36,13 @@ import lombok.RequiredArgsConstructor; import org.onap.cps.api.CpsAnchorService; import org.onap.cps.api.CpsDataspaceService; import org.onap.cps.api.CpsModuleService; +import org.onap.cps.api.model.Anchor; +import org.onap.cps.api.model.Dataspace; +import org.onap.cps.api.model.SchemaSet; import org.onap.cps.rest.api.CpsAdminApi; import org.onap.cps.rest.model.AnchorDetails; import org.onap.cps.rest.model.DataspaceDetails; import org.onap.cps.rest.model.SchemaSetDetails; -import org.onap.cps.spi.model.Anchor; -import org.onap.cps.spi.model.Dataspace; -import org.onap.cps.spi.model.SchemaSet; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.RequestMapping; diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/CpsRestInputMapper.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/CpsRestInputMapper.java index 3d3ab1145b..8e11e40651 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/CpsRestInputMapper.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/CpsRestInputMapper.java @@ -25,12 +25,12 @@ import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.NullValueCheckStrategy; import org.mapstruct.NullValuePropertyMappingStrategy; +import org.onap.cps.api.model.Anchor; +import org.onap.cps.api.model.Dataspace; +import org.onap.cps.api.model.SchemaSet; import org.onap.cps.rest.model.AnchorDetails; import org.onap.cps.rest.model.DataspaceDetails; import org.onap.cps.rest.model.SchemaSetDetails; -import org.onap.cps.spi.model.Anchor; -import org.onap.cps.spi.model.Dataspace; -import org.onap.cps.spi.model.SchemaSet; @Mapper(componentModel = "spring") public interface CpsRestInputMapper { diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java index 3efb6b421c..d460f52415 100755 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/DataRestController.java @@ -39,11 +39,11 @@ import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.onap.cps.api.CpsAnchorService; import org.onap.cps.api.CpsDataService; +import org.onap.cps.api.model.Anchor; +import org.onap.cps.api.model.DataNode; +import org.onap.cps.api.model.DeltaReport; +import org.onap.cps.api.parameters.FetchDescendantsOption; import org.onap.cps.rest.api.CpsDataApi; -import org.onap.cps.spi.FetchDescendantsOption; -import org.onap.cps.spi.model.Anchor; -import org.onap.cps.spi.model.DataNode; -import org.onap.cps.spi.model.DeltaReport; import org.onap.cps.utils.ContentType; import org.onap.cps.utils.DataMapUtils; import org.onap.cps.utils.JsonObjectMapper; diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/QueryRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/QueryRestController.java index ec71c30a75..f8833094cf 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/controller/QueryRestController.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/QueryRestController.java @@ -31,11 +31,11 @@ import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.onap.cps.api.CpsAnchorService; import org.onap.cps.api.CpsQueryService; +import org.onap.cps.api.model.Anchor; +import org.onap.cps.api.model.DataNode; +import org.onap.cps.api.parameters.FetchDescendantsOption; +import org.onap.cps.api.parameters.PaginationOption; import org.onap.cps.rest.api.CpsQueryApi; -import org.onap.cps.spi.FetchDescendantsOption; -import org.onap.cps.spi.PaginationOption; -import org.onap.cps.spi.model.Anchor; -import org.onap.cps.spi.model.DataNode; import org.onap.cps.utils.ContentType; import org.onap.cps.utils.DataMapUtils; import org.onap.cps.utils.JsonObjectMapper; diff --git a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java index 1f6cf1724c..7e1d641e0d 100755 --- a/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/exceptions/CpsRestExceptionHandler.java @@ -27,19 +27,19 @@ import jakarta.validation.ValidationException; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.onap.cps.api.exceptions.AlreadyDefinedException; +import org.onap.cps.api.exceptions.CpsAdminException; +import org.onap.cps.api.exceptions.CpsException; +import org.onap.cps.api.exceptions.CpsPathException; +import org.onap.cps.api.exceptions.DataInUseException; +import org.onap.cps.api.exceptions.DataNodeNotFoundException; +import org.onap.cps.api.exceptions.DataValidationException; +import org.onap.cps.api.exceptions.ModelValidationException; +import org.onap.cps.api.exceptions.NotFoundInDataspaceException; import org.onap.cps.rest.controller.AdminRestController; import org.onap.cps.rest.controller.DataRestController; import org.onap.cps.rest.controller.QueryRestController; import org.onap.cps.rest.model.ErrorMessage; -import org.onap.cps.spi.exceptions.AlreadyDefinedException; -import org.onap.cps.spi.exceptions.CpsAdminException; -import org.onap.cps.spi.exceptions.CpsException; -import org.onap.cps.spi.exceptions.CpsPathException; -import org.onap.cps.spi.exceptions.DataInUseException; -import org.onap.cps.spi.exceptions.DataNodeNotFoundException; -import org.onap.cps.spi.exceptions.DataValidationException; -import org.onap.cps.spi.exceptions.ModelValidationException; -import org.onap.cps.spi.exceptions.NotFoundInDataspaceException; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java index 3e01f6ee81..49f4f32592 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/utils/MultipartFileUtil.java @@ -34,8 +34,8 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import lombok.AccessLevel; import lombok.NoArgsConstructor; -import org.onap.cps.spi.exceptions.CpsException; -import org.onap.cps.spi.exceptions.ModelValidationException; +import org.onap.cps.api.exceptions.CpsException; +import org.onap.cps.api.exceptions.ModelValidationException; import org.springframework.web.multipart.MultipartFile; @NoArgsConstructor(access = AccessLevel.PRIVATE) diff --git a/cps-rest/src/main/java/org/onap/cps/rest/utils/ZipFileSizeValidator.java b/cps-rest/src/main/java/org/onap/cps/rest/utils/ZipFileSizeValidator.java index e514b93afc..0308a10bfd 100644 --- a/cps-rest/src/main/java/org/onap/cps/rest/utils/ZipFileSizeValidator.java +++ b/cps-rest/src/main/java/org/onap/cps/rest/utils/ZipFileSizeValidator.java @@ -22,7 +22,7 @@ package org.onap.cps.rest.utils; import lombok.Getter; import lombok.Setter; -import org.onap.cps.spi.exceptions.ModelValidationException; +import org.onap.cps.api.exceptions.ModelValidationException; @Setter @Getter diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy index 81ac511a9f..2335a5e770 100755 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/AdminRestControllerSpec.groovy @@ -25,7 +25,7 @@ package org.onap.cps.rest.controller import org.onap.cps.api.CpsAnchorService -import static org.onap.cps.spi.CascadeDeleteAllowed.CASCADE_DELETE_PROHIBITED +import static org.onap.cps.api.parameters.CascadeDeleteAllowed.CASCADE_DELETE_PROHIBITED import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart @@ -34,11 +34,11 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder import org.mapstruct.factory.Mappers import org.onap.cps.api.CpsDataspaceService import org.onap.cps.api.CpsModuleService -import org.onap.cps.spi.exceptions.AlreadyDefinedException -import org.onap.cps.spi.exceptions.SchemaSetInUseException -import org.onap.cps.spi.model.Anchor -import org.onap.cps.spi.model.Dataspace -import org.onap.cps.spi.model.SchemaSet +import org.onap.cps.api.exceptions.AlreadyDefinedException +import org.onap.cps.api.exceptions.SchemaSetInUseException +import org.onap.cps.api.model.Anchor +import org.onap.cps.api.model.Dataspace +import org.onap.cps.api.model.SchemaSet import org.spockframework.spring.SpringBean import org.springframework.beans.factory.annotation.Autowired import org.springframework.beans.factory.annotation.Value diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/CpsRestInputMapperSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/CpsRestInputMapperSpec.groovy index 9ff1a9fe9c..a0485f6bbf 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/CpsRestInputMapperSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/CpsRestInputMapperSpec.groovy @@ -23,10 +23,10 @@ package org.onap.cps.rest.controller import org.mapstruct.factory.Mappers import org.onap.cps.rest.model.AnchorDetails import org.onap.cps.rest.model.SchemaSetDetails -import org.onap.cps.spi.model.Anchor +import org.onap.cps.api.model.Anchor import org.onap.cps.rest.model.ModuleReferences -import org.onap.cps.spi.model.ModuleReference -import org.onap.cps.spi.model.SchemaSet +import org.onap.cps.api.model.ModuleReference +import org.onap.cps.api.model.SchemaSet import spock.lang.Specification class CpsRestInputMapperSpec extends Specification { diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy index 892963c827..915fbdecf5 100755 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/DataRestControllerSpec.groovy @@ -28,10 +28,10 @@ import com.fasterxml.jackson.databind.ObjectMapper import groovy.json.JsonSlurper import org.onap.cps.api.CpsAnchorService import org.onap.cps.api.CpsDataService -import org.onap.cps.spi.FetchDescendantsOption -import org.onap.cps.spi.model.DataNode -import org.onap.cps.spi.model.DataNodeBuilder -import org.onap.cps.spi.model.DeltaReportBuilder +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.utils.ContentType import org.onap.cps.utils.DateTimeUtility import org.onap.cps.utils.JsonObjectMapper @@ -48,8 +48,8 @@ import org.springframework.web.multipart.MultipartFile import spock.lang.Shared import spock.lang.Specification -import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS -import static org.onap.cps.spi.FetchDescendantsOption.OMIT_DESCENDANTS +import static org.onap.cps.api.parameters.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS +import static org.onap.cps.api.parameters.FetchDescendantsOption.OMIT_DESCENDANTS import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.multipart diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/QueryRestControllerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/QueryRestControllerSpec.groovy index 076ab32454..f29654c99f 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/controller/QueryRestControllerSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/controller/QueryRestControllerSpec.groovy @@ -26,8 +26,8 @@ package org.onap.cps.rest.controller import com.fasterxml.jackson.databind.ObjectMapper import org.onap.cps.api.CpsAnchorService import org.onap.cps.api.CpsQueryService -import org.onap.cps.spi.PaginationOption -import org.onap.cps.spi.model.DataNodeBuilder +import org.onap.cps.api.parameters.PaginationOption +import org.onap.cps.api.model.DataNodeBuilder import org.onap.cps.utils.JsonObjectMapper import org.onap.cps.utils.PrefixResolver import org.spockframework.spring.SpringBean @@ -39,9 +39,9 @@ import org.springframework.http.MediaType import org.springframework.test.web.servlet.MockMvc import spock.lang.Specification -import static org.onap.cps.spi.FetchDescendantsOption.DIRECT_CHILDREN_ONLY -import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS -import static org.onap.cps.spi.FetchDescendantsOption.OMIT_DESCENDANTS +import static org.onap.cps.api.parameters.FetchDescendantsOption.DIRECT_CHILDREN_ONLY +import static org.onap.cps.api.parameters.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS +import static org.onap.cps.api.parameters.FetchDescendantsOption.OMIT_DESCENDANTS import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get @WebMvcTest(QueryRestController) diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy index ff2bed4347..f0fc4cca62 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy @@ -32,16 +32,16 @@ import org.onap.cps.api.CpsDataService import org.onap.cps.api.CpsModuleService import org.onap.cps.api.CpsQueryService import org.onap.cps.rest.controller.CpsRestInputMapper -import org.onap.cps.spi.exceptions.AlreadyDefinedException -import org.onap.cps.spi.exceptions.CpsException -import org.onap.cps.spi.exceptions.CpsPathException -import org.onap.cps.spi.exceptions.DataInUseException -import org.onap.cps.spi.exceptions.DataNodeNotFoundException -import org.onap.cps.spi.exceptions.DataValidationException -import org.onap.cps.spi.exceptions.ModelValidationException -import org.onap.cps.spi.exceptions.NotFoundInDataspaceException -import org.onap.cps.spi.exceptions.SchemaSetInUseException -import org.onap.cps.spi.exceptions.DataspaceInUseException +import org.onap.cps.api.exceptions.AlreadyDefinedException +import org.onap.cps.api.exceptions.CpsException +import org.onap.cps.api.exceptions.CpsPathException +import org.onap.cps.api.exceptions.DataInUseException +import org.onap.cps.api.exceptions.DataNodeNotFoundException +import org.onap.cps.api.exceptions.DataValidationException +import org.onap.cps.api.exceptions.ModelValidationException +import org.onap.cps.api.exceptions.NotFoundInDataspaceException +import org.onap.cps.api.exceptions.SchemaSetInUseException +import org.onap.cps.api.exceptions.DataspaceInUseException import org.onap.cps.utils.JsonObjectMapper import org.onap.cps.utils.PrefixResolver import org.spockframework.spring.SpringBean diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/utils/MultipartFileUtilSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/utils/MultipartFileUtilSpec.groovy index e9d559c31d..73819f8cdf 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/utils/MultipartFileUtilSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/utils/MultipartFileUtilSpec.groovy @@ -20,8 +20,8 @@ package org.onap.cps.rest.utils -import org.onap.cps.spi.exceptions.CpsException -import org.onap.cps.spi.exceptions.ModelValidationException +import org.onap.cps.api.exceptions.CpsException +import org.onap.cps.api.exceptions.ModelValidationException import org.springframework.mock.web.MockMultipartFile import org.springframework.web.multipart.MultipartFile import spock.lang.Specification diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/utils/ZipFileSizeValidatorSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/utils/ZipFileSizeValidatorSpec.groovy index b4a6a6ab1e..e5aecb9e5d 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/utils/ZipFileSizeValidatorSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/utils/ZipFileSizeValidatorSpec.groovy @@ -20,7 +20,7 @@ package org.onap.cps.rest.utils -import org.onap.cps.spi.exceptions.ModelValidationException +import org.onap.cps.api.exceptions.ModelValidationException import spock.lang.Specification class ZipFileSizeValidatorSpec extends Specification { |