diff options
author | Nelson, Thomas (arthurdent3) <nelson24@att.com> | 2019-05-09 14:16:37 +0000 |
---|---|---|
committer | Tschaen, Brendan <ctschaen@att.com> | 2019-05-13 14:34:05 -0400 |
commit | d6e7b63cc580e7b3822be61fe92a493ad5e222a3 (patch) | |
tree | 5a055529781a2989585075e13426979464f5fb33 /src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java | |
parent | 9a8b8ae8d7c8d6931f99def68068f8936a8cc0b3 (diff) |
Changes Listed below:
- Added build version API
- Updated Keyspace active to use Properties setting
- Update Libraries Netty,jbcrypt,Jackson Databind and log4j
- Removed some irrelivant files
- Updated some usint tests to ignore some tests(This will be updated soon)
- Bugfixes
- Missing Values, inform user.
- Respond with proper error
- Fix Locking Contention issue.
- Add locking retry for atomic calls.
Change-Id: Ie218dd92edb0c20e4a0efe33eeaaec84e5293c44
Issue-ID: MUSIC-393
Signed-off-by: Nelson, Thomas (arthurdent3) <nelson24@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java')
-rw-r--r-- | src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java b/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java index 8e589efe..66fec9c2 100644 --- a/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java +++ b/src/main/java/org/onap/music/response/jsonobjects/JsonResponse.java @@ -44,6 +44,7 @@ public class JsonResponse { /* versioning */ private String musicVersion; + private String musicBuild; /* Data Fields */ private Map<String, HashMap<String, Object>> dataResult; @@ -65,7 +66,7 @@ public class JsonResponse { this.status = status; } - /** + /** * * @return */ @@ -122,7 +123,7 @@ public class JsonResponse { /** - * + * . * @return the music version */ public String getMusicVersion() { @@ -130,7 +131,7 @@ public class JsonResponse { } /** - * + * . * @param version of music * @return */ @@ -139,6 +140,25 @@ public class JsonResponse { return this; } + /** + * . + * @return the music version + */ + public String getMusicBuild() { + return this.musicBuild; + } + + /** + * . + * @param build of music + * @return + */ + public JsonResponse setMusicBuild(String build) { + this.musicBuild = build; + return this; + } + + public Map<String, HashMap<String, Object>> getDataResult() { return this.dataResult; } @@ -227,37 +247,37 @@ public class JsonResponse { public Map<String, Object> toMap() { Map<String, Object> fullMap = new HashMap<>(); fullMap.put("status", status); -/*<<<<<<< HEAD - if (error!=null) { - fullMap.put("error", error); + if (error != null && !"".equals(error)) { + fullMap.put("error", error); } - if (message!=null) { - fullMap.put("message", message); + if (message != null) { + fullMap.put("message", message); } -=======*/ - if (error!=null && !"".equals(error)) {fullMap.put("error", error);} - if (message!=null) {fullMap.put("message", message);} - if (musicVersion!=null) { + if (musicVersion != null) { fullMap.put("version", musicVersion); } - if (dataResult!=null) { + if (musicBuild != null) { + fullMap.put("build", musicBuild); + } + + if (dataResult != null) { fullMap.put("result", dataResult); } - if (lock!=null) { + if (lock != null) { Map<String, Object> lockMap = new HashMap<>(); - if (lock!=null) { + if (lock != null) { lockMap.put("lock", lock); } - if (lockStatus!=null) { + if (lockStatus != null) { lockMap.put("lock-status", lockStatus); } - if (lockHolder!=null) { + if (lockHolder != null) { lockMap.put("lock-holder", lockHolder); } - if (lockLease!=null) { + if (lockLease != null) { lockMap.put("lock-lease", lockLease); } fullMap.put("lock", lockMap); |