Fix serialization of update notification payload 69/51169/1
authorMichael Arrastia <MArrasti@amdocs.com>
Mon, 11 Jun 2018 21:02:33 +0000 (22:02 +0100)
committerMichael Arrastia <MArrasti@amdocs.com>
Mon, 11 Jun 2018 21:02:33 +0000 (22:02 +0100)
commit0edaac90429d84075ee01404166f29c666b3d107
tree3f86d3905d8c3318093fa00aa1bad61dede292ff
parentfcf9451685f6de438a66b84189eba3a9b0db73a1
Fix serialization of update notification payload

Fix Gson serialization of ChampEventEnvelope:
- serialize key as primitive.
  Currently output as object ({}) with a "value" property.
  This is due to Optional object declaration and misalignment between
  Gson serializer and Jackson annotations in ChampObject
- serialize transactionId as transaction-id
- serialize dbTransactionId as db-transaction-id

Change-Id: I3a9824ad376ca8189ba31cc9442cb42bb06a9d70
Issue-ID: AAI-1218
Signed-off-by: Michael Arrastia <MArrasti@amdocs.com>
champ-lib/champ-core/src/main/java/org/onap/aai/champcore/event/ChampEvent.java
champ-lib/champ-core/src/main/java/org/onap/aai/champcore/event/envelope/ChampEventEnvelope.java
champ-lib/champ-core/src/main/java/org/onap/aai/champcore/event/envelope/ChampEventHeader.java
champ-lib/champ-core/src/main/java/org/onap/aai/champcore/event/envelope/util/GsonUtil.java [new file with mode: 0644]
champ-lib/champ-core/src/test/java/org/onap/aai/champcore/event/envelope/ChampEventEnvelopeTest.java
champ-lib/champ-core/src/test/resources/event/event-envelope-no-key.json [moved from champ-lib/champ-core/src/test/resources/event/event-envelope.json with 79% similarity]
champ-lib/champ-core/src/test/resources/event/event-envelope-with-key.json [new file with mode: 0644]