summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/main/java
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-06-30 12:14:07 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2023-07-11 11:48:28 +0100
commit9cfc03f3af00d0128a5b22e32cc5ba439de627b6 (patch)
tree591da6d42a571882219e6df207e5ad3cd1167566 /cps-ncmp-service/src/main/java
parent0ed77bfc78fbb1f33fe6708234759dab2413e0f7 (diff)
Combine alreadyDefinedException classes
Issue-ID: CPS-1774 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
Diffstat (limited to 'cps-ncmp-service/src/main/java')
-rwxr-xr-xcps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java6
-rw-r--r--cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java3
2 files changed, 4 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
index 2e9d7c2021..6c1a1b464a 100755
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImpl.java
@@ -65,7 +65,7 @@ import org.onap.cps.ncmp.api.models.DmiPluginRegistration;
import org.onap.cps.ncmp.api.models.DmiPluginRegistrationResponse;
import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle;
import org.onap.cps.spi.FetchDescendantsOption;
-import org.onap.cps.spi.exceptions.AlreadyDefinedExceptionBatch;
+import org.onap.cps.spi.exceptions.AlreadyDefinedException;
import org.onap.cps.spi.exceptions.CpsException;
import org.onap.cps.spi.exceptions.DataNodeNotFoundException;
import org.onap.cps.spi.exceptions.DataValidationException;
@@ -411,9 +411,9 @@ public class NetworkCmProxyDataServiceImpl implements NetworkCmProxyDataService
try {
lcmEventsCmHandleStateHandler.updateCmHandleStateBatch(cmHandleStatePerCmHandle);
return CmHandleRegistrationResponse.createSuccessResponses(cmHandleIds);
- } catch (final AlreadyDefinedExceptionBatch alreadyDefinedExceptionBatch) {
+ } catch (final AlreadyDefinedException alreadyDefinedException) {
return CmHandleRegistrationResponse.createFailureResponses(
- alreadyDefinedExceptionBatch.getAlreadyDefinedXpaths(),
+ alreadyDefinedException.getAlreadyDefinedObjectNames(),
RegistrationError.CM_HANDLE_ALREADY_EXIST);
} catch (final Exception exception) {
return CmHandleRegistrationResponse.createFailureResponses(cmHandleIds, exception);
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java
index 1be5b2cc6a..af9ee721c5 100644
--- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java
+++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/init/SubscriptionModelLoader.java
@@ -31,7 +31,6 @@ import org.onap.cps.api.CpsDataService;
import org.onap.cps.api.CpsModuleService;
import org.onap.cps.ncmp.api.impl.exception.NcmpStartUpException;
import org.onap.cps.spi.exceptions.AlreadyDefinedException;
-import org.onap.cps.spi.exceptions.AlreadyDefinedExceptionBatch;
import org.onap.cps.spi.model.Dataspace;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
@@ -158,7 +157,7 @@ public class SubscriptionModelLoader implements ModelLoader {
final String nodeData = "{\"" + dataNodeName + "\":{}}";
try {
cpsDataService.saveData(dataspaceName, anchorName, nodeData, OffsetDateTime.now());
- } catch (final AlreadyDefinedExceptionBatch exception) {
+ } catch (final AlreadyDefinedException exception) {
log.info("Creating new data node '{}' failed as data node already exists", dataNodeName);
} catch (final Exception exception) {
log.debug("Creating data node for subscription model failed: {}", exception.getMessage());