diff options
author | 2018-03-07 18:17:22 -0800 | |
---|---|---|
committer | 2018-03-08 09:17:48 -0800 | |
commit | 327b17ab250b4c17cf3f91f5e4cd9bffd89f3d1e (patch) | |
tree | 0d943226962ae31c0bf2fd0696e91c6bb41d099c /packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java | |
parent | dee036198ee09d71bfdd50247c1d23a7f472df87 (diff) |
Reduce log noise/warnings format to conventions
Reduce build log warnings by formatting tests
to ONAP code conventions (removing tabs etc.)
Issue-ID: SO-368
Change-Id: I48c6d359b83617aebeb79db4e30c1d72d31f7eec
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
Diffstat (limited to 'packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java')
-rw-r--r-- | packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java index 90511033dd..e998778a26 100644 --- a/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java +++ b/packages/arquillian-unit-tests/src/test/java/org/openecomp/mso/global_tests/asdc/notif_emulator/JsonArtifactInfo.java @@ -19,6 +19,7 @@ */ package org.openecomp.mso.global_tests.asdc.notif_emulator; + import java.util.HashMap; import java.util.LinkedList; import java.util.List; @@ -31,92 +32,91 @@ import org.openecomp.sdc.api.notification.IArtifactInfo; public class JsonArtifactInfo implements IArtifactInfo { - @JsonIgnore - private Map<String,IArtifactInfo> artifactsMapByUUID = new HashMap<>(); - - @JsonIgnore - private Map<String,Object> attributesMap = new HashMap<>(); - - public JsonArtifactInfo() { - - } - - public synchronized void addArtifactToUUIDMap (List<JsonArtifactInfo> artifactList) { - for (JsonArtifactInfo artifact:artifactList) { - artifactsMapByUUID.put(artifact.getArtifactUUID(), artifact); - } - - } - - @SuppressWarnings("unused") - @JsonAnySetter - public final void setAttribute(String attrName, Object attrValue) { - if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) { - this.attributesMap.put(attrName,attrValue); - } - } - - - - public Map<String, IArtifactInfo> getArtifactsMapByUUID() { - return artifactsMapByUUID; - } - - @Override - public String getArtifactChecksum() { - return (String)attributesMap.get("artifactCheckSum"); - } - - @Override - public String getArtifactDescription() { - return (String)attributesMap.get("artifactDescription"); - } - - @Override - public String getArtifactName() { - return (String)attributesMap.get("artifactName"); - } - - @Override - public Integer getArtifactTimeout() { - return (Integer)attributesMap.get("artifactTimeout"); - } - - @Override - public String getArtifactType() { - return (String)attributesMap.get("artifactType"); - } - - @Override - public String getArtifactURL() { - return (String)attributesMap.get("artifactURL"); - } - - @Override - public String getArtifactUUID() { - return (String)attributesMap.get("artifactUUID"); - } - - @Override - public String getArtifactVersion() { - return (String)attributesMap.get("artifactVersion"); - } - - @Override - public IArtifactInfo getGeneratedArtifact () { - return artifactsMapByUUID.get(attributesMap.get("generatedArtifact")); - } - - @Override - public List<IArtifactInfo> getRelatedArtifacts() { - List<IArtifactInfo> listArtifacts = new LinkedList<>(); - List<String> uuidList = (List<String>)attributesMap.get("relatedArtifact"); - if (uuidList != null) { - for(String uuid:uuidList) { - listArtifacts.add(artifactsMapByUUID.get(uuid)); - } - } - return listArtifacts; - } + @JsonIgnore + private Map<String, IArtifactInfo> artifactsMapByUUID = new HashMap<>(); + + @JsonIgnore + private Map<String, Object> attributesMap = new HashMap<>(); + + public JsonArtifactInfo() { + + } + + public synchronized void addArtifactToUUIDMap(List<JsonArtifactInfo> artifactList) { + for (JsonArtifactInfo artifact : artifactList) { + artifactsMapByUUID.put(artifact.getArtifactUUID(), artifact); + } + + } + + @SuppressWarnings("unused") + @JsonAnySetter + public final void setAttribute(String attrName, Object attrValue) { + if ((null != attrName) && (!attrName.isEmpty()) && (null != attrValue) && (null != attrValue.toString())) { + this.attributesMap.put(attrName, attrValue); + } + } + + + public Map<String, IArtifactInfo> getArtifactsMapByUUID() { + return artifactsMapByUUID; + } + + @Override + public String getArtifactChecksum() { + return (String) attributesMap.get("artifactCheckSum"); + } + + @Override + public String getArtifactDescription() { + return (String) attributesMap.get("artifactDescription"); + } + + @Override + public String getArtifactName() { + return (String) attributesMap.get("artifactName"); + } + + @Override + public Integer getArtifactTimeout() { + return (Integer) attributesMap.get("artifactTimeout"); + } + + @Override + public String getArtifactType() { + return (String) attributesMap.get("artifactType"); + } + + @Override + public String getArtifactURL() { + return (String) attributesMap.get("artifactURL"); + } + + @Override + public String getArtifactUUID() { + return (String) attributesMap.get("artifactUUID"); + } + + @Override + public String getArtifactVersion() { + return (String) attributesMap.get("artifactVersion"); + } + + @Override + public IArtifactInfo getGeneratedArtifact() { + return artifactsMapByUUID.get(attributesMap.get("generatedArtifact")); + } + + @Override + public List<IArtifactInfo> getRelatedArtifacts() { + List<IArtifactInfo> listArtifacts = new LinkedList<>(); + List<String> uuidList = (List<String>) attributesMap.get("relatedArtifact"); + if (uuidList != null) { + for (String uuid : uuidList) { + listArtifacts.add(artifactsMapByUUID.get(uuid)); + } + } + return listArtifacts; + } } |