summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/main
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-01-25 17:08:41 -0500
committerSmokowski, Steve (ss835w) <ss835w@us.att.com>2019-01-28 14:39:43 -0500
commitfe91155454a27401e8c23780fa247c0ede196747 (patch)
tree26d0f2e56d9b31283c5f2173c5e765d035187137 /bpmn/MSOCoreBPMN/src/main
parentd62389df8c10d46609c5770b45697f7ac401dc82 (diff)
parentfe76d074a452e58d4122cc234d17e7aa407a1b44 (diff)
Merge 'origin/casablanca' into master
Issue-ID: SO-1435 Change-Id: If065ef5c91e769452fd6701fa6c28a23b4bdf2b2 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/main')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java25
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java14
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java15
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java3
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java13
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java4
6 files changed, 59 insertions, 15 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
index 9c80548490..52207f2156 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/RollbackData.java
@@ -25,24 +25,26 @@ import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
/**
- * An object that stores data for rollbacks. Data is organized by type. A
- * type is simply a string identifier. Multiple types of data may be stored
- * in the same object for separate rollback operations.
+ * An object that stores data for rollbacks. Data is organized by type. A type is simply a string
+ * identifier. Multiple types of data may be stored in the same object for separate rollback
+ * operations.
*/
public class RollbackData implements Serializable {
private static final long serialVersionUID = 1L;
- private Map<String, Map<String, Serializable>> dictionary =
- new HashMap<>();
+ @JsonProperty
+ private final Map<String, Map<String, Serializable>> dictionary = new HashMap<>();
/**
* Returns true if the specified type is stored in this object.
*
* @param type the data type
*/
- public boolean hasType(String type) {
+ public boolean hasType(final String type) {
return dictionary.containsKey(type);
}
@@ -53,9 +55,8 @@ public class RollbackData implements Serializable {
* @param key the key
* @param value the value
*/
- public void put(String type, String key, String value) {
- Map<String, Serializable> mapForType = dictionary
- .computeIfAbsent(type, k -> new HashMap<>());
+ public void put(final String type, final String key, final String value) {
+ final Map<String, Serializable> mapForType = dictionary.computeIfAbsent(type, k -> new HashMap<>());
mapForType.put(key, value);
}
@@ -67,8 +68,8 @@ public class RollbackData implements Serializable {
* @param key the key
* @return the item or null if there is no item for the specified type and key
*/
- public Serializable get(String type, String key) {
- Map<String, Serializable> mapForType = dictionary.get(type);
+ public Serializable get(final String type, final String key) {
+ final Map<String, Serializable> mapForType = dictionary.get(type);
if (mapForType == null) {
return null;
@@ -83,7 +84,7 @@ public class RollbackData implements Serializable {
* @param type the data type
* @return a map, or null if there are no items associated with the specified data type
*/
- public Map<String, Serializable> get(String type) {
+ public Map<String, Serializable> get(final String type) {
return dictionary.get(type);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
index f143346cae..c7c7bba20c 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/AllottedResource.java
@@ -22,6 +22,8 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -55,6 +57,9 @@ public class AllottedResource extends Resource {
private String nfNamingCode;
private String orchestrationStatus;
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -119,4 +124,13 @@ public class AllottedResource extends Resource {
public void setOrchestrationStatus(String orchestrationStatus) {
this.orchestrationStatus = orchestrationStatus;
}
+
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
index 20ab3ecc84..f0e97f15ef 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/NetworkResource.java
@@ -22,6 +22,8 @@ package org.onap.so.bpmn.core.domain;
import java.util.UUID;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -47,7 +49,10 @@ public class NetworkResource extends Resource {
private String networkRole;
private String networkTechnology;
private String networkScope;
-
+
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -75,4 +80,12 @@ public class NetworkResource extends Resource {
public void setNetworkScope(String networkScope) {
this.networkScope = networkScope;
}
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
index 4295f50a3c..5cdbbcb7c9 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/ServiceInstance.java
@@ -23,6 +23,8 @@ package org.onap.so.bpmn.core.domain;
import java.io.Serializable;
import java.util.Map;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
/**
@@ -32,6 +34,7 @@ import com.fasterxml.jackson.annotation.JsonRootName;
* @author cb645j
*
*/
+@JsonIgnoreProperties(ignoreUnknown = true)
public class ServiceInstance extends JsonWrapper implements Serializable {
private static final long serialVersionUID = 1L;
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
index dc76ab0bc7..a7e5389583 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/domain/VnfResource.java
@@ -25,6 +25,7 @@ import java.util.List;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
@@ -59,6 +60,9 @@ public class VnfResource extends Resource {
private String multiStageDesign;
private String orchestrationStatus;
+ @JsonIgnore
+ private String resourceInput;
+
/*
* GET and SET
*/
@@ -123,6 +127,15 @@ public class VnfResource extends Resource {
public void setOrchestrationStatus(String orchestrationStatus){
this.orchestrationStatus = orchestrationStatus;
}
+
+ public String getResourceInput() {
+ return resourceInput;
+ }
+
+ public void setResourceInput(String resourceInput) {
+ this.resourceInput = resourceInput;
+ }
+
/**
* Returns a list of all VfModule objects.
* Base module is first entry in the list
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
index ee53148e44..35f76908e3 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/json/JsonUtils.java
@@ -927,7 +927,7 @@ public class JsonUtils {
for (int i = 0; i < arr.length(); i++){
JSONObject jo = arr.getJSONObject(i);
String key = jo.getString(keyNode);
- String value = jo.getString(valueNode);
+ String value = jo.get(valueNode).toString();
map.put(key, value);
}
msoLogger.debug("Completed Entry Array To Map Util Method");
@@ -954,7 +954,7 @@ public class JsonUtils {
for(int i = 0; i < arr.length(); i++){
JSONObject jo = arr.getJSONObject(i);
String key = jo.getString(keyNode);
- String value = jo.getString(valueNode);
+ String value = jo.get(valueNode).toString();
map.put(key, value);
}
msoLogger.debug("Completed Entry Array To Map Util Method");