aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthCheckStatus.java28
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDto.java61
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDtos.java31
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/MonitoredModules.java29
4 files changed, 149 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthCheckStatus.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthCheckStatus.java
new file mode 100644
index 0000000000..b634a98532
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthCheckStatus.java
@@ -0,0 +1,28 @@
+package org.openecomp.sdcrests.health.types;
+
+
+public enum HealthCheckStatus {
+ UP("UP"),
+ DOWN("DOWN");
+
+ private String name;
+
+ HealthCheckStatus(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public static final HealthCheckStatus toValue(String inVal){
+ for (HealthCheckStatus val : values()){
+ if (val.toString().equals(inVal)){
+ return val;
+ }
+ }
+ return null;
+ }
+}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDto.java
new file mode 100644
index 0000000000..9ed93cfec7
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDto.java
@@ -0,0 +1,61 @@
+package org.openecomp.sdcrests.health.types;
+
+
+public class HealthInfoDto {
+ private MonitoredModules healthCheckComponent;
+ private HealthCheckStatus healthStatus;
+ private String version;
+ private String description;
+
+ public HealthInfoDto() {
+ }
+
+ public HealthInfoDto(MonitoredModules healthCheckComponent, HealthCheckStatus healthStatus, String version, String description) {
+ this.healthCheckComponent = healthCheckComponent;
+ this.healthStatus = healthStatus;
+ this.version = version;
+ this.description = description;
+ }
+
+ public MonitoredModules getHealthCheckComponent() {
+ return healthCheckComponent;
+ }
+
+ public void setHealthCheckComponent(MonitoredModules healthCheckComponent) {
+ this.healthCheckComponent = healthCheckComponent;
+ }
+
+ public HealthCheckStatus getHealthStatus() {
+ return healthStatus;
+ }
+
+ public void setHealthStatus(HealthCheckStatus healthStatus) {
+ this.healthStatus = healthStatus;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @Override
+ public String toString() {
+ return "HealthInfo{" +
+ "healthCheckComponent='" + healthCheckComponent + '\'' +
+ ", healthStatus=" + healthStatus +
+ ", version='" + version + '\'' +
+ ", description='" + description + '\'' +
+ '}';
+ }
+}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDtos.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDtos.java
new file mode 100644
index 0000000000..e1385d6b80
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/HealthInfoDtos.java
@@ -0,0 +1,31 @@
+package org.openecomp.sdcrests.health.types;
+
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class HealthInfoDtos {
+ private List<HealthInfoDto> healthInfos;
+
+ public HealthInfoDtos() {
+ }
+
+ public HealthInfoDtos(List<HealthInfoDto> healthInfos) {
+ this.healthInfos = healthInfos;
+ }
+
+ public List<HealthInfoDto> getHealthInfos() {
+ return healthInfos;
+ }
+
+ public void setHealthInfos(List<HealthInfoDto> healthInfos) {
+ this.healthInfos = healthInfos;
+ }
+
+ @Override
+ public String toString() {
+ return healthInfos.stream().map(healthInfoDto -> healthInfoDto.toString())
+ .collect(Collectors.joining(", "));
+
+ }
+}
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/MonitoredModules.java b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/MonitoredModules.java
new file mode 100644
index 0000000000..5ecb37a99b
--- /dev/null
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/src/main/java/org/openecomp/sdcrests/health/types/MonitoredModules.java
@@ -0,0 +1,29 @@
+package org.openecomp.sdcrests.health.types;
+
+
+public enum MonitoredModules {
+ BE("BE"),
+ CAS("Cassandra"),
+ ZU("Zusammen");
+
+ private String name;
+
+ MonitoredModules(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ public static final MonitoredModules toValue(String inVal){
+ for (MonitoredModules val : values()){
+ if (val.toString().equals(inVal)){
+ return val;
+ }
+ }
+ return null;
+ }
+}