aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java
diff options
context:
space:
mode:
authorJoanna Jeremicz <joanna.jeremicz@nokia.com>2018-09-19 14:35:00 +0200
committerJoanna Jeremicz <joanna.jeremicz@nokia.com>2018-09-28 07:39:18 +0200
commit56f2ad282e7a8d316b92878ae151767fea847265 (patch)
tree6fff9ecd3b4c197ff37bd0f96d430edd75d93adf /vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java
parent52cb6586c32cb99b1aab99bebfa51b01d98beba4 (diff)
HealthCheckController/test refactor
Issue-ID: VID-312 Change-Id: Iabdb91c9b4940ff7a173656819ad5fa807a734e9 Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java
new file mode 100644
index 000000000..6056c2898
--- /dev/null
+++ b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthStatus.java
@@ -0,0 +1,31 @@
+package org.onap.vid.controllers;
+
+import org.springframework.http.HttpStatus;
+
+/**
+ * Model for JSON response with health-check results.
+ */
+public final class HealthStatus {
+
+ private final int statusCode;
+ private final String detailedMsg;
+ private final String date;
+
+ public HealthStatus(HttpStatus code, String date, String detailedMsg) {
+ this.statusCode = code.value();
+ this.detailedMsg = detailedMsg;
+ this.date = date;
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getDetailedMsg() {
+ return detailedMsg;
+ }
+
+ public String getDate() {
+ return date;
+ }
+}