From d378c37fbd1ecec7b43394926f1ca32a695e07de Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 22 Mar 2021 15:33:06 +0000 Subject: Reformat openecomp-be Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3449 Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1 --- .../core/enrichment/types/ArtifactCategory.java | 65 ++++++++++------------ .../core/enrichment/types/CeilometerMetric.java | 13 ++--- .../core/enrichment/types/CeilometerMetrics.java | 2 +- .../types/ComponentMonitoringUploadInfo.java | 39 +++++++------ .../enrichment/types/ComponentProcessInfo.java | 6 -- .../core/enrichment/types/EntityInfo.java | 7 +-- .../types/InformationArtifactFolderNames.java | 9 +-- .../enrichment/types/MonitoringArtifactInfo.java | 3 - .../enrichment/types/MonitoringUploadType.java | 13 +---- 9 files changed, 62 insertions(+), 95 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types') diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java index c037832e58..e1405d5435 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ArtifactCategory.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.types; import java.util.Collections; @@ -26,42 +25,36 @@ import java.util.Map; import lombok.AllArgsConstructor; import lombok.Getter; - @AllArgsConstructor public enum ArtifactCategory { - - INFORMATIONAL("Informational"), - DEPLOYMENT("Deployment"); - - private static final Map mMap = - Collections.unmodifiableMap(initializeMapping()); - - @Getter - private String displayName; - - /** - * Initialize mapping map. - * - * @return the map - */ - public static Map initializeMapping() { - Map typeMap = new HashMap<>(); - for (ArtifactCategory v : ArtifactCategory.values()) { - typeMap.put(v.displayName, v); + INFORMATIONAL("Informational"), DEPLOYMENT("Deployment"); + private static final Map mMap = Collections.unmodifiableMap(initializeMapping()); + @Getter + private String displayName; + + /** + * Initialize mapping map. + * + * @return the map + */ + public static Map initializeMapping() { + Map typeMap = new HashMap<>(); + for (ArtifactCategory v : ArtifactCategory.values()) { + typeMap.put(v.displayName, v); + } + return typeMap; } - return typeMap; - } - /** - * Gets artifact type by display name. - * - * @param displayName the display name - * @return the artifact type by display name - */ - public static ArtifactCategory getArtifactTypeByDisplayName(String displayName) { - if (mMap.containsKey(displayName)) { - return mMap.get(displayName); + /** + * Gets artifact type by display name. + * + * @param displayName the display name + * @return the artifact type by display name + */ + public static ArtifactCategory getArtifactTypeByDisplayName(String displayName) { + if (mMap.containsKey(displayName)) { + return mMap.get(displayName); + } + return null; } - return null; - } } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetric.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetric.java index e795a94b46..b93a483dfc 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetric.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetric.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.core.enrichment.types; import lombok.Data; @@ -21,11 +20,9 @@ import lombok.Data; @Data public class CeilometerMetric { - private String name; - private String type; - private String unit; - private String category; - private String description; - - + private String name; + private String type; + private String unit; + private String category; + private String description; } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetrics.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetrics.java index f85100b038..70ac71b4c4 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetrics.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/CeilometerMetrics.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.core.enrichment.types; import java.util.List; @@ -21,5 +20,6 @@ import lombok.Data; @Data public class CeilometerMetrics { + private List ceilometerMetricList; } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMonitoringUploadInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMonitoringUploadInfo.java index 63e161fae9..bd14e5a1e5 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMonitoringUploadInfo.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentMonitoringUploadInfo.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,33 +17,32 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.types; +import static org.openecomp.core.enrichment.types.MonitoringUploadType.SNMP_POLL; +import static org.openecomp.core.enrichment.types.MonitoringUploadType.SNMP_TRAP; +import static org.openecomp.core.enrichment.types.MonitoringUploadType.VES_EVENTS; + import java.util.HashMap; import java.util.Map; -import static org.openecomp.core.enrichment.types.MonitoringUploadType.*; - public class ComponentMonitoringUploadInfo { + private Map infoByType = new HashMap<>(); - private Map infoByType = new HashMap<>(); - - public MonitoringArtifactInfo getSnmpTrap() { - return infoByType.get(SNMP_TRAP); - } + public MonitoringArtifactInfo getSnmpTrap() { + return infoByType.get(SNMP_TRAP); + } - public MonitoringArtifactInfo getSnmpPoll() { - return infoByType.get(SNMP_POLL); - } + public MonitoringArtifactInfo getSnmpPoll() { + return infoByType.get(SNMP_POLL); + } - public MonitoringArtifactInfo getVesEvent() { - return infoByType.get(VES_EVENTS); - } + public MonitoringArtifactInfo getVesEvent() { + return infoByType.get(VES_EVENTS); + } - public void setMonitoringArtifactFile(MonitoringUploadType type, - MonitoringArtifactInfo monitoringArtifactInfo) { - infoByType.put(type, monitoringArtifactInfo); - } + public void setMonitoringArtifactFile(MonitoringUploadType type, MonitoringArtifactInfo monitoringArtifactInfo) { + infoByType.put(type, monitoringArtifactInfo); + } } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentProcessInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentProcessInfo.java index 3abbd13475..4e6599d18f 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentProcessInfo.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/ComponentProcessInfo.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.core.enrichment.types; import java.io.ByteArrayInputStream; @@ -21,20 +20,15 @@ import java.io.InputStream; import lombok.Getter; import lombok.Setter; - public class ComponentProcessInfo { @Setter @Getter private String name; - @Setter private byte[] content; - public InputStream getContent() { return new ByteArrayInputStream(this.content); } - - } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java index ac80eb9d03..b9da11c221 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/EntityInfo.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,11 +17,8 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.types; - public interface EntityInfo { - } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/InformationArtifactFolderNames.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/InformationArtifactFolderNames.java index 68f0db3524..c54d4af181 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/InformationArtifactFolderNames.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/InformationArtifactFolderNames.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,12 +17,9 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.types; /** * Created by Talio on 12/5/2016. */ -public enum InformationArtifactFolderNames { - Guide; -} +public enum InformationArtifactFolderNames {Guide;} diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringArtifactInfo.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringArtifactInfo.java index cbb883162c..c2e72f0ab6 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringArtifactInfo.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringArtifactInfo.java @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.core.enrichment.types; import java.io.ByteArrayInputStream; @@ -21,7 +20,6 @@ import java.io.InputStream; import lombok.Getter; import lombok.Setter; - public class MonitoringArtifactInfo { @Setter @@ -33,5 +31,4 @@ public class MonitoringArtifactInfo { public InputStream getContent() { return new ByteArrayInputStream(this.content); } - } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringUploadType.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringUploadType.java index 077480f95f..1a13d3cb48 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringUploadType.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/types/MonitoringUploadType.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,13 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.types; -public enum MonitoringUploadType { - SNMP_POLL, - SNMP_TRAP, - VES_EVENTS -} - - +public enum MonitoringUploadType {SNMP_POLL, SNMP_TRAP, VES_EVENTS} -- cgit 1.2.3-korg