X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=common%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fso%2Futils%2FCheckResults.java;h=5b4c40e3db766a1055a31a59c5a4ed63475e189b;hb=f47919f1fe367b612fa9c96d34c59f01a541e882;hp=4f6089d0e3d144d7bbcfa6123ff4cb36ae6215ca;hpb=54452b80a1cf4d22ef750bc1377f8c1b05431d57;p=so.git diff --git a/common/src/main/java/org/onap/so/utils/CheckResults.java b/common/src/main/java/org/onap/so/utils/CheckResults.java index 4f6089d0e3..5b4c40e3db 100644 --- a/common/src/main/java/org/onap/so/utils/CheckResults.java +++ b/common/src/main/java/org/onap/so/utils/CheckResults.java @@ -24,7 +24,6 @@ package org.onap.so.utils; import java.util.ArrayList; import java.util.List; - import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @@ -33,33 +32,33 @@ import javax.xml.bind.annotation.XmlRootElement; public class CheckResults { @XmlElement(name = "checkresult") - private List results; + private List results; - public CheckResults () { + public CheckResults() { results = new ArrayList<>(); } - public List getResults () { + public List getResults() { return results; } - public void addHostCheckResult (String hostname, int state, String output) { - CheckResult newResult = new CheckResult (); - newResult.setType ("host"); - newResult.setHostname (hostname); - newResult.setState (state); - newResult.setOutput (output); - results.add (newResult); + public void addHostCheckResult(String hostname, int state, String output) { + CheckResult newResult = new CheckResult(); + newResult.setType("host"); + newResult.setHostname(hostname); + newResult.setState(state); + newResult.setOutput(output); + results.add(newResult); } - public void addServiceCheckResult (String hostname, String servicename, int state, String output) { - CheckResult newResult = new CheckResult (); - newResult.setType ("service"); - newResult.setHostname (hostname); - newResult.setServicename (servicename); - newResult.setState (state); - newResult.setOutput (output); - results.add (newResult); + public void addServiceCheckResult(String hostname, String servicename, int state, String output) { + CheckResult newResult = new CheckResult(); + newResult.setType("service"); + newResult.setHostname(hostname); + newResult.setServicename(servicename); + newResult.setState(state); + newResult.setOutput(output); + results.add(newResult); } public static class CheckResult { @@ -71,47 +70,47 @@ public class CheckResults { private String output; @XmlAttribute(required = true) - public String getType () { + public String getType() { return type; } - public void setType (String type) { + public void setType(String type) { this.type = type; } @XmlElement(required = true) - public String getHostname () { + public String getHostname() { return hostname; } - public void setHostname (String hostname) { + public void setHostname(String hostname) { this.hostname = hostname; } @XmlElement(required = false) - public String getServicename () { + public String getServicename() { return servicename; } - public void setServicename (String servicename) { + public void setServicename(String servicename) { this.servicename = servicename; } @XmlElement(required = true) - public int getState () { + public int getState() { return state; } - public void setState (int state) { + public void setState(int state) { this.state = state; } @XmlElement(required = true) - public String getOutput () { + public String getOutput() { return output; } - public void setOutput (String output) { + public void setOutput(String output) { this.output = output; } }