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 --- .../configuration/ImplementationConfiguration.java | 27 +++++----- .../openecomp/sdc/datatypes/error/ErrorLevel.java | 10 ++-- .../sdc/datatypes/error/ErrorMessage.java | 58 ++++++++++------------ .../openecomp/sdc/datatypes/model/AsdcModel.java | 6 +-- .../openecomp/sdc/datatypes/model/ElementType.java | 55 ++++++++++---------- .../openecomp/sdc/datatypes/model/ItemType.java | 10 ++-- .../model/heat/ForbiddenHeatResourceTypes.java | 47 ++++++++---------- 7 files changed, 97 insertions(+), 116 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-datatypes-lib/src') diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java index 64ff886b24..c6b9a6ca81 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/configuration/ImplementationConfiguration.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,14 +17,12 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.datatypes.configuration; -import org.onap.config.api.Config; - import java.util.Map; import lombok.Getter; import lombok.Setter; +import org.onap.config.api.Config; /** * @author shiria @@ -34,14 +32,15 @@ import lombok.Setter; @Getter @Setter public class ImplementationConfiguration { - @Config(key = "enable") - Boolean enable = true; - @Config(key = "implementationClass") - String implementationClass; - @Config(key = "properties") - Map properties; - public Boolean isEnable() { - return enable; - } + @Config(key = "enable") + Boolean enable = true; + @Config(key = "implementationClass") + String implementationClass; + @Config(key = "properties") + Map properties; + + public Boolean isEnable() { + return enable; + } } diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java index 5477a35d8f..5c33e7b1cd 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorLevel.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,10 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.datatypes.error; - -public enum ErrorLevel { - ERROR, WARNING, INFO -} +public enum ErrorLevel {ERROR, WARNING, INFO} diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java index a8aeb17a51..334639db0e 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/error/ErrorMessage.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.sdc.datatypes.error; import java.util.ArrayList; @@ -32,38 +31,35 @@ import org.apache.commons.collections4.CollectionUtils; @EqualsAndHashCode @ToString public class ErrorMessage { - private final ErrorLevel level; - private final String message; - - public ErrorMessage(ErrorLevel level, String message) { - this.level = level; - this.message = message; - } - public static class ErrorMessageUtil { + private final ErrorLevel level; + private final String message; - private ErrorMessageUtil() { + public ErrorMessage(ErrorLevel level, String message) { + this.level = level; + this.message = message; } - /** - * Add message list. - * - * @param fileName the file name - * @param errorMap the error map - * @return the list - */ - public static List addMessage(String fileName, - Map> errorMap) { - List fileErrorList; - fileErrorList = errorMap.get(fileName); - if (CollectionUtils.isEmpty(fileErrorList)) { - fileErrorList = new ArrayList<>(); - errorMap.put(fileName, fileErrorList); - } - - return fileErrorList; - } - } + public static class ErrorMessageUtil { + private ErrorMessageUtil() { + } + /** + * Add message list. + * + * @param fileName the file name + * @param errorMap the error map + * @return the list + */ + public static List addMessage(String fileName, Map> errorMap) { + List fileErrorList; + fileErrorList = errorMap.get(fileName); + if (CollectionUtils.isEmpty(fileErrorList)) { + fileErrorList = new ArrayList<>(); + errorMap.put(fileName, fileErrorList); + } + return fileErrorList; + } + } } diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java index 7d873432b9..503e182f08 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/AsdcModel.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,8 +17,8 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.datatypes.model; public interface AsdcModel { + } diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java index d1ddc5c48d..99ef5a0d9a 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ElementType.java @@ -13,38 +13,39 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package org.openecomp.sdc.datatypes.model; public enum ElementType { - itemVersion, + itemVersion, - VendorLicenseModel, - LicenseAgreements, LicenseAgreement, - FeatureGroups, FeatureGroup, - LicenseKeyGroups, LicenseKeyGroup, - EntitlementPools, EntitlementPool, - Limits, Limit, + VendorLicenseModel, + LicenseAgreements, LicenseAgreement, + FeatureGroups, FeatureGroup, + LicenseKeyGroups, LicenseKeyGroup, + EntitlementPools, EntitlementPool, + Limits, Limit, - VendorSoftwareProduct, - VSPQuestionnaire, + VendorSoftwareProduct, + VSPQuestionnaire, - VspModel, NetworkPackage, - OrchestrationTemplateCandidate, OrchestrationTemplateCandidateContent, - OrchestrationTemplateCandidateValidationData, ORIGINAL_ONBOARDED_PACKAGE, - OrchestrationTemplateStructure, OrchestrationTemplate, - OrchestrationTemplateValidationData, - // todo - remove OrchestrationTemplateContent - OrchestrationTemplateContent, - Networks, Network, - Components, Component, ComponentQuestionnaire, ComponentDependencies, ComponentDependency, - Nics, Nic, NicQuestionnaire, - Mibs, SNMP_POLL, SNMP_TRAP, VES_EVENTS, - Processes, Process, - DeploymentFlavors, DeploymentFlavor, - Computes, Compute, ComputeQuestionnaire, - Images, Image, ImageQuestionnaire, - ServiceModel, EnrichedServiceModel, ServiceTemplate, Templates, Artifact, Artifacts, + VspModel, NetworkPackage, + OrchestrationTemplateCandidate, + OrchestrationTemplateCandidateContent, + OrchestrationTemplateCandidateValidationData, + ORIGINAL_ONBOARDED_PACKAGE, + OrchestrationTemplateStructure, OrchestrationTemplate, + OrchestrationTemplateValidationData, + // todo - remove OrchestrationTemplateContent + OrchestrationTemplateContent, + Networks, Network, + Components, Component, ComponentQuestionnaire, ComponentDependencies, ComponentDependency, + Nics, Nic, NicQuestionnaire, + Mibs, SNMP_POLL, SNMP_TRAP, VES_EVENTS, + Processes, Process, + DeploymentFlavors, DeploymentFlavor, + Computes, Compute, ComputeQuestionnaire, + Images, Image, ImageQuestionnaire, + ServiceModel, EnrichedServiceModel, ServiceTemplate, Templates, Artifact, Artifacts, - test + test } diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ItemType.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ItemType.java index 98b64cabfb..ff4bfd95ab 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ItemType.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/ItemType.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,10 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.datatypes.model; -public enum ItemType { - vlm, - vsp -} +public enum ItemType {vlm, vsp} diff --git a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java index f0310ba68a..99b55e9964 100644 --- a/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.java +++ b/openecomp-be/lib/openecomp-sdc-datatypes-lib/src/main/java/org/openecomp/sdc/datatypes/model/heat/ForbiddenHeatResourceTypes.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,41 +17,34 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdc.datatypes.model.heat; import java.util.HashMap; import java.util.Map; import java.util.Objects; - public enum ForbiddenHeatResourceTypes { - HEAT_FLOATING_IP_TYPE("OS::Neutron::FloatingIP"); - - - private static Map stringToForbiddenHeatResourceTypeMap; - - static { - stringToForbiddenHeatResourceTypeMap = new HashMap<>(); - - for (ForbiddenHeatResourceTypes type : ForbiddenHeatResourceTypes.values()) { - stringToForbiddenHeatResourceTypeMap.put(type.forbiddenType, type); + HEAT_FLOATING_IP_TYPE("OS::Neutron::FloatingIP"); + private static Map stringToForbiddenHeatResourceTypeMap; + + static { + stringToForbiddenHeatResourceTypeMap = new HashMap<>(); + for (ForbiddenHeatResourceTypes type : ForbiddenHeatResourceTypes.values()) { + stringToForbiddenHeatResourceTypeMap.put(type.forbiddenType, type); + } } - } - private String forbiddenType; + private String forbiddenType; + ForbiddenHeatResourceTypes(String forbiddenType) { + this.forbiddenType = forbiddenType; + } - ForbiddenHeatResourceTypes(String forbiddenType) { - this.forbiddenType = forbiddenType; - } - - public static ForbiddenHeatResourceTypes findByForbiddenHeatResource(String heatResource) { - return stringToForbiddenHeatResourceTypeMap.get(heatResource); - } - + public static ForbiddenHeatResourceTypes findByForbiddenHeatResource(String heatResource) { + return stringToForbiddenHeatResourceTypeMap.get(heatResource); + } - public static boolean isResourceTypeValid(String resourceType) { - return Objects.nonNull(findByForbiddenHeatResource(resourceType)); - } + public static boolean isResourceTypeValid(String resourceType) { + return Objects.nonNull(findByForbiddenHeatResource(resourceType)); + } } -- cgit 1.2.3-korg