diff options
author | vasraz <vasyl.razinkov@est.tech> | 2021-03-22 15:33:06 +0000 |
---|---|---|
committer | Christophe Closset <christophe.closset@intl.att.com> | 2021-03-24 06:59:47 +0000 |
commit | d378c37fbd1ecec7b43394926f1ca32a695e07de (patch) | |
tree | 5c8a085f8732f980d871d966ac49361644efa698 /openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java | |
parent | a6ae7294ecd336d7e88f915710b08e2658eaee00 (diff) |
Reformat openecomp-be
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3449
Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java')
11 files changed, 77 insertions, 121 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java index 1185527c03..a2979824bc 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/api/EnrichmentManager.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,30 +17,23 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.api; +import java.util.List; +import java.util.Map; import org.openecomp.core.enrichment.types.EntityInfo; import org.openecomp.sdc.datatypes.error.ErrorMessage; import org.openecomp.sdc.versioning.dao.types.Version; -import java.util.List; -import java.util.Map; - - -public interface - -EnrichmentManager<T> { - - - Map<String, List<ErrorMessage>> enrich(); +public interface EnrichmentManager<T> { - void addEntityInfo(String entityKey, EntityInfo entityInfo); + Map<String, List<ErrorMessage>> enrich(); - void init(String key, Version version); + void addEntityInfo(String entityKey, EntityInfo entityInfo); - T getModel(); + void init(String key, Version version); - void setModel(T model); + T getModel(); + void setModel(T model); } diff --git a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java index 9d72a88fa9..39ef9305c1 100644 --- a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.java +++ b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-api/src/main/java/org/openecomp/core/enrichment/factory/EnrichmentManagerFactory.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,19 +17,15 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.core.enrichment.factory; import org.openecomp.core.enrichment.api.EnrichmentManager; import org.openecomp.core.factory.api.AbstractComponentFactory; import org.openecomp.core.factory.api.AbstractFactory; - - - public abstract class EnrichmentManagerFactory extends AbstractComponentFactory<EnrichmentManager> { - public static EnrichmentManagerFactory getInstance() { - return AbstractFactory.getInstance(EnrichmentManagerFactory.class); - } + public static EnrichmentManagerFactory getInstance() { + return AbstractFactory.getInstance(EnrichmentManagerFactory.class); + } } 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<String, ArtifactCategory> mMap = - Collections.unmodifiableMap(initializeMapping()); - - @Getter - private String displayName; - - /** - * Initialize mapping map. - * - * @return the map - */ - public static Map<String, ArtifactCategory> initializeMapping() { - Map<String, ArtifactCategory> typeMap = new HashMap<>(); - for (ArtifactCategory v : ArtifactCategory.values()) { - typeMap.put(v.displayName, v); + INFORMATIONAL("Informational"), DEPLOYMENT("Deployment"); + private static final Map<String, ArtifactCategory> mMap = Collections.unmodifiableMap(initializeMapping()); + @Getter + private String displayName; + + /** + * Initialize mapping map. + * + * @return the map + */ + public static Map<String, ArtifactCategory> initializeMapping() { + Map<String, ArtifactCategory> 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<CeilometerMetric> 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<MonitoringUploadType, MonitoringArtifactInfo> infoByType = new HashMap<>(); - private Map<MonitoringUploadType, MonitoringArtifactInfo> 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} |