Refactor and Move NCMP Data Request Handlers 25/138225/5
authorToineSiebelink <toine.siebelink@est.tech>
Fri, 14 Jun 2024 09:01:56 +0000 (10:01 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Mon, 17 Jun 2024 10:21:06 +0000 (11:21 +0100)
commitd21ba17ca15fb3be4d2728f14b4938dbd091824a
tree5fcb7f07a4f7ab2b17c30b9901d482f0e0f7b22f
parent35e0df312cbb2fd0a3740805636338713836b5e1
Refactor and Move NCMP Data Request Handlers

- Simplified NCMP Rest Request Handlers
- Moved responsEntity wrapping to Controller so most handler methods can have clear return types
- Moved NCMP Rest Request Handlers  to Service Layer
- Moved related exceptions and utils to Service Layer
- Used Lombok for constructors
- Improved related testware

Issue-ID: CPS-2266
Change-Id: I0025fab1c92e0d613825093b6e4b43dae044c01a
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
13 files changed:
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyController.java
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandler.java
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/exceptions/NetworkCmProxyRestExceptionHandlerSpec.groovy
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NcmpCachedResourceRequestHandler.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpCachedResourceRequestHandler.java with 69% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NcmpDatastoreRequestHandler.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandler.java with 86% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NcmpPassthroughResourceRequestHandler.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/handlers/NcmpPassthroughResourceRequestHandler.java with 75% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/exceptions/InvalidTopicException.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/InvalidTopicException.java with 96% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/exceptions/OperationNotSupportedException.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/OperationNotSupportedException.java with 96% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/exceptions/PayloadTooLargeException.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/exceptions/PayloadTooLargeException.java with 96% similarity]
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/utils/TopicValidator.java [moved from cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/util/TopicValidator.java with 94% similarity]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NcmpDatastoreRequestHandlerSpec.groovy [moved from cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/handlers/NcmpDatastoreRequestHandlerSpec.groovy with 81% similarity]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/utils/TopicValidatorSpec.groovy [moved from cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/util/TopicValidatorSpec.groovy with 92% similarity]