diff options
author | halil.cakal <halil.cakal@est.tech> | 2023-03-14 11:24:26 +0000 |
---|---|---|
committer | halil.cakal <halil.cakal@est.tech> | 2023-03-29 15:13:47 +0100 |
commit | 8d8ec86444fb3e085d7dd350966beb92ca0a8ba8 (patch) | |
tree | 7ec78469a9031f86effd98cd531b5147c64ab95a /src/main/java/org/onap/cps/ncmp/dmi/service/model | |
parent | 221ee7ddfe4a0bce0bc8ad57907404429821bc3d (diff) |
Subscription Create Response Handling Dmi Part
- Consume suscription event (payload) with kafka message key
and kafka timestamp from ncmp, and extract cm handle ids.
- Generate subscription event response (payload) and revert it
back to ncmp to specified topic with the corresponding
kafka message key.
- Configure kafka consumer properties and dmi service name.
Issue-ID: CPS-1492
Change-Id: I87de30c00e0f93e350ce6f9fd6079504952da09b
Signed-off-by: halil.cakal <halil.cakal@est.tech>
Diffstat (limited to 'src/main/java/org/onap/cps/ncmp/dmi/service/model')
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponse.java | 36 | ||||
-rw-r--r-- | src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponseStatus.java | 27 |
2 files changed, 63 insertions, 0 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponse.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponse.java new file mode 100644 index 00000000..7666e540 --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponse.java @@ -0,0 +1,36 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 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.ncmp.dmi.service.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import java.util.Map; +import lombok.Getter; +import lombok.Setter; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Getter +@Setter +public class SubscriptionEventResponse { + private String clientId; + private String subscriptionName; + private String dmiName; + private Map<String, SubscriptionEventResponseStatus> cmHandleIdToStatus; +} diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponseStatus.java b/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponseStatus.java new file mode 100644 index 00000000..8987ddae --- /dev/null +++ b/src/main/java/org/onap/cps/ncmp/dmi/service/model/SubscriptionEventResponseStatus.java @@ -0,0 +1,27 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 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.ncmp.dmi.service.model; + +public enum SubscriptionEventResponseStatus { + ACCEPTED, + REJECTED, + PENDING +} |