summaryrefslogtreecommitdiffstats
path: root/cps-service
diff options
context:
space:
mode:
authorhalil.cakal <halil.cakal@est.tech>2023-07-13 11:28:18 +0100
committerhalil.cakal <halil.cakal@est.tech>2023-07-26 17:03:21 +0100
commitd789956fbf88f856472f975487c1975df91dbe3e (patch)
tree5969f9432199e0689d3bd150645a774ecefa3ac0 /cps-service
parentdcf84ad73f0301ef41049e692b9963f6dcac3661 (diff)
Subscription Creation: NCMP to Client CloudEvent transformation
- Delete legacy avc subscription event and event outcome schemas - Change subscription response and outcome sample json file contents - Change ncmp event response code to support avc subscriptions - Add mapper that maps cloud event to subscription event response - Add mapper that maps subscription event outcome to cloud event - Change subscription event response consumer to consume CloudEvents - Change time out task to support response event instead client id and name - Change subscription event response mapper to support Cloud Event - Change subscription outcome mapper to group subscription responses as per details and status - Change subscription status to have fromString functionality - Change all unit tests to support new functionalities - Add cps exceptions for cloud event and outcome type - Add details field in yang model - Change data node helper to supoort details field - Consolidate final subscription response codes - Fix code smells reported by SonarLint Issue-ID: CPS-1739 Change-Id: I5eadeb8ef40d3d7befb762b5a8d2139fe3c85d7e Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'cps-service')
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/CloudEventConstructionException.java49
-rw-r--r--cps-service/src/main/java/org/onap/cps/spi/exceptions/SubscriptionOutcomeTypeNotFoundException.java49
2 files changed, 98 insertions, 0 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/CloudEventConstructionException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CloudEventConstructionException.java
new file mode 100644
index 000000000..1d520e7b0
--- /dev/null
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/CloudEventConstructionException.java
@@ -0,0 +1,49 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2020 Pantheon.tech
+ * Modifications Copyright (C) 2020 Bell Canada
+ * Modifications Copyright (C) 2020-2023 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.spi.exceptions;
+
+public class CloudEventConstructionException extends CpsException {
+
+ private static final long serialVersionUID = 7747941311132087621L;
+
+ /**
+ * Constructor.
+ *
+ * @param message the error message
+ * @param details the error details
+ */
+ public CloudEventConstructionException(final String message, final String details) {
+ super(message, details);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param message the error message
+ * @param details the error details
+ * @param cause the error cause
+ */
+ public CloudEventConstructionException(final String message, final String details, final Throwable cause) {
+ super(message, details, cause);
+ }
+}
diff --git a/cps-service/src/main/java/org/onap/cps/spi/exceptions/SubscriptionOutcomeTypeNotFoundException.java b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SubscriptionOutcomeTypeNotFoundException.java
new file mode 100644
index 000000000..6b898e853
--- /dev/null
+++ b/cps-service/src/main/java/org/onap/cps/spi/exceptions/SubscriptionOutcomeTypeNotFoundException.java
@@ -0,0 +1,49 @@
+/*
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2020 Pantheon.tech
+ * Modifications Copyright (C) 2020 Bell Canada
+ * Modifications Copyright (C) 2020-2023 Nordix Foundation
+ * ================================================================================
+ * 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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.cps.spi.exceptions;
+
+public class SubscriptionOutcomeTypeNotFoundException extends CpsException {
+
+ private static final long serialVersionUID = 7747941311132087621L;
+
+ /**
+ * Constructor.
+ *
+ * @param message the error message
+ * @param details the error details
+ */
+ public SubscriptionOutcomeTypeNotFoundException(final String message, final String details) {
+ super(message, details);
+ }
+
+ /**
+ * Constructor.
+ *
+ * @param message the error message
+ * @param details the error details
+ * @param cause the error cause
+ */
+ public SubscriptionOutcomeTypeNotFoundException(final String message, final String details, final Throwable cause) {
+ super(message, details, cause);
+ }
+}