diff options
author | Avi Ziv <avi.ziv@amdocs.com> | 2017-07-18 19:45:38 +0300 |
---|---|---|
committer | Avi Ziv <avi.ziv@amdocs.com> | 2017-07-18 19:45:38 +0300 |
commit | b8e2faf476202b6ffe61bc3a9a37df1304881d40 (patch) | |
tree | f78b8c0517d8e16c5ae610bf8b49f68ea8a312a1 /openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types | |
parent | 75aacbbe1acf78fa53378f07f0a8c7769449a17e (diff) |
[SDC] Onboarding 1710 rebase.
Change-Id: If3b6b81d221fde13908f1e8160db6f7d9433c535
Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types')
5 files changed, 166 insertions, 0 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/pom.xml new file mode 100644 index 0000000000..2922980d9e --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/healthcheck-rest/healthcheck-rest-types/pom.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.openecomp.sdc</groupId> + <artifactId>healthcheck-rest</artifactId> + <version>1.1.0-SNAPSHOT</version> + </parent> + + <artifactId>healthcheck-rest-types</artifactId> + <version>1.1.0-SNAPSHOT</version> + + +</project>
\ No newline at end of file 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; + } +} |