From c79755d43c123176515e5cafbba0774a03d297d3 Mon Sep 17 00:00:00 2001 From: "Nelson, Thomas (tn1381)" Date: Mon, 27 Aug 2018 19:52:13 +0000 Subject: Swagger Update and other updates. Updates related to callback api Change-Id: I2a4c00e8db4a430c5998e7770389451610f0770a Issue-ID: MUSIC-97 Signed-off-by: Nelson, Thomas (tn1381) --- .../jsonobjects/JSONCallbackResponse.java | 9 ++++ .../datastore/jsonobjects/JsonNotification.java | 9 +++- .../jsonobjects/JsonNotifyClientResponse.java | 61 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 src/main/java/org/onap/music/datastore/jsonobjects/JsonNotifyClientResponse.java (limited to 'src/main/java/org/onap/music/datastore') diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java b/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java index c521d0df..f869c342 100755 --- a/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java +++ b/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java @@ -22,6 +22,7 @@ package org.onap.music.datastore.jsonobjects; +import java.util.List; import java.util.Map; public class JSONCallbackResponse { @@ -33,6 +34,8 @@ public class JSONCallbackResponse { private String table_name; private String primary_key; private Object miscObjects; + private List updateList; + public String getFull_table() { return full_table; } @@ -75,6 +78,12 @@ public class JSONCallbackResponse { public Map getChangeValue() { return changeValue; } + public List getUpdateList() { + return updateList; + } + public void setUpdateList(List updateList) { + this.updateList = updateList; + } } diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java index ad999190..1a8a93f5 100755 --- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java +++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java @@ -44,7 +44,7 @@ public class JsonNotification implements Serializable { private String notify_insert; private String notify_delete; private String operation_type; - + private String triggerName; private Map response_body; public String getNotify_field() { @@ -101,7 +101,12 @@ public class JsonNotification implements Serializable { public void setOperation_type(String operation_type) { this.operation_type = operation_type; } - + public String getTriggerName() { + return triggerName; + } + public void setTriggerName(String triggerName) { + this.triggerName = triggerName; + } @Override public String toString() { try { diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotifyClientResponse.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotifyClientResponse.java new file mode 100644 index 00000000..f63625e7 --- /dev/null +++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotifyClientResponse.java @@ -0,0 +1,61 @@ +/* + * ============LICENSE_START========================================== + * org.onap.music + * =================================================================== + * Copyright (c) 2017 AT&T Intellectual Property + * =================================================================== + * 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. + * + * ============LICENSE_END============================================= + * ==================================================================== + */ +package org.onap.music.datastore.jsonobjects; + +import java.io.Serializable; +import java.util.Map; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +@ApiModel(value = "JsonNotifyClientResponse", description = "Json model for callback") +@JsonIgnoreProperties(ignoreUnknown = true) +public class JsonNotifyClientResponse implements Serializable { + private String message; + private String status; + + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + public String getStatus() { + return status; + } + public void setStatus(String status) { + this.status = status; + } + + @Override + public String toString() { + try { + return new com.fasterxml.jackson.databind.ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this); + } catch (com.fasterxml.jackson.core.JsonProcessingException e) { + return message+ " : "+status; + } + + } + +} -- cgit 1.2.3-korg