aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/music/datastore
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/music/datastore')
-rwxr-xr-xsrc/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java24
-rw-r--r--src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java19
-rwxr-xr-xsrc/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java8
3 files changed, 33 insertions, 18 deletions
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 f869c342..c5a56a71 100755
--- a/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java
+++ b/src/main/java/org/onap/music/datastore/jsonobjects/JSONCallbackResponse.java
@@ -27,20 +27,20 @@ import java.util.Map;
public class JSONCallbackResponse {
- private String full_table;
+ private String fullTable;
private String keyspace;
private Map<String, String> changeValue;
private String operation;
- private String table_name;
- private String primary_key;
+ private String tableName;
+ private String primaryKey;
private Object miscObjects;
private List<String> updateList;
public String getFull_table() {
- return full_table;
+ return fullTable;
}
- public void setFull_table(String full_table) {
- this.full_table = full_table;
+ public void setFull_table(String fullTable) {
+ this.fullTable = fullTable;
}
public String getKeyspace() {
return keyspace;
@@ -55,16 +55,16 @@ public class JSONCallbackResponse {
this.operation = operation;
}
public String getTable_name() {
- return table_name;
+ return tableName;
}
- public void setTable_name(String table_name) {
- this.table_name = table_name;
+ public void setTable_name(String tableName) {
+ this.tableName = tableName;
}
public String getPrimary_key() {
- return primary_key;
+ return primaryKey;
}
- public void setPrimary_key(String primary_key) {
- this.primary_key = primary_key;
+ public void setPrimary_key(String primaryKey) {
+ this.primaryKey = primaryKey;
}
public Object getMiscObjects() {
return miscObjects;
diff --git a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java
index c79ba9b7..456fb951 100644
--- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java
+++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonInsert.java
@@ -3,6 +3,7 @@
* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +34,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import org.onap.music.eelf.logging.EELFLoggerDelegate;
+import org.onap.music.eelf.logging.format.AppMessages;
+import org.onap.music.eelf.logging.format.ErrorSeverity;
+import org.onap.music.eelf.logging.format.ErrorTypes;
+
@ApiModel(value = "JsonTable", description = "Json model for table vlaues insert")
@JsonIgnoreProperties(ignoreUnknown = true)
public class JsonInsert implements Serializable {
@@ -41,10 +47,11 @@ public class JsonInsert implements Serializable {
private transient Map<String, Object> values;
private String ttl;
private String timestamp;
- private transient Map<String, Object> row_specification;
+ private transient Map<String, Object> rowSpecification;
private Map<String, String> consistencyInfo;
private Map<String, byte[]> objectMap;
-
+ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JsonInsert.class);
+
@ApiModelProperty(value = "objectMap")
public Map<String, byte[]> getObjectMap() {
return objectMap;
@@ -110,11 +117,11 @@ public class JsonInsert implements Serializable {
@ApiModelProperty(value = "Information for selecting specific rows for insert")
public Map<String, Object> getRow_specification() {
- return row_specification;
+ return rowSpecification;
}
- public void setRow_specification(Map<String, Object> row_specification) {
- this.row_specification = row_specification;
+ public void setRow_specification(Map<String, Object> rowSpecification) {
+ this.rowSpecification = rowSpecification;
}
public byte[] serialize() {
@@ -124,7 +131,7 @@ public class JsonInsert implements Serializable {
out = new ObjectOutputStream(bos);
out.writeObject(this);
} catch (IOException e) {
- e.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger, e, AppMessages.IOERROR, ErrorSeverity.ERROR, ErrorTypes.DATAERROR);
}
return bos.toByteArray();
}
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 ce244e2c..5190de58 100755
--- a/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java
+++ b/src/main/java/org/onap/music/datastore/jsonobjects/JsonNotification.java
@@ -3,6 +3,7 @@
* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ * Modifications Copyright (C) 2018 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,6 +29,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import org.onap.music.eelf.logging.EELFLoggerDelegate;
+import org.onap.music.eelf.logging.format.AppMessages;
+import org.onap.music.eelf.logging.format.ErrorSeverity;
+import org.onap.music.eelf.logging.format.ErrorTypes;
+
import io.swagger.annotations.ApiModel;
@ApiModel(value = "JsonNotification", description = "Json model for callback")
@@ -45,6 +51,7 @@ public class JsonNotification implements Serializable {
private String operation_type;
private String triggerName;
private Map<String, String> response_body;
+ private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JsonNotification.class);
public String getNotify_field() {
return notify_field;
@@ -111,6 +118,7 @@ public class JsonNotification implements Serializable {
try {
return new com.fasterxml.jackson.databind.ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(this);
} catch (com.fasterxml.jackson.core.JsonProcessingException e) {
+ logger.error(EELFLoggerDelegate.errorLogger, e, AppMessages.EXECUTIONINTERRUPTED, ErrorSeverity.ERROR, ErrorTypes.GENERALSERVICEERROR);
return notify_field+ " : "+endpoint+ " : "+username+ " : "+password+ " : "+response_body;
}