diff options
author | 2018-01-22 11:28:42 -0500 | |
---|---|---|
committer | 2018-01-22 11:45:36 -0500 | |
commit | a0e716dc093cd8a4a4ec8aaca7bc1635e518527a (patch) | |
tree | 03aa30d5191e087ebd0c8c803b87a3f163cdb369 /src/main/java/org/onap/crud/parser | |
parent | f4c0fb22527af010761fee9955504bac72ca55db (diff) |
Add query parameters to get properties
Issue-ID: AAI-685
Change-Id: Id06a08ef668591560d276ef8a79c095f31d8c85b
Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/crud/parser')
-rw-r--r-- | src/main/java/org/onap/crud/parser/CrudResponseBuilder.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/onap/crud/parser/CrudResponseBuilder.java b/src/main/java/org/onap/crud/parser/CrudResponseBuilder.java index 62d1408..82fa4ba 100644 --- a/src/main/java/org/onap/crud/parser/CrudResponseBuilder.java +++ b/src/main/java/org/onap/crud/parser/CrudResponseBuilder.java @@ -153,6 +153,13 @@ public class CrudResponseBuilder { item.addProperty("id", v.getId().get()); item.addProperty("type", v.getType()); item.addProperty("url", "services/inventory/" + version + "/" + v.getType() + "/" + v.getId().get()); + if (!v.getProperties().isEmpty()) { + JsonObject propertiesObject = new JsonObject(); + for (String key : v.getProperties().keySet()) { + propertiesObject.addProperty(key, v.getProperties().get(key).toString()); + } + item.add("properties", propertiesObject); + } arry.add(item); } |