From ede42ea3e267d321713cff1daf44d8627ada933d Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Mon, 26 Jun 2023 11:15:57 +0100 Subject: NCMP : Handle non-existing and non-ready cm handles - Modified data operation schema to contains cm handle as steing and response content field name as result. - Added a new common cloud event builder for NCMP to create an event. - Added data operation event creater that uses cloud event builder to create a cloud event. - Introduced a new method onto json object mapper to convert json object to bytes. - Modified EventDateTimeFormatter and added a new method to convert date timestamp into offsetdateTime. - Added a new code into ResourceRequestUtil to identify non-ready cm handle and non-existing cm handle and later publish it as cloud event to tha client given topic. - Introduced CpsApplicationContext to get spring mannaged bean into non spring managed java object. Issue-ID: CPS-1583, CPS-1614 Signed-off-by: sourabh_sourabh Change-Id: I24a39d2cb2c54dea25cd2f17e7748e21cd83a088 Signed-off-by: sourabh_sourabh --- .../schemas/async/data-operation-event-schema-1.0.0.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cps-ncmp-events/src/main/resources') diff --git a/cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json b/cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json index 308e3068d6..f82e481415 100644 --- a/cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json +++ b/cps-ncmp-events/src/main/resources/schemas/async/data-operation-event-schema-1.0.0.json @@ -19,12 +19,15 @@ "type": "object", "properties": { "operationId": { - "description": "Used to distinguish multiple operations using same cmhandleId", + "description": "Used to distinguish multiple operations using same handle ids", "type": "string" }, "ids": { "description": "Id's of the cmhandles", - "type": "array" + "type": "array", + "items": { + "type": "string" + } }, "statusCode": { "description": "which says success or failure (0-99) are for success and (100-199) are for failure", @@ -34,7 +37,7 @@ "description": "Human readable message, Which says what the response has", "type": "string" }, - "responseContent": { + "result": { "description": "Contains the requested data response.", "type": "object", "existingJavaType": "java.lang.Object", -- cgit 1.2.3-korg