Reformat common-be 37/119937/2
authorvasraz <vasyl.razinkov@est.tech>
Sat, 27 Mar 2021 22:37:42 +0000 (22:37 +0000)
committerChristophe Closset <christophe.closset@intl.att.com>
Mon, 29 Mar 2021 07:15:40 +0000 (07:15 +0000)
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-3449
Change-Id: I910e423a6ff68e84035f4d3391d00f244730405c

119 files changed:
common-be/src/main/java/org/openecomp/sdc/be/config/NonManoArtifactType.java
common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfiguration.java
common-be/src/main/java/org/openecomp/sdc/be/config/NonManoConfigurationManager.java
common-be/src/main/java/org/openecomp/sdc/be/config/NonManoFolderType.java
common-be/src/main/java/org/openecomp/sdc/be/config/exception/LoadConfigurationException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/pnf/PnfSoftwareInformation.java
common-be/src/main/java/org/openecomp/sdc/be/csar/pnf/PnfSoftwareVersion.java
common-be/src/main/java/org/openecomp/sdc/be/csar/pnf/SoftwareInformationArtifactYamlParser.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/CertificateManagerImpl.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/PrivateKeyReaderImpl.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/Sha256WithRsaCmsContentSigner.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/X509CertificateReader.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/api/CertificateManager.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/api/CertificateReader.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/api/CmsContentSigner.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/api/PrivateKeyReader.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/api/model/CertificateInfo.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/exception/CertificateNotFoundException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/exception/CmsSignatureException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/exception/LoadCertificateException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/exception/LoadPrivateKeyException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/exception/UnsupportedKeyFormatException.java
common-be/src/main/java/org/openecomp/sdc/be/csar/security/model/CertificateInfoImpl.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/category/CategoryDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/category/GroupingDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/category/MetadataKeyDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/category/SubCategoryDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ComponentMetadataDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ResourceMetadataDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/components/ServiceMetadataDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AdditionalInfoParameterDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AdditionalInfoParameterInfo.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/Annotation.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AnnotationTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ArtifactDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/AttributeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CINodeFilterDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CapabilityTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ComponentInstanceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/CompositionDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ConsumerDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/DataTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ForwardingPathDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ForwardingPathElementDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetInputValueDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetOutputValueDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GetPolicyValueDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupInstanceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/GroupTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/HeatParameterDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InputDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InputsValueDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/InterfaceInstanceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ListCapabilityDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ListDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ListMapPropertiesDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ListRequirementDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapArtifactDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapAttributesDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapCapabilityProperty.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapComponentInstanceExternalRefs.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapGroupsDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapInterfaceDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapListCapabilityDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapListRequirementDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/MapPropertiesDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationImplementation.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInputDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationInstance.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/OperationOutputDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PolicyDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PolicyTargetType.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PolicyTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ProductMetadataDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertiesOwner.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/PropertyRule.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RelationshipInstDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterCapabilityDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementNodeFilterPropertyDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementSubstitutionFilterCapabilityDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/RequirementSubstitutionFilterPropertyDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/SchemaDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/SubstitutionFilterDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaArtifactDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/elements/ToscaTypeDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/AssetTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentFieldsEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ComponentTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ConnectionPointEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/CreatedFrom.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/DeclarationTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/EnvironmentStatusEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ExternalCategoryTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/FilterKeyEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GraphPropertyEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/GroupTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/InstantiationTypes.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFields.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/JsonPresentationFieldsExtractor.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/MetadataKeyEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeFilterConstraintType.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/NodeTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/OriginTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PortMirroringEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/PromoteVersionEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/enums/ResourceTypeEnum.java
common-be/src/main/java/org/openecomp/sdc/be/datatypes/tosca/ToscaDataDefinition.java
common-be/src/main/java/org/openecomp/sdc/be/togglz/ToggleableFeature.java
common-be/src/main/java/org/openecomp/sdc/be/togglz/TogglzConfiguration.java
common-be/src/main/java/org/openecomp/sdc/be/utils/CommonBeUtils.java
common-be/src/main/java/org/openecomp/sdc/be/utils/PropertyDefinitionUtils.java
common-be/src/main/java/org/openecomp/sdc/be/utils/TypeUtils.java

index 02dcb35..1c7ef86 100644 (file)
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.config;
 
-import lombok.AllArgsConstructor;
-import lombok.Getter;
-
 import java.util.Arrays;
 import java.util.Optional;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
 
 /**
  * Stores non mano artifact types.
@@ -31,6 +29,7 @@ import java.util.Optional;
 @Getter
 @AllArgsConstructor
 public enum NonManoArtifactType {
+    // @formatter:off
     ONAP_VES_EVENTS("onap_ves_events"),
     ONAP_PM_DICTIONARY("onap_pm_dictionary"),
     ONAP_YANG_MODULES("onap_yang_modules"),
@@ -39,6 +38,7 @@ public enum NonManoArtifactType {
     ONAP_OTHERS("onap_others"),
     ONAP_SW_INFORMATION("onap_pnf_sw_information"),
     ONAP_CNF_HELM("onap_cnf_helm");
+    // @formatter:on
 
     private final String type;
 
index 2b26022..843d6fb 100644 (file)
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.config;
 
 import java.util.Collections;
+import java.util.Map;
 import java.util.Map.Entry;
 import java.util.stream.Collectors;
 import lombok.Data;
-
-import java.util.Map;
 import org.apache.commons.collections.MapUtils;
 
 /**
@@ -32,13 +30,14 @@ import org.apache.commons.collections.MapUtils;
  */
 @Data
 public class NonManoConfiguration {
+
     private Map<String, NonManoFolderType> nonManoKeyFolderMapping;
 
     /**
      * Gets the non mano folder type based on the non mano artifact type.
+     *
      * @param nonManoArtifactType the artifact type
-     * @return
-     *  The NonManoType for the artifact type
+     * @return The NonManoType for the artifact type
      */
     public NonManoFolderType getNonManoType(final NonManoArtifactType nonManoArtifactType) {
         return nonManoKeyFolderMapping.get(nonManoArtifactType.getType());
@@ -48,9 +47,7 @@ public class NonManoConfiguration {
         if (MapUtils.isEmpty(nonManoKeyFolderMapping)) {
             return Collections.emptyMap();
         }
-
-        return nonManoKeyFolderMapping.entrySet().stream()
-            .filter(entry -> entry.getValue().isValid())
+        return nonManoKeyFolderMapping.entrySet().stream().filter(entry -> entry.getValue().isValid())
             .collect(Collectors.toMap(Entry::getKey, Entry::getValue));
     }
 }
index 640c95b..14a48d5 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.config;
 
 import java.io.IOException;
@@ -30,6 +29,7 @@ import org.yaml.snakeyaml.Yaml;
  * Singleton that loads and stores the Non Mano configuration
  */
 public class NonManoConfigurationManager {
+
     private static NonManoConfigurationManager nonManoConfigurationManager = null;
     private NonManoConfiguration nonManoConfiguration;
 
@@ -37,6 +37,13 @@ public class NonManoConfigurationManager {
         loadConfiguration();
     }
 
+    public static NonManoConfigurationManager getInstance() {
+        if (nonManoConfigurationManager == null) {
+            nonManoConfigurationManager = new NonManoConfigurationManager();
+        }
+        return nonManoConfigurationManager;
+    }
+
     /**
      * Loads the configuration yaml from the resources.
      */
@@ -54,14 +61,6 @@ public class NonManoConfigurationManager {
         nonManoConfiguration = convertFromString(data, NonManoConfiguration.class);
     }
 
-    public static NonManoConfigurationManager getInstance() {
-        if (nonManoConfigurationManager == null) {
-            nonManoConfigurationManager = new NonManoConfigurationManager();
-        }
-
-        return nonManoConfigurationManager;
-    }
-
     public NonManoConfiguration getNonManoConfiguration() {
         return nonManoConfiguration;
     }
@@ -70,9 +69,7 @@ public class NonManoConfigurationManager {
         try {
             return (new Yaml()).loadAs(yamlContents, className);
         } catch (final Exception e) {
-            throw new
-                LoadConfigurationException(String.format("Failed to convert YAML %s to object.", yamlContents), e);
+            throw new LoadConfigurationException(String.format("Failed to convert YAML %s to object.", yamlContents), e);
         }
     }
-
 }
index 4ad6c31..b8df041 100644 (file)
@@ -23,18 +23,19 @@ import org.apache.commons.lang.StringUtils;
 
 @Data
 public class NonManoFolderType {
+
     private String location;
     private String type;
 
     /**
      * Gets the expected folder path
+     *
      * @return
      */
     public String getPath() {
         return String.format("Artifacts/%s/%s", type, location);
     }
 
-
     public boolean isValid() {
         return StringUtils.isNotBlank(location) && StringUtils.isNotBlank(type);
     }
index 53432a3..1020eb0 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.config.exception;
 
 public class LoadConfigurationException extends RuntimeException {
index cb3ef14..351ee96 100644 (file)
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.pnf;
 
+import java.util.LinkedHashSet;
+import java.util.Set;
 import lombok.AccessLevel;
 import lombok.AllArgsConstructor;
 import lombok.Getter;
 import lombok.Setter;
 import org.apache.commons.collections.CollectionUtils;
 
-import java.util.LinkedHashSet;
-import java.util.Set;
-
 /**
  * Represents the Pnf software information non-mano yaml
  */
@@ -43,6 +41,7 @@ public class PnfSoftwareInformation {
 
     /**
      * Adds a {@link PnfSoftwareVersion} instance to the software version set
+     *
      * @param softwareVersion the pnf software version to add
      */
     public void addToSoftwareVersionSet(final PnfSoftwareVersion softwareVersion) {
@@ -53,27 +52,20 @@ public class PnfSoftwareInformation {
         return new LinkedHashSet<>(softwareVersionSet);
     }
 
+    public boolean isValid() {
+        if (CollectionUtils.isEmpty(softwareVersionSet)) {
+            return false;
+        }
+        return softwareVersionSet.stream().allMatch(PnfSoftwareVersion::isValid);
+    }
+
     /**
      * Stores the software information yaml field names.
      */
     @AllArgsConstructor
     @Getter
     public enum PnfSoftwareInformationField {
-        DESCRIPTION("description"),
-        PROVIDER("provider"),
-        VERSION("version"),
-        PNF_SOFTWARE_INFORMATION("pnf_software_information");
-
+        DESCRIPTION("description"), PROVIDER("provider"), VERSION("version"), PNF_SOFTWARE_INFORMATION("pnf_software_information");
         private final String fieldName;
-
     }
-
-    public boolean isValid() {
-        if(CollectionUtils.isEmpty(softwareVersionSet)) {
-            return false;
-        }
-
-        return softwareVersionSet.stream().allMatch(PnfSoftwareVersion::isValid);
-    }
-
 }
index 8dbb43a..440acac 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.pnf;
 
 import lombok.AllArgsConstructor;
@@ -32,19 +31,17 @@ public class PnfSoftwareVersion {
     private final String version;
     private final String description;
 
+    public boolean isValid() {
+        return StringUtils.isNotEmpty(version);
+    }
+
     /**
      * Stores the pnf software version yaml fields.
      */
     @Getter
     @AllArgsConstructor
     public enum PnfSoftwareVersionField {
-        DESCRIPTION("description"),
-        PNF_SOFTWARE_VERSION("pnf_software_version");
-
+        DESCRIPTION("description"), PNF_SOFTWARE_VERSION("pnf_software_version");
         private final String fieldName;
     }
-
-    public boolean isValid() {
-        return StringUtils.isNotEmpty(version);
-    }
-}
\ No newline at end of file
+}
index ad67962..671a003 100644 (file)
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.pnf;
 
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
 import org.apache.commons.collections.CollectionUtils;
 import org.onap.sdc.tosca.services.YamlUtil;
 import org.openecomp.sdc.be.csar.pnf.PnfSoftwareInformation.PnfSoftwareInformationField;
@@ -27,28 +31,21 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.yaml.snakeyaml.error.YAMLException;
 
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-
 /**
  * Handles the parsing of the non-mano software information file.
  */
 public class SoftwareInformationArtifactYamlParser {
+
     private static final Logger LOGGER = LoggerFactory.getLogger(SoftwareInformationArtifactYamlParser.class);
 
     private SoftwareInformationArtifactYamlParser() {
-
     }
 
     /**
      * Parses the non-mano software information yaml file.
      *
      * @param softwareInformationYamlFileBytes the file byte array
-     * @return an {@code Optional<PnfSoftwareInformation>} if the file was successful parsed, otherwise {@code
-     * Optional.empty()}
+     * @return an {@code Optional<PnfSoftwareInformation>} if the file was successful parsed, otherwise {@code Optional.empty()}
      */
     @SuppressWarnings("unchecked")
     public static Optional<PnfSoftwareInformation> parse(final byte[] softwareInformationYamlFileBytes) {
@@ -58,23 +55,17 @@ public class SoftwareInformationArtifactYamlParser {
             if (!(yaml instanceof Map)) {
                 return Optional.empty();
             }
-
             softwareVersionYamlObject = (Map<String, Object>) yaml; // unchecked warning suppressed
         } catch (final IOException | YAMLException e) {
             LOGGER.warn("Could not parse the software information yaml file", e);
             return Optional.empty();
         }
-
         final PnfSoftwareInformation pnfSoftwareInformation = new PnfSoftwareInformation();
-        pnfSoftwareInformation.setDescription(
-            (String) softwareVersionYamlObject.get(PnfSoftwareInformationField.DESCRIPTION.getFieldName()));
-        pnfSoftwareInformation.setProvider(
-            (String) softwareVersionYamlObject.get(PnfSoftwareInformationField.PROVIDER.getFieldName()));
-        pnfSoftwareInformation.setVersion(
-            (String) softwareVersionYamlObject.get(PnfSoftwareInformationField.VERSION.getFieldName()));
+        pnfSoftwareInformation.setDescription((String) softwareVersionYamlObject.get(PnfSoftwareInformationField.DESCRIPTION.getFieldName()));
+        pnfSoftwareInformation.setProvider((String) softwareVersionYamlObject.get(PnfSoftwareInformationField.PROVIDER.getFieldName()));
+        pnfSoftwareInformation.setVersion((String) softwareVersionYamlObject.get(PnfSoftwareInformationField.VERSION.getFieldName()));
         final List<Map<String, String>> pnfSoftwareInformationYaml = (List<Map<String, String>>) softwareVersionYamlObject
             .get(PnfSoftwareInformationField.PNF_SOFTWARE_INFORMATION.getFieldName()); // unchecked warning suppressed
-
         if (CollectionUtils.isNotEmpty(pnfSoftwareInformationYaml)) {
             pnfSoftwareInformationYaml.forEach(stringStringMap -> {
                 final String description = stringStringMap.get(PnfSoftwareVersionField.DESCRIPTION.getFieldName());
@@ -82,9 +73,6 @@ public class SoftwareInformationArtifactYamlParser {
                 pnfSoftwareInformation.addToSoftwareVersionSet(new PnfSoftwareVersion(version, description));
             });
         }
-
         return Optional.of(pnfSoftwareInformation);
     }
-
-
 }
index 9ec8ea8..7323eae 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security;
 
 import java.io.File;
@@ -47,21 +46,16 @@ import org.springframework.stereotype.Component;
 @Component
 public class CertificateManagerImpl implements CertificateManager {
 
+    public static final String CERT_DIR_ENV_VARIABLE = "SDC_CERT_DIR";
     private static final Logger LOGGER = LoggerFactory.getLogger(CertificateManagerImpl.class);
-
     private final PrivateKeyReader privateKeyReader;
     private final CertificateReader certificateReader;
     private final Environment environment;
-
+    private final Map<String, CertificateInfo> certificateMap = new HashMap<>();
     private Path certificateDirectoryPath;
     private File certificateDirectory;
-    private final Map<String, CertificateInfo> certificateMap = new HashMap<>();
 
-    public static final String CERT_DIR_ENV_VARIABLE = "SDC_CERT_DIR";
-
-    public CertificateManagerImpl(final PrivateKeyReader privateKeyReader,
-                                  final CertificateReader certificateReader,
-                                  final Environment environment) {
+    public CertificateManagerImpl(final PrivateKeyReader privateKeyReader, final CertificateReader certificateReader, final Environment environment) {
         this.certificateReader = certificateReader;
         this.privateKeyReader = privateKeyReader;
         this.environment = environment;
@@ -72,7 +66,6 @@ public class CertificateManagerImpl implements CertificateManager {
         if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) {
             Security.addProvider(new BouncyCastleProvider());
         }
-
         final String certificateDir = environment.getProperty(CERT_DIR_ENV_VARIABLE);
         if (certificateDir == null) {
             LOGGER.warn("Environment variable '{}' was not provided. Could not load certificates.", CERT_DIR_ENV_VARIABLE);
@@ -81,8 +74,8 @@ public class CertificateManagerImpl implements CertificateManager {
         try {
             this.certificateDirectoryPath = Paths.get(certificateDir);
         } catch (final Exception e) {
-            LOGGER.error("Invalid path '{}' provided in the environment variable '{}'. Could not load certificates.",
-                certificateDir, CERT_DIR_ENV_VARIABLE, e);
+            LOGGER.error("Invalid path '{}' provided in the environment variable '{}'. Could not load certificates.", certificateDir,
+                CERT_DIR_ENV_VARIABLE, e);
             return;
         }
         try {
@@ -104,49 +97,37 @@ public class CertificateManagerImpl implements CertificateManager {
             LOGGER.warn("Certificate directory is empty. No trusted certificate found.");
             return;
         }
-
-        final List<File> certFileList = Arrays.stream(files)
-            .filter(file -> "cert".equals(FilenameUtils.getExtension(file.getName())))
+        final List<File> certFileList = Arrays.stream(files).filter(file -> "cert".equals(FilenameUtils.getExtension(file.getName())))
             .collect(Collectors.toList());
-        final List<File> keyFileList = Arrays.stream(files)
-            .filter(file -> "key".equals(FilenameUtils.getExtension(file.getName())))
+        final List<File> keyFileList = Arrays.stream(files).filter(file -> "key".equals(FilenameUtils.getExtension(file.getName())))
             .collect(Collectors.toList());
-
         if (certFileList.isEmpty()) {
             LOGGER.error("Certificate directory is empty. No trusted certificate found.");
             return;
         }
-
         certFileList.forEach(certFile -> {
             final String baseFileName = FilenameUtils.getBaseName(certFile.getName());
             final Certificate certificate = loadCertificate(certFile);
-            final Optional<File> keyFileOptional = keyFileList.stream().filter(
-                keyFile1 -> FilenameUtils.getBaseName(keyFile1.getName())
-                    .equals(baseFileName)).findFirst();
-            keyFileOptional.ifPresentOrElse(
-                keyFile -> {
-                    final CertificateInfoImpl certificateInfo =
-                        new CertificateInfoImpl(certFile, certificate, keyFile, loadPrivateKey(keyFile));
-                    if (certificateInfo.isValid()) {
-                        certificateMap.put(baseFileName, certificateInfo);
-                    }
-                },
-                () -> {
-                    final CertificateInfoImpl certificateInfo = new CertificateInfoImpl(certFile, certificate);
-                    if (certificateInfo.isValid()) {
-                        certificateMap.put(baseFileName, new CertificateInfoImpl(certFile, certificate));
-                    }
+            final Optional<File> keyFileOptional = keyFileList.stream()
+                .filter(keyFile1 -> FilenameUtils.getBaseName(keyFile1.getName()).equals(baseFileName)).findFirst();
+            keyFileOptional.ifPresentOrElse(keyFile -> {
+                final CertificateInfoImpl certificateInfo = new CertificateInfoImpl(certFile, certificate, keyFile, loadPrivateKey(keyFile));
+                if (certificateInfo.isValid()) {
+                    certificateMap.put(baseFileName, certificateInfo);
+                }
+            }, () -> {
+                final CertificateInfoImpl certificateInfo = new CertificateInfoImpl(certFile, certificate);
+                if (certificateInfo.isValid()) {
+                    certificateMap.put(baseFileName, new CertificateInfoImpl(certFile, certificate));
                 }
-            );
+            });
         });
     }
 
     private void loadCertificateDirectory() {
         final File file = certificateDirectoryPath.toFile();
         if (!file.exists() || !file.isDirectory()) {
-            final String errorMsg =
-                String.format("Provided certificate path '%s' is not a directory or does not exist",
-                    certificateDirectoryPath);
+            final String errorMsg = String.format("Provided certificate path '%s' is not a directory or does not exist", certificateDirectoryPath);
             throw new CertificateNotFoundException(errorMsg);
         }
         this.certificateDirectory = file;
index a6ee61d..d042ef0 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security;
 
 import java.io.File;
@@ -49,5 +48,4 @@ public class PrivateKeyReaderImpl implements PrivateKeyReader {
         final String errorMsg = "Could not load the private key from given file '%s'. Unsupported format.";
         throw new UnsupportedKeyFormatException(String.format(errorMsg, privateKeyFile));
     }
-
 }
index 7b7273e..ef0315d 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security;
 
 import java.io.IOException;
@@ -48,24 +47,17 @@ import org.springframework.stereotype.Component;
 public class Sha256WithRsaCmsContentSigner implements CmsContentSigner {
 
     @Override
-    public byte[] signData(final byte[] data, final Certificate signingCertificate, final Key signingKey)
-        throws CmsSignatureException {
-
+    public byte[] signData(final byte[] data, final Certificate signingCertificate, final Key signingKey) throws CmsSignatureException {
         final CMSTypedData cmsData = new CMSProcessableByteArray(data);
         final JcaCertStore certStore = createCertificateStore(signingCertificate);
         try {
-            final ContentSigner contentSigner
-                = new JcaContentSignerBuilder("SHA256withRSA")
-                .setProvider(BouncyCastleProvider.PROVIDER_NAME).build((PrivateKey) signingKey);
-
+            final ContentSigner contentSigner = new JcaContentSignerBuilder("SHA256withRSA").setProvider(BouncyCastleProvider.PROVIDER_NAME)
+                .build((PrivateKey) signingKey);
             final CMSSignedDataGenerator cmsGenerator = new CMSSignedDataGenerator();
             cmsGenerator.addSignerInfoGenerator(
-                new JcaSignerInfoGeneratorBuilder(
-                    new JcaDigestCalculatorProviderBuilder().setProvider(BouncyCastleProvider.PROVIDER_NAME).build()
-                ).build(contentSigner, (X509Certificate) signingCertificate)
-            );
+                new JcaSignerInfoGeneratorBuilder(new JcaDigestCalculatorProviderBuilder().setProvider(BouncyCastleProvider.PROVIDER_NAME).build())
+                    .build(contentSigner, (X509Certificate) signingCertificate));
             cmsGenerator.addCertificates(certStore);
-
             final CMSSignedData cms = cmsGenerator.generate(cmsData, false);
             return cms.getEncoded();
         } catch (final Exception e) {
@@ -89,10 +81,8 @@ public class Sha256WithRsaCmsContentSigner implements CmsContentSigner {
         try {
             return new JcaCertStore(Collections.singletonList(signingCertificate));
         } catch (final CertificateEncodingException e) {
-            final String errorMsg = String
-                .format("Could not create certificate store from certificate '%s'", signingCertificate);
+            final String errorMsg = String.format("Could not create certificate store from certificate '%s'", signingCertificate);
             throw new CmsSignatureException(errorMsg, e);
         }
     }
-
 }
index b8e95e7..a0f4226 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security;
 
 import java.io.File;
@@ -53,5 +52,4 @@ public class X509CertificateReader implements CertificateReader {
         final CertificateFactory factory = CertificateFactory.getInstance("X.509");
         return factory.generateCertificate(certificateInputStream);
     }
-
 }
index 53437f3..2a1a702 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.api;
 
 import java.util.Optional;
@@ -25,5 +24,4 @@ import org.openecomp.sdc.be.csar.security.api.model.CertificateInfo;
 public interface CertificateManager {
 
     Optional<CertificateInfo> getCertificate(String certName);
-
 }
index 4c32fa1..62b3690 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.api;
 
 import java.io.File;
index 37bd988..0bd056f 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.api;
 
 import java.security.Key;
@@ -25,8 +24,7 @@ import org.openecomp.sdc.be.csar.security.exception.CmsSignatureException;
 
 public interface CmsContentSigner {
 
-    byte[] signData(byte[] data, Certificate signingCertificate, Key signingKey)
-        throws CmsSignatureException;
+    byte[] signData(byte[] data, Certificate signingCertificate, Key signingKey) throws CmsSignatureException;
 
     String formatToPemSignature(byte[] signedData) throws CmsSignatureException;
 }
index 3e8c406..2650eb5 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.api;
 
 import java.io.File;
index 5b234cc..7fe425c 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.api.model;
 
 import java.io.File;
@@ -42,5 +41,4 @@ public interface CertificateInfo {
      * @throws UnsupportedOperationException when the certificate is not supported
      */
     boolean isValid();
-
 }
index a2175f3..a37aa6d 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.exception;
 
 public class CertificateNotFoundException extends RuntimeException {
index 6bc49d6..8ed0283 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.exception;
 
 public class CmsSignatureException extends Exception {
index 3cd1062..aaa3f66 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.exception;
 
 public class LoadCertificateException extends RuntimeException {
index 00681bc..54b6a60 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.exception;
 
 public class LoadPrivateKeyException extends RuntimeException {
index d30f6f2..e7b37a7 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.exception;
 
 public class UnsupportedKeyFormatException extends RuntimeException {
index f7b2faf..49c2c61 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.csar.security.model;
 
 import java.io.File;
@@ -33,7 +32,6 @@ import org.slf4j.LoggerFactory;
 public class CertificateInfoImpl implements CertificateInfo {
 
     private static final Logger LOGGER = LoggerFactory.getLogger(CertificateInfoImpl.class);
-
     private final String name;
     private final File certificateFile;
     private final Certificate certificate;
@@ -46,8 +44,7 @@ public class CertificateInfoImpl implements CertificateInfo {
         this.name = FilenameUtils.getBaseName(certificateFile.getName());
     }
 
-    public CertificateInfoImpl(final File certificateFile, final Certificate certificate,
-                               final File privateKeyFile, final Key privateKey) {
+    public CertificateInfoImpl(final File certificateFile, final Certificate certificate, final File privateKeyFile, final Key privateKey) {
         this(certificateFile, certificate);
         this.privateKeyFile = privateKeyFile;
         this.privateKey = privateKey;
@@ -55,7 +52,7 @@ public class CertificateInfoImpl implements CertificateInfo {
 
     @Override
     public boolean isValid() {
-        if("X.509".equals(certificate.getType())) {
+        if ("X.509".equals(certificate.getType())) {
             try {
                 ((X509Certificate) certificate).checkValidity();
                 return true;
@@ -66,5 +63,4 @@ public class CertificateInfoImpl implements CertificateInfo {
         }
         throw new UnsupportedOperationException(String.format("Certificate type '%s' not supported", certificate.getType()));
     }
-
 }
index 5758dbe..171eb70 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.category;
 
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+import java.util.List;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
+import lombok.NoArgsConstructor;
 import lombok.Setter;
 import lombok.ToString;
-import lombok.NoArgsConstructor;
-import java.util.List;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 @Getter
 @Setter
@@ -50,5 +49,4 @@ public class CategoryDataDefinition extends ToscaDataDefinition {
         this.useServiceSubstitutionForNestedServices = c.useServiceSubstitutionForNestedServices;
         this.metadataKeys = c.metadataKeys;
     }
-
 }
index 69edbf2..48f7ac3 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.category;
 
 import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
@@ -29,7 +28,6 @@ public class GroupingDataDefinition extends ToscaDataDefinition {
     private String uniqueId;
 
     public GroupingDataDefinition() {
-
     }
 
     public GroupingDataDefinition(GroupingDataDefinition c) {
@@ -107,8 +105,6 @@ public class GroupingDataDefinition extends ToscaDataDefinition {
 
     @Override
     public String toString() {
-        return "GroupingDataDefinition [name=" + name + ", normalizedName=" + normalizedName + ", uniqueId=" + uniqueId
-                + "]";
+        return "GroupingDataDefinition [name=" + name + ", normalizedName=" + normalizedName + ", uniqueId=" + uniqueId + "]";
     }
-
 }
index 3278ec6..4ee4c59 100644 (file)
 package org.openecomp.sdc.be.datatypes.category;
 
 import java.util.List;
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.NoArgsConstructor;
 import lombok.Setter;
 import lombok.ToString;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 @Getter
 @Setter
@@ -32,11 +32,12 @@ import lombok.ToString;
 @ToString
 @NoArgsConstructor
 public class MetadataKeyDataDefinition extends ToscaDataDefinition {
+
     private String name;
     private List<String> validValues;
     private boolean mandatory;
     private String defaultValue;
-    
+
     public MetadataKeyDataDefinition(MetadataKeyDataDefinition metadataKeyDataDefinition) {
         this.name = metadataKeyDataDefinition.name;
         this.validValues = metadataKeyDataDefinition.validValues;
index 38d7027..3841945 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.category;
 
-import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
+import java.util.List;
 import lombok.EqualsAndHashCode;
 import lombok.Getter;
 import lombok.NoArgsConstructor;
 import lombok.Setter;
 import lombok.ToString;
-import java.util.List;
+import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 @Getter
 @Setter
@@ -48,5 +47,4 @@ public class SubCategoryDataDefinition extends ToscaDataDefinition {
         this.icons = c.icons;
         this.metadataKeys = c.metadataKeys;
     }
-
 }
index 96cccf6..ebccc6c 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.components;
 
 import java.util.ArrayList;
@@ -41,7 +40,6 @@ import org.openecomp.sdc.common.log.wrappers.Logger;
 public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinition {
 
     private static final Logger LOGGER = Logger.getLogger(ComponentMetadataDataDefinition.class.getName());
-
     @Getter
     private String uniqueId;
     @Getter
@@ -205,8 +203,7 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
 
     public void setInvariantUUID(String invariantUUID) {
         if (this.invariantUUID != null && !this.invariantUUID.equals(invariantUUID)) {
-            LOGGER.warn("InvariantUUID changed more then once -> OLD : {} , NEW: {} ", this.invariantUUID,
-                    invariantUUID);
+            LOGGER.warn("InvariantUUID changed more then once -> OLD : {} , NEW: {} ", this.invariantUUID, invariantUUID);
         }
         this.invariantUUID = invariantUUID;
     }
@@ -249,5 +246,4 @@ public abstract class ComponentMetadataDataDefinition extends ToscaDataDefinitio
      * @return
      */
     public abstract String getActualComponentType();
-
 }
index ddb25c6..ced5a67 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.components;
 
 import lombok.EqualsAndHashCode;
@@ -31,7 +30,9 @@ public class ResourceMetadataDataDefinition extends ComponentMetadataDataDefinit
     private String vendorRelease;
     private String resourceVendorModelNumber;
     private ResourceTypeEnum resourceType = ResourceTypeEnum.VFC; // ResourceType.VFC
+
     // is
+
     // default
     private Boolean isAbstract;
     private String cost;
@@ -129,14 +130,12 @@ public class ResourceMetadataDataDefinition extends ComponentMetadataDataDefinit
 
     @Override
     public String toString() {
-        return "ResourceMetadataDataDefinition [vendorName=" + vendorName + ", vendorRelease=" + vendorRelease
-            + ", resourceVendorModelNumber=" + resourceVendorModelNumber + ", resourceType=" + resourceType
-            + ", isAbstract=" + isAbstract + super.toString() + "]";
+        return "ResourceMetadataDataDefinition [vendorName=" + vendorName + ", vendorRelease=" + vendorRelease + ", resourceVendorModelNumber="
+            + resourceVendorModelNumber + ", resourceType=" + resourceType + ", isAbstract=" + isAbstract + super.toString() + "]";
     }
 
     @Override
     public String getActualComponentType() {
         return getResourceType().getValue();
     }
-
 }
index b8cc269..84cf853 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.components;
 
 import lombok.Data;
@@ -25,36 +24,19 @@ import lombok.NoArgsConstructor;
 import org.openecomp.sdc.be.datatypes.enums.JsonPresentationFieldsExtractor;
 import org.openecomp.sdc.be.datatypes.enums.ResourceTypeEnum;
 
-
 @Data
 @NoArgsConstructor
 public class ServiceMetadataDataDefinition extends ComponentMetadataDataDefinition {
 
     private static final String EMPTY_STR = "";
-
     private String distributionStatus;
-
-
     private String serviceType = EMPTY_STR;
-
-
     private String serviceRole = EMPTY_STR;
-
-
     private String instantiationType = EMPTY_STR;
-
-
     private String serviceFunction = EMPTY_STR;
-
-
     private Boolean ecompGeneratedNaming = true;
-
-
     private String namingPolicy = EMPTY_STR;
-
-
     private String environmentContext;
-
     private String serviceVendorModelNumber;
     public Boolean isAbstract;
     private ResourceTypeEnum importServiceType = ResourceTypeEnum.SERVICE;
@@ -79,13 +61,11 @@ public class ServiceMetadataDataDefinition extends ComponentMetadataDataDefiniti
     }
 
     public Boolean isEcompGeneratedNaming() {
-       return getEcompGeneratedNaming();
+        return getEcompGeneratedNaming();
     }
 
     @Override
     public String getActualComponentType() {
-
         return componentType != null ? componentType.getValue() : "";
     }
-
 }
index 10881e3..a5e8ade 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -37,7 +36,6 @@ public class AdditionalInfoParameterDataDefinition extends ToscaDataDefinition {
     private Long creationTime;
     private Long modificationTime;
     private Integer lastCreatedCounter = 0;
-
     @ToString.Exclude
     private List<AdditionalInfoParameterInfo> parameters;
 
@@ -48,5 +46,4 @@ public class AdditionalInfoParameterDataDefinition extends ToscaDataDefinition {
         this.lastCreatedCounter = p.lastCreatedCounter;
         this.parameters = p.parameters;
     }
-
 }
index 53bf3da..dc6a072 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.AllArgsConstructor;
@@ -42,5 +41,4 @@ public class AdditionalInfoParameterInfo extends ToscaDataDefinition {
         this.key = key;
         this.value = value;
     }
-
 }
index 6e56118..d24c6d7 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -35,7 +34,6 @@ public class Annotation {
 
     @EqualsAndHashCode.Include
     private String name;
-
     private String type;
     private String description;
     private List<PropertyDataDefinition> properties;
@@ -43,5 +41,4 @@ public class Annotation {
     public static void setAnnotationsName(Map<String, Annotation> annotations) {
         annotations.forEach((name, annotation) -> annotation.setName(name));
     }
-
 }
index 8088d8a..7803690 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.Getter;
@@ -33,15 +32,11 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 public class AnnotationTypeDataDefinition extends ToscaDataDefinition {
 
     protected String uniqueId;
-
     @ToString.Exclude
     protected String type;
-
     protected String description;
-
     protected Long creationTime;
     protected Long modificationTime;
-
     protected String version;
     protected boolean highestVersion;
 
@@ -54,5 +49,4 @@ public class AnnotationTypeDataDefinition extends ToscaDataDefinition {
         modificationTime = other.modificationTime;
         highestVersion = other.highestVersion;
     }
-
 }
index 3b1b266..b71a95a 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.ArrayList;
@@ -76,18 +75,14 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
         }
         this.setGeneratedFromId(a.getGeneratedFromId());
         this.setIsFromCsar(a.getIsFromCsar());
-
-
     }
 
     public String getArtifactName() {
         return (String) getToscaPresentationValue(JsonPresentationFields.NAME);
-
     }
 
     public void setArtifactName(String artifactName) {
         setToscaPresentationValue(JsonPresentationFields.NAME, artifactName);
-
     }
 
     public String getArtifactType() {
@@ -96,7 +91,6 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
 
     public void setArtifactType(String artifactType) {
         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_TYPE, artifactType);
-
     }
 
     public boolean isHeatEnvType() {
@@ -105,7 +99,6 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
 
     public String getArtifactRef() {
         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_REF);
-
     }
 
     public void setArtifactRef(String artifactRef) {
@@ -114,7 +107,6 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
 
     public String getArtifactRepository() {
         return (String) getToscaPresentationValue(JsonPresentationFields.ARTIFACT_REPOSITORY);
-
     }
 
     public void setArtifactRepository(String artifactRepository) {
@@ -130,7 +122,6 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
     }
 
     public String getUserIdCreator() {
-
         return (String) getToscaPresentationValue(JsonPresentationFields.USER_ID_CREATOR);
     }
 
@@ -367,21 +358,18 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
         return "ArtifactDataDefinition [uniqueId=" + getUniqueId() + ", artifactType=" + getArtifactType() + ", artifactRef=" + getArtifactRef()
             + ", artifactName=" + getArtifactName() + ", artifactRepository=" + getArtifactRepository() + ", artifactChecksum="
             + getArtifactChecksum() + ", userIdCreator=" + getUserIdCreator() + ", userIdLastUpdater=" + getUserIdLastUpdater() + ", creatorFullName="
-            + getCreatorFullName() + ", updaterFullName=" + getUpdaterFullName() + ", creationDate=" + getCreationDate()
-            + ", lastUpdateDate=" + getLastUpdateDate() + ", esId=" + getEsId() + ", artifactLabel=" + getArtifactLabel() + ", artifactCreator="
-            + getArtifactCreator() + ", description=" + getDescription() + ", mandatory=" + getMandatory() + ", artifactDisplayName="
-            + getArtifactDisplayName() + ", apiUrl=" + getApiUrl() + ", serviceApi=" + getServiceApi() + ", artifactGroupType="
-            + getArtifactGroupType() + ", timeout=" + getTimeout() + ", artifactVersion=" + getArtifactVersion() + ", artifactUUID="
-            + getArtifactUUID()
-            + ", payloadUpdateDate=" + getPayloadUpdateDate() + ", heatParamsUpdateDate=" + getHeatParamsUpdateDate() + ", requiredArtifacts="
-            + getRequiredArtifacts() + "]";
+            + getCreatorFullName() + ", updaterFullName=" + getUpdaterFullName() + ", creationDate=" + getCreationDate() + ", lastUpdateDate="
+            + getLastUpdateDate() + ", esId=" + getEsId() + ", artifactLabel=" + getArtifactLabel() + ", artifactCreator=" + getArtifactCreator()
+            + ", description=" + getDescription() + ", mandatory=" + getMandatory() + ", artifactDisplayName=" + getArtifactDisplayName()
+            + ", apiUrl=" + getApiUrl() + ", serviceApi=" + getServiceApi() + ", artifactGroupType=" + getArtifactGroupType() + ", timeout="
+            + getTimeout() + ", artifactVersion=" + getArtifactVersion() + ", artifactUUID=" + getArtifactUUID() + ", payloadUpdateDate="
+            + getPayloadUpdateDate() + ", heatParamsUpdateDate=" + getHeatParamsUpdateDate() + ", requiredArtifacts=" + getRequiredArtifacts() + "]";
     }
 
     @Override
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-
         String apiUrl = getApiUrl();
         String artifactChecksum = getArtifactChecksum();
         String artifactCreator = getArtifactCreator();
@@ -392,27 +380,23 @@ public class ArtifactDataDefinition extends ToscaDataDefinition {
         String artifactRef = getArtifactRef();
         String artifactRepository = getArtifactRepository();
         String artifactType = getArtifactType();
-
         String artifactUUID = getArtifactUUID();
         String artifactVersion = getArtifactVersion();
         String userIdCreator = getUserIdCreator();
         String userIdLastUpdater = getUserIdLastUpdater();
         Long creationDate = getCreationDate();
-
         String creatorFullName = getCreatorFullName();
         String description = getDescription();
         String esId = getEsId();
         Long heatParamsUpdateDate = getHeatParamsUpdateDate();
         Long lastUpdateDate = getLastUpdateDate();
         Boolean mandatory = getMandatory();
-
         Long payloadUpdateDate = getPayloadUpdateDate();
         List<String> requiredArtifacts = getRequiredArtifacts();
         Boolean serviceApi = getServiceApi();
         Integer timeout = getTimeout();
         String uniqueId = getUniqueId();
         String updaterFullName = getUpdaterFullName();
-
         result = prime * result + ((apiUrl == null) ? 0 : apiUrl.hashCode());
         result = prime * result + ((artifactChecksum == null) ? 0 : artifactChecksum.hashCode());
         result = prime * result + ((artifactCreator == null) ? 0 : artifactCreator.hashCode());
index 7be02e7..c16efe9 100644 (file)
@@ -61,7 +61,6 @@ public class AttributeDataDefinition extends ToscaDataDefinition {
         if (CollectionUtils.isNotEmpty(attributeDataDefinition.getGetOutputValues())) {
             this.getOutputValues = new ArrayList<>(attributeDataDefinition.getGetOutputValues());
         }
-
     }
 
     public String getUniqueId() {
@@ -126,5 +125,4 @@ public class AttributeDataDefinition extends ToscaDataDefinition {
     public String getParentUniqueId() {
         return getOwnerId();
     }
-
 }
index 1a9c7e5..14becbf 100644 (file)
@@ -44,8 +44,7 @@ public class CINodeFilterDataDefinition extends ToscaDataDefinition implements S
     }
 
     public ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> getProperties() {
-        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.PROPERTIES);
+        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
     }
 
     public void setProperties(ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties) {
@@ -68,5 +67,4 @@ public class CINodeFilterDataDefinition extends ToscaDataDefinition implements S
     public void setID(String name) {
         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, name);
     }
-
 }
index cc8131b..92bfe59 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.google.common.collect.Lists;
@@ -55,32 +54,27 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         this.setName(other.getName());
         this.setParentName(other.getParentName());
         this.setPreviousName(other.getPreviousName());
-
         if (other.getValidSourceTypes() == null) {
             this.setValidSourceTypes(Lists.newArrayList());
         } else {
             this.setValidSourceTypes(Lists.newArrayList(other.getValidSourceTypes()));
         }
-
         if (other.getCapabilitySources() == null) {
             this.setCapabilitySources(Lists.newArrayList());
         } else {
             this.setCapabilitySources(Lists.newArrayList(other.getCapabilitySources()));
         }
-
         this.setOwnerId(other.getOwnerId());
         this.setOwnerName(other.getOwnerName());
         this.setOwnerType(other.getOwnerType());
         this.setMinOccurrences(other.getMinOccurrences());
         this.setMaxOccurrences(other.getMaxOccurrences());
         this.setLeftOccurrences(other.getLeftOccurrences());
-
         if (other.getPath() == null) {
             this.setPath(Lists.newArrayList());
         } else {
             this.setPath(Lists.newArrayList(other.getPath()));
         }
-
         this.setSource(other.getSource());
         this.setOwnerType(other.getOwnerType());
     }
@@ -244,12 +238,10 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         setPath(path);
     }
 
-
     @Override
     public int hashCode() {
         final int prime = 31;
         int result = 1;
-
         String uniqueId = this.getUniqueId();
         String description = this.getDescription();
         String name = this.getName();
@@ -257,14 +249,12 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         List<String> validSourceTypes = this.getValidSourceTypes();
         List<String> capabilitySources = this.getCapabilitySources();
         List<String> path = this.getPath();
-
         String ownerId = this.getOwnerId();
         String ownerName = this.getOwnerName();
         String minOccurrences = this.getMinOccurrences();
         String maxOccurrences = this.getMaxOccurrences();
         String leftOccurrences = getLeftOccurrences();
         String source = getSource();
-
         result = prime * result + ((capabilitySources == null) ? 0 : capabilitySources.hashCode());
         result = prime * result + ((description == null) ? 0 : description.hashCode());
         result = prime * result + ((maxOccurrences == null) ? 0 : maxOccurrences.hashCode());
@@ -272,7 +262,6 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         result = prime * result + ((name == null) ? 0 : name.hashCode());
         result = prime * result + ((ownerId == null) ? 0 : ownerId.hashCode());
         result = prime * result + ((ownerName == null) ? 0 : ownerName.hashCode());
-
         result = prime * result + ((type == null) ? 0 : type.hashCode());
         result = prime * result + ((uniqueId == null) ? 0 : uniqueId.hashCode());
         result = prime * result + ((validSourceTypes == null) ? 0 : validSourceTypes.hashCode());
@@ -284,7 +273,6 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
 
     @Override
     public boolean equals(Object obj) {
-
         String uniqueId = this.getUniqueId();
         String description = this.getDescription();
         String name = this.getName();
@@ -298,7 +286,6 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         String leftOccurrences = getLeftOccurrences();
         List<String> path = this.getPath();
         String source = getSource();
-
         if (this == obj) {
             return true;
         }
@@ -414,18 +401,13 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         String minOccurrences = this.getMinOccurrences();
         String maxOccurrences = this.getMaxOccurrences();
         String source = this.getSource();
-
-        return "CapabilityDefinition [uniqueId=" + uniqueId + ", description=" + description + ", name=" + name
-            + ", type=" + type + ", validSourceTypes=" + validSourceTypes + ", capabilitySources="
-            + capabilitySources + ", ownerId=" + ownerId + ", ownerName=" + ownerName
-            + ", minOccurrences=" + minOccurrences + ", maxOccurrences=" + maxOccurrences + ", path=" + path + ", source=" + source + "]";
+        return "CapabilityDefinition [uniqueId=" + uniqueId + ", description=" + description + ", name=" + name + ", type=" + type
+            + ", validSourceTypes=" + validSourceTypes + ", capabilitySources=" + capabilitySources + ", ownerId=" + ownerId + ", ownerName="
+            + ownerName + ", minOccurrences=" + minOccurrences + ", maxOccurrences=" + maxOccurrences + ", path=" + path + ", source=" + source + "]";
     }
 
     public enum OwnerType {
-        GROUP("group"),
-        COMPONENT_INSTANCE("component instance"),
-        RESOURCE("resource");
-
+        GROUP("group"), COMPONENT_INSTANCE("component instance"), RESOURCE("resource");
         private String value;
 
         OwnerType(String value) {
@@ -444,7 +426,5 @@ public class CapabilityDataDefinition extends ToscaDataDefinition {
         public String getValue() {
             return value;
         }
-
     }
-
 }
index 7c04e57..9369616 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -106,10 +105,7 @@ public class CapabilityTypeDataDefinition extends ToscaDataDefinition {
         String version = getVersion();
         Long creationTime = getCreationTime();
         Long modificationTime = getModificationTime();
-
-        return "CapabilityTypeDataDefinition [uniqueId=" + uniqueId + ", description=" + description + ", type=" + type
-            + ", validSourceTypes=" + validSourceTypes + ", version=" + version + ", creationTime=" + creationTime
-            + ", modificationTime=" + modificationTime + "]";
+        return "CapabilityTypeDataDefinition [uniqueId=" + uniqueId + ", description=" + description + ", type=" + type + ", validSourceTypes="
+            + validSourceTypes + ", version=" + version + ", creationTime=" + creationTime + ", modificationTime=" + modificationTime + "]";
     }
-
 }
index c049d77..46e6687 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.ArrayList;
@@ -180,7 +179,6 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
         OriginTypeEnum originType = null;
         String origType = (String) getToscaPresentationValue(JsonPresentationFields.CI_ORIGIN_TYPE);
         if (origType != null && !origType.isEmpty()) {
-
             originType = OriginTypeEnum.findByValue(origType);
         }
         return originType;
@@ -333,15 +331,12 @@ public class ComponentInstanceDataDefinition extends ToscaDataDefinition {
 
     @Override
     public String toString() {
-        return "ComponentInstanceDataDefinition [icon=" + getIcon() + ", uniqueId=" + getUniqueId() + ", name="
-            + getName() + ", normalizedName=" + getNormalizedName() + ", componentUid=" + getComponentUid()
-            + ", creationTime=" + getCreationTime() + ", modificationTime=" + getModificationTime()
-            + ", description=" + getDescription() + ", posX=" + getPosX() + ", posY=" + getPosY()
-            + ", propertyValueCounter=" + getPropertyValueCounter() + ", attributeValueCounter="
-            + getAttributeValueCounter() + ", inputValueCounter=" + getInputValueCounter() + ", originType="
-            + getOriginType() + ", customizationUUID=" + getCustomizationUUID() + ", componentName="
-            + getComponentName() + ", componentVersion=" + getComponentVersion() + ", toscaComponentName="
-            + getToscaComponentName() + ", directives =" + getDirectivesString() + "]";
+        return "ComponentInstanceDataDefinition [icon=" + getIcon() + ", uniqueId=" + getUniqueId() + ", name=" + getName() + ", normalizedName="
+            + getNormalizedName() + ", componentUid=" + getComponentUid() + ", creationTime=" + getCreationTime() + ", modificationTime="
+            + getModificationTime() + ", description=" + getDescription() + ", posX=" + getPosX() + ", posY=" + getPosY() + ", propertyValueCounter="
+            + getPropertyValueCounter() + ", attributeValueCounter=" + getAttributeValueCounter() + ", inputValueCounter=" + getInputValueCounter()
+            + ", originType=" + getOriginType() + ", customizationUUID=" + getCustomizationUUID() + ", componentName=" + getComponentName()
+            + ", componentVersion=" + getComponentVersion() + ", toscaComponentName=" + getToscaComponentName() + ", directives ="
+            + getDirectivesString() + "]";
     }
-
 }
index 5ea3b78..5a3c892 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.HashMap;
index a2ac3c5..1bf19c0 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.EqualsAndHashCode;
index 672f2d6..8220ebf 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -34,24 +33,18 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 public class DataTypeDataDefinition extends ToscaDataDefinition {
 
     private String name;
-
     private String uniqueId;
-
     // "boolean", "string", "float", "integer", "version" })
     private String derivedFromName;
-
     private String description;
-
     /**
      * Timestamp of data type creation
      */
     private Long creationTime;
-
     /**
      * Timestamp of the data type last update
      */
     private Long modificationTime;
-
     private List<PropertyDataDefinition> propertiesData;
 
     public DataTypeDataDefinition(DataTypeDataDefinition p) {
@@ -62,6 +55,4 @@ public class DataTypeDataDefinition extends ToscaDataDefinition {
         this.creationTime = p.creationTime;
         this.modificationTime = p.modificationTime;
     }
-
-
 }
index c549d8f..4f28aee 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.DESCRIPTION;
index f56a13b..42e9c78 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -110,8 +109,8 @@ public class ForwardingPathElementDataDefinition extends ToscaDataDefinition {
             return false;
         }
         ForwardingPathElementDataDefinition that = (ForwardingPathElementDataDefinition) o;
-        return Objects.equals(getFromNode(), that.getFromNode()) && Objects.equals(getToNode(), that.getToNode())
-            && Objects.equals(getFromCPOriginId(), that.getFromCPOriginId()) && Objects.equals(getToCPOriginId(), that.getToCPOriginId());
+        return Objects.equals(getFromNode(), that.getFromNode()) && Objects.equals(getToNode(), that.getToNode()) && Objects
+            .equals(getFromCPOriginId(), that.getFromCPOriginId()) && Objects.equals(getToCPOriginId(), that.getToCPOriginId());
     }
 
     @Override
@@ -121,9 +120,7 @@ public class ForwardingPathElementDataDefinition extends ToscaDataDefinition {
 
     @Override
     public String toString() {
-        return MoreObjects.toStringHelper(this)
-            .add("fromNode", getFromNode()).add("toNode", getToNode())
-            .add("fromCPOriginId", getFromCPOriginId()).add("toCPOriginId", getToCPOriginId())
-            .add("fromCPName", getFromCP()).add("toCPName", getToCP()).toString();
+        return MoreObjects.toStringHelper(this).add("fromNode", getFromNode()).add("toNode", getToNode()).add("fromCPOriginId", getFromCPOriginId())
+            .add("toCPOriginId", getToCPOriginId()).add("fromCPName", getFromCP()).add("toCPName", getToCP()).toString();
     }
 }
index a409c7f..df0c105 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.Map;
@@ -37,14 +36,11 @@ public class GetInputValueDataDefinition extends ToscaDataDefinition {
 
     private String propName;
     private String inputName;
-
     @EqualsAndHashCode.Exclude
     @ToString.Exclude
     private String inputId;
-
     private Integer indexValue;
     private GetInputValueDataDefinition getInputIndex;
-
     private boolean isList = false;
 
     public GetInputValueDataDefinition(Map<String, Object> pr) {
@@ -59,5 +55,4 @@ public class GetInputValueDataDefinition extends ToscaDataDefinition {
         this.setGetInputIndex(p.getGetInputIndex());
         this.setList(p.isList());
     }
-
 }
index 7318dbd..a3d32c6 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.Map;
@@ -54,5 +53,4 @@ public class GetOutputValueDataDefinition extends ToscaDataDefinition {
         this.setGetOutputIndex(p.getGetOutputIndex());
         this.setList(p.isList());
     }
-
 }
index f752949..3393a79 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.EqualsAndHashCode;
@@ -25,7 +24,6 @@ import lombok.Getter;
 import lombok.NoArgsConstructor;
 import lombok.Setter;
 
-
 @Getter
 @Setter
 @NoArgsConstructor
@@ -35,5 +33,4 @@ public class GetPolicyValueDataDefinition {
     private String policyId;
     private String propertyName;
     private String origPropertyValue;
-
 }
index f618012..ec92ae6 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static java.util.Collections.emptyMap;
@@ -60,14 +59,12 @@ public class GroupDataDefinition extends ToscaDataDefinition {
         this.setGroupUUID(other.getGroupUUID());
         this.setInvariantName(other.getInvariantName());
         this.setCreatedFrom(other.getCreatedFrom());
-
         if (other.getMembers() != null) {
             this.setMembers(new HashMap<>(other.getMembers()));
         }
         if (other.getArtifacts() != null) {
             this.setArtifacts(new ArrayList<>(other.getArtifacts()));
         }
-
         if (other.getArtifactsUuid() != null) {
             this.setArtifactsUuid(new ArrayList<>(other.getArtifactsUuid()));
         }
@@ -161,7 +158,6 @@ public class GroupDataDefinition extends ToscaDataDefinition {
             return members;
         }
         return emptyMap();
-
     }
 
     public List<String> getArtifacts() {
@@ -199,12 +195,10 @@ public class GroupDataDefinition extends ToscaDataDefinition {
     @Override
     public String toString() {
         return "GroupDataDefinition [propertyValueCounter=" + propertyValueCounter + ", toscaPresentation=" + toscaPresentation + ", getName()="
-            + getName() + ", getUniqueId()=" + getUniqueId() + ", getType()=" + getType() + ", getVersion()="
-            + getVersion() + ", getInvariantUUID()=" + getInvariantUUID() + ", getDescription()=" + getDescription() + ", getPropertyValueCounter()="
-            + getPropertyValueCounter() + ", getGroupUUID()=" + getGroupUUID() + ", getMembers()="
-            + getMembers() + ", getArtifacts()=" + getArtifacts() + ", getArtifactsUuid()=" + getArtifactsUuid() + ", getClass()=" + getClass()
-            + ", hashCode()=" + hashCode() + ", toString()="
-            + super.toString() + "]";
+            + getName() + ", getUniqueId()=" + getUniqueId() + ", getType()=" + getType() + ", getVersion()=" + getVersion() + ", getInvariantUUID()="
+            + getInvariantUUID() + ", getDescription()=" + getDescription() + ", getPropertyValueCounter()=" + getPropertyValueCounter()
+            + ", getGroupUUID()=" + getGroupUUID() + ", getMembers()=" + getMembers() + ", getArtifacts()=" + getArtifacts() + ", getArtifactsUuid()="
+            + getArtifactsUuid() + ", getClass()=" + getClass() + ", hashCode()=" + hashCode() + ", toString()=" + super.toString() + "]";
     }
 
     public boolean containsInstanceAsMember(String instanceId) {
index 5f62b75..82305a6 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.ArrayList;
index 1014023..0bc3182 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -40,12 +39,10 @@ public class GroupTypeDataDefinition extends ToscaTypeDataDefinition {
     private Map<String, String> metadata;
     private String description;
     private boolean highestVersion;
-
     /**
      * Timestamp of data type creation
      */
     private Long creationTime;
-
     /**
      * Timestamp of the data type last update
      */
@@ -63,5 +60,4 @@ public class GroupTypeDataDefinition extends ToscaTypeDataDefinition {
         this.highestVersion = other.highestVersion;
         this.derivedFrom = other.derivedFrom;
     }
-
 }
index e3e4191..aa9c7c8 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.EqualsAndHashCode;
@@ -35,11 +34,9 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 public class HeatParameterDataDefinition extends ToscaDataDefinition {
 
     private String uniqueId;
-
     private String name;
     private String type;
     private String description;
-
     private String currentValue;
     private String defaultValue;
 
@@ -51,5 +48,4 @@ public class HeatParameterDataDefinition extends ToscaDataDefinition {
         this.currentValue = hp.currentValue;
         this.defaultValue = hp.defaultValue;
     }
-
 }
index e70f52c..3808383 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.Map;
index 4f3de0c..23992ef 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.Getter;
@@ -39,5 +38,4 @@ public class InputsValueDataDefinition extends ToscaDataDefinition {
         this.name = name;
         this.value = value;
     }
-
 }
index e93deab..0047765 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.TOSCA_RESOURCE_NAME;
index 42a7dba..5430c37 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.io.Serializable;
@@ -25,8 +24,7 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 public class InterfaceInstanceDataDefinition extends ToscaDataDefinition implements Serializable {
 
-    public InterfaceInstanceDataDefinition(
-        InterfaceInstanceDataDefinition inter) {
+    public InterfaceInstanceDataDefinition(InterfaceInstanceDataDefinition inter) {
         this.toscaPresentation = null;
         setInputs(inter.getInputs() == null ? new HashMap<String, Object>() : new HashMap<>(inter.getInputs()));
         setOperations(new HashMap<>(inter.getOperations()));
@@ -66,8 +64,6 @@ public class InterfaceInstanceDataDefinition extends ToscaDataDefinition impleme
 
     @Override
     public int hashCode() {
-
         return Objects.hash(this.getInputs());
     }
-
 }
index 9c92c35..7209717 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -30,7 +29,6 @@ public class ListCapabilityDataDefinition extends ListDataDefinition<CapabilityD
 
     public ListCapabilityDataDefinition(ListCapabilityDataDefinition cdt) {
         super(cdt);
-
     }
 
     @JsonCreator
@@ -44,9 +42,7 @@ public class ListCapabilityDataDefinition extends ListDataDefinition<CapabilityD
         return listToscaDataDefinition;
     }
 
-
     public void setListToscaDataDefinition(List<CapabilityDataDefinition> listToscaDataDefinition) {
         this.listToscaDataDefinition = listToscaDataDefinition;
     }
-
 }
index 892448d..f28654e 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -36,7 +35,6 @@ public class ListDataDefinition<T extends ToscaDataDefinition> extends ToscaData
 
     public ListDataDefinition(ListDataDefinition<T> cdt) {
         listToscaDataDefinition = cdt.listToscaDataDefinition;
-
     }
 
     public ListDataDefinition(List<T> listToscaDataDefinition) {
@@ -93,14 +91,12 @@ public class ListDataDefinition<T extends ToscaDataDefinition> extends ToscaData
     public <T extends ToscaDataDefinition> T removeByOwnerId(Set<String> ownerIdList) {
         List<T> collect1 = (List<T>) listToscaDataDefinition.stream().filter(e -> ownerIdList.contains(e.getOwnerId())).collect(Collectors.toList());
         ListDataDefinition listDef = new ListDataDefinition(collect1);
-
         listToscaDataDefinition.removeIf(e -> ownerIdList.contains(e.getOwnerId()));
         return (T) listDef;
     }
 
     @Override
     public <T extends ToscaDataDefinition> T updateIfExist(T other, boolean allowDefaultValueOverride) {
-
         List<T> list = ((ListDataDefinition) other).getListToscaDataDefinition();
         list.forEach(e -> {
             String nameFromPrev = (String) e.getToscaPresentationValue(JsonPresentationFields.NAME);
index 8ce1404..149a757 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -34,7 +33,6 @@ public class ListMapPropertiesDataDefinition extends ListDataDefinition<MapPrope
 
     public ListMapPropertiesDataDefinition(ListMapPropertiesDataDefinition cdt) {
         super(cdt);
-
     }
 
     @JsonCreator
@@ -48,10 +46,7 @@ public class ListMapPropertiesDataDefinition extends ListDataDefinition<MapPrope
         return listToscaDataDefinition;
     }
 
-
     public void setMapToscaDataDefinition(List<MapPropertiesDataDefinition> listToscaDataDefinition) {
         this.listToscaDataDefinition = listToscaDataDefinition;
     }
-
-
 }
index 594f6eb..7dd699c 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -30,7 +29,6 @@ public class ListRequirementDataDefinition extends ListDataDefinition<Requiremen
 
     public ListRequirementDataDefinition(ListRequirementDataDefinition cdt) {
         super(cdt);
-
     }
 
     @JsonCreator
@@ -44,10 +42,7 @@ public class ListRequirementDataDefinition extends ListDataDefinition<Requiremen
         return listToscaDataDefinition;
     }
 
-
     public void setListToscaDataDefinition(List<RequirementDataDefinition> listToscaDataDefinition) {
         this.listToscaDataDefinition = listToscaDataDefinition;
     }
-
-
 }
index 9f025d2..ba174bd 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -50,9 +49,7 @@ public class MapArtifactDataDefinition extends MapDataDefinition<ArtifactDataDef
         return mapToscaDataDefinition;
     }
 
-
     public void setMapToscaDataDefinition(Map<String, ArtifactDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
 }
index d89ecca..1425007 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
-import lombok.Getter;
-import lombok.NoArgsConstructor;
-import lombok.Setter;
-
 import java.util.HashMap;
 import java.util.Map;
 import lombok.Getter;
@@ -60,6 +54,7 @@ public class MapAttributesDataDefinition extends MapDataDefinition<AttributeData
         this.mapToscaDataDefinition = toBeDeepCopiedMapPropertiesDataDefinition.mapToscaDataDefinition == null ? null
             : new HashMap(toBeDeepCopiedMapPropertiesDataDefinition.mapToscaDataDefinition);
     }
+
     @JsonValue
     @Override
     public Map<String, AttributeDataDefinition> getMapToscaDataDefinition() {
@@ -69,5 +64,4 @@ public class MapAttributesDataDefinition extends MapDataDefinition<AttributeData
     public void setMapToscaDataDefinition(Map<String, AttributeDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
 }
index 2ed37ae..89dd793 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import java.util.Map;
@@ -43,5 +41,4 @@ public class MapCapabilityProperty extends MapDataDefinition<MapPropertiesDataDe
     public void setMapToscaDataDefinition(Map<String, MapPropertiesDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
 }
index 2a23ff8..b90a406 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.ArrayList;
@@ -62,27 +61,21 @@ public class MapComponentInstanceExternalRefs extends ToscaDataDefinition {
      * @param ref        to add
      */
     public boolean addExternalRef(String objectType, String ref) {
-
         List<String> refList = this.getExternalRefsByObjectType(objectType);
-
         if (refList == null) {
             //Create list if does not exist and add it to map
             refList = new ArrayList<>();
             this.getComponentInstanceExternalRefs().put(objectType, refList);
         }
-
         //Add reference to list if does not exist
         if (!refList.contains(ref)) {
             return refList.add(ref);
         }
-
         return false;
-
     }
 
     public boolean deleteExternalRef(String objectType, String ref) {
         List<String> refList = this.getExternalRefsByObjectType(objectType);
-
         if (refList != null) {
             return refList.remove(ref);
         } else {
@@ -92,12 +85,10 @@ public class MapComponentInstanceExternalRefs extends ToscaDataDefinition {
 
     public boolean replaceExternalRef(String objectType, String oldRef, String newRef) {
         List<String> refList = this.getExternalRefsByObjectType(objectType);
-
         if (refList != null && !refList.contains(newRef)) {
             return Collections.replaceAll(refList, oldRef, newRef);
         } else {
             return false;
         }
     }
-
 }
index 062e5aa..4c5e17c 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -37,7 +36,6 @@ public class MapDataDefinition<T extends ToscaDataDefinition> extends ToscaDataD
     public MapDataDefinition(MapDataDefinition<T> cdt) {
         super();
         mapToscaDataDefinition = cdt.mapToscaDataDefinition;
-
     }
 
     @JsonCreator
@@ -83,9 +81,7 @@ public class MapDataDefinition<T extends ToscaDataDefinition> extends ToscaDataD
         if (null == mapToscaDataDefinition || uid == null) {
             return null;
         }
-        Map.Entry<String, T> entry = mapToscaDataDefinition.entrySet().stream().filter(e ->
-            e.getValue().findUidMatch(uid))
-            .findAny().orElse(null);
+        Map.Entry<String, T> entry = mapToscaDataDefinition.entrySet().stream().filter(e -> e.getValue().findUidMatch(uid)).findAny().orElse(null);
         if (null == entry) {
             return null;
         }
@@ -95,12 +91,9 @@ public class MapDataDefinition<T extends ToscaDataDefinition> extends ToscaDataD
     @Override
     public <T extends ToscaDataDefinition> T removeByOwnerId(Set<String> ownerIdList) {
         if (mapToscaDataDefinition != null) {
-            Map<String, T> collect = (Map<String, T>) mapToscaDataDefinition.entrySet()
-                .stream()
+            Map<String, T> collect = (Map<String, T>) mapToscaDataDefinition.entrySet().stream()
                 .filter(e -> ownerIdList.contains(e.getValue().getOwnerId())).collect(Collectors.toMap(Map.Entry::getKey, (Map.Entry::getValue)));
-
             MapDataDefinition collectMap = new MapDataDefinition<>(collect);
-
             mapToscaDataDefinition.entrySet().removeIf(e -> ownerIdList.contains(e.getValue().getOwnerId()));
             return (T) collectMap;
         }
@@ -109,7 +102,6 @@ public class MapDataDefinition<T extends ToscaDataDefinition> extends ToscaDataD
 
     @Override
     public <T extends ToscaDataDefinition> T updateIfExist(T other, boolean allowDefaultValueOverride) {
-
         Map<String, T> map = ((MapDataDefinition) other).getMapToscaDataDefinition();
         if (map != null) {
             map.entrySet().forEach(e -> {
index 813da54..34674bf 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import java.util.Map;
@@ -51,9 +49,7 @@ public class MapGroupsDataDefinition extends MapDataDefinition<GroupInstanceData
         return mapToscaDataDefinition;
     }
 
-
     public void setMapToscaDataDefinition(Map<String, GroupInstanceDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
 }
index 772eb71..1b7c80b 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
index b8b899a..1bb394d 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import java.util.HashMap;
@@ -32,7 +30,6 @@ public class MapListCapabilityDataDefinition extends MapDataDefinition<ListCapab
 
     public MapListCapabilityDataDefinition(MapListCapabilityDataDefinition cdt) {
         super(cdt);
-
     }
 
     @JsonCreator
index 1f830b5..b15135b 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import java.util.HashMap;
@@ -32,7 +30,6 @@ public class MapListRequirementDataDefinition extends MapDataDefinition<ListRequ
 
     public MapListRequirementDataDefinition(MapListRequirementDataDefinition cdt) {
         super(cdt);
-
     }
 
     @JsonCreator
@@ -63,5 +60,4 @@ public class MapListRequirementDataDefinition extends MapDataDefinition<ListRequ
             }
         }
     }
-
 }
index 456ac7f..8483b69 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonValue;
 import java.util.HashMap;
@@ -66,6 +64,4 @@ public class MapPropertiesDataDefinition extends MapDataDefinition<PropertyDataD
     public void setMapToscaDataDefinition(Map<String, PropertyDataDefinition> mapToscaDataDefinition) {
         this.mapToscaDataDefinition = mapToscaDataDefinition;
     }
-
-
 }
index eb7b6af..17b0131 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static org.openecomp.sdc.be.datatypes.enums.JsonPresentationFields.IO_WORKFLOW_ASSOCIATION_TYPE;
@@ -74,8 +73,7 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
     }
 
     public ListDataDefinition<OperationInputDefinition> getInputs() {
-        return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.OPERATION_INPUTS);
+        return (ListDataDefinition<OperationInputDefinition>) getToscaPresentationValue(JsonPresentationFields.OPERATION_INPUTS);
     }
 
     public void setInputs(ListDataDefinition<OperationInputDefinition> inputs) {
@@ -83,8 +81,7 @@ public class OperationDataDefinition extends ToscaDataDefinition implements Seri
     }
 
     public ListDataDefinition<OperationOutputDefinition> getOutputs() {
-        return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.OPERATION_OUTPUTS);
+        return (ListDataDefinition<OperationOutputDefinition>) getToscaPresentationValue(JsonPresentationFields.OPERATION_OUTPUTS);
     }
 
     public void setOutputs(ListDataDefinition<OperationOutputDefinition> outputs) {
index ef3d8f9..6bc88b5 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -30,5 +29,4 @@ public class OperationImplementation {
 
     private String primary;
     private List<String> dependencies;
-
 }
index 53b1a1e..3a91094 100644 (file)
@@ -15,7 +15,6 @@
  */
 package org.openecomp.sdc.be.datatypes.elements;
 
-
 import com.fasterxml.jackson.annotation.JsonCreator;
 import lombok.Getter;
 import lombok.Setter;
@@ -65,5 +64,4 @@ public class OperationInputDefinition extends InputDataDefinition {
     public void setLabel(String name) {
         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL, name);
     }
-
 }
index aae9f72..7caedac 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.Map;
@@ -30,5 +29,4 @@ public class OperationInstance {
 
     private OperationImplementation implementation;
     private Map<String, Object> inputs;
-
 }
index dc2ea93..2579bca 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -45,5 +44,4 @@ public class OperationOutputDefinition extends InputDataDefinition {
     public void setLabel(String name) {
         setToscaPresentationValue(JsonPresentationFields.ARTIFACT_LABEL, name);
     }
-
 }
index b0760c7..438b756 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static java.util.Collections.emptyList;
@@ -203,5 +202,4 @@ public class PolicyDataDefinition extends PropertyDataDefinition {
         Map<PolicyTargetType, List<String>> targets = getTargets();
         return targets == null || !targets.containsKey(targetType) ? emptyList() : targets.get(targetType);
     }
-
 }
index 187e4d4..3193d27 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.AllArgsConstructor;
@@ -25,11 +24,7 @@ import lombok.Getter;
 
 @AllArgsConstructor
 public enum PolicyTargetType {
-
-    GROUPS("GROUPS"),
-    COMPONENT_INSTANCES("COMPONENT_INSTANCES"),
-    TYPE_DOES_NOT_EXIST("TYPE_DOES_NOT_EXIST");
-
+    GROUPS("GROUPS"), COMPONENT_INSTANCES("COMPONENT_INSTANCES"), TYPE_DOES_NOT_EXIST("TYPE_DOES_NOT_EXIST");
     @Getter
     private final String name;
 
index 197260b..82f0869 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -37,12 +36,10 @@ public class PolicyTypeDataDefinition extends ToscaTypeDataDefinition {
     private List<String> targets;
     private Map<String, String> metadata;
     private String description;
-
     /**
      * Timestamp of data type creation
      */
     private Long creationTime;
-
     /**
      * Timestamp of the data type last update
      */
@@ -65,9 +62,7 @@ public class PolicyTypeDataDefinition extends ToscaTypeDataDefinition {
     @Override
     public String toString() {
         return "PolicyTypeDataDefinition [uniqueId=" + uniqueId + ", type=" + getType() + ", name=" + getName() + ", icon=" + getIcon() + ", version="
-            + version
-            + ", targets=" + targets + ", metadata=" + metadata + ", description=" + description + ", creationTime="
-            + creationTime + ", modificationTime=" + modificationTime + "]";
+            + version + ", targets=" + targets + ", metadata=" + metadata + ", description=" + description + ", creationTime=" + creationTime
+            + ", modificationTime=" + modificationTime + "]";
     }
-
 }
index 5e1c42c..0f6524d 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.ArrayList;
index fd9ea26..902e263 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 public interface PropertiesOwner {
@@ -27,5 +26,4 @@ public interface PropertiesOwner {
     String getName();
 
     String getNormalizedName();
-
 }
index 3a0d08c..c730783 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import static org.apache.commons.collections.CollectionUtils.isNotEmpty;
@@ -54,7 +53,6 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
     private String label;
     private Boolean immutable = Boolean.FALSE;
     private Boolean mappedToComponentProperty = Boolean.TRUE;
-
     private String inputPath;
     private String status;
     private String inputId;
@@ -62,21 +60,15 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
     private String propertyId;
     private String parentPropertyType;
     private String subPropertyInputPath;
-
     private List<Annotation> annotations;
     /**
      * The resource id which this property belongs to
      */
     private String parentUniqueId;
-
     private List<GetInputValueDataDefinition> getInputValues;
-
     private Boolean isDeclaredListInput = Boolean.FALSE;
-
     private List<GetPolicyValueDataDefinition> getPolicyValues;
-
     private List<String> propertyConstraints;
-
     private Map<String, String> metadata;
 
     public PropertyDataDefinition() {
@@ -157,7 +149,6 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
         if (schema != null) {
             return schema.getProperty();
         }
-
         return null;
     }
 
@@ -169,7 +160,9 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
         return immutable;
     }
 
-    public Boolean isMappedToComponentProperty() { return mappedToComponentProperty; }
+    public Boolean isMappedToComponentProperty() {
+        return mappedToComponentProperty;
+    }
 
     public String getParentUniqueId() {
         return getOwnerId();
@@ -267,13 +260,10 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
 
     @Override
     public <T extends ToscaDataDefinition> T mergeFunction(T other, boolean allowDefaultValueOverride) {
-        if (this.getType() != null
-            && this.getType().equals(other.getToscaPresentationValue(JsonPresentationFields.TYPE))
-            && compareSchemaType(other)) {
+        if (this.getType() != null && this.getType().equals(other.getToscaPresentationValue(JsonPresentationFields.TYPE)) && compareSchemaType(
+            other)) {
             other.setOwnerId(getOwnerId());
-            if (allowDefaultValueOverride
-                && getDefaultValue() != null
-                && !getDefaultValue().isEmpty()) {
+            if (allowDefaultValueOverride && getDefaultValue() != null && !getDefaultValue().isEmpty()) {
                 other.setToscaPresentationValue(JsonPresentationFields.DEFAULT_VALUE, getDefaultValue());
             }
             return other;
@@ -301,7 +291,6 @@ public class PropertyDataDefinition extends ToscaDataDefinition {
         if (this.annotations != null) {
             annotationSet.addAll(this.annotations);
         }
-
         this.annotations = new ArrayList<>(annotationSet);
         setToscaPresentationValue(JsonPresentationFields.ANNOTATIONS, this.annotations);
     }
index 8a99bf8..8a20c16 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -62,12 +61,10 @@ public class PropertyRule extends ToscaDataDefinition {
     }
 
     public String getToken(int tokenNumber) {
-
         int index = tokenNumber - 1;
         if (rule == null || index >= rule.size() || index < 0) {
             return null;
         }
-
         return rule.get(index);
     }
 
@@ -85,16 +82,13 @@ public class PropertyRule extends ToscaDataDefinition {
     }
 
     public boolean compareRule(PropertyRule comparedPropertyRule) {
-
         if (comparedPropertyRule == null) {
             return false;
         }
-
         List<String> comparedRule = comparedPropertyRule.getRule();
         if (rule == null && comparedRule == null) {
             return true;
         }
-
         if (rule != null && comparedRule != null) {
             if (rule.size() != comparedRule.size()) {
                 return false;
@@ -114,15 +108,11 @@ public class PropertyRule extends ToscaDataDefinition {
         } else {
             return false;
         }
-
     }
 
     public void replaceFirstToken(String token) {
-
         if (rule != null && rule.size() > 0) {
             rule.set(0, token);
         }
-
     }
-
 }
index 8c1d44b..539914c 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -176,7 +175,6 @@ public class RelationshipInstDataDefinition extends ToscaDataDefinition {
 
     public Long getCreationTime() {
         return (Long) getToscaPresentationValue(JsonPresentationFields.CREATION_TIME);
-
     }
 
     public void setCreationTime(Long creationTime) {
@@ -210,10 +208,8 @@ public class RelationshipInstDataDefinition extends ToscaDataDefinition {
         Boolean originUI = isOriginUI();
         Long creationTime = getCreationTime();
         Long modificationTime = getModificationTime();
-
         return "RelationshipTypeDataDefinition [uniqueId=" + uniqueId + ", description=" + description + ", type=" + type + ", validSourceTypes="
-            + validSourceTypes
-            + ", version=" + version + ", originUI=" + originUI + ", creationTime=" + creationTime + ", modificationTime=" + modificationTime + "]";
+            + validSourceTypes + ", version=" + version + ", originUI=" + originUI + ", creationTime=" + creationTime + ", modificationTime="
+            + modificationTime + "]";
     }
-
 }
index ae289b7..40dd517 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import com.google.common.collect.Lists;
@@ -40,7 +39,6 @@ public class RequirementDataDefinition extends ToscaDataDefinition {
     public static final String MIN_OCCURRENCES = "0";
     public static final String MAX_OCCURRENCES = "UNBOUNDED";
     public static final String MAX_DEFAULT_OCCURRENCES = "1";
-
     @Getter
     @Setter
     public boolean external = false;
@@ -111,7 +109,6 @@ public class RequirementDataDefinition extends ToscaDataDefinition {
     /**
      * specify the capability type
      */
-
     public String getCapability() {
         return (String) getToscaPresentationValue(JsonPresentationFields.CAPABILITY);
     }
@@ -219,5 +216,4 @@ public class RequirementDataDefinition extends ToscaDataDefinition {
         }
         setPath(path);
     }
-
 }
index 8ce9865..afec4d4 100644 (file)
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.io.Serializable;
@@ -25,8 +24,7 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 public class RequirementNodeFilterCapabilityDataDefinition extends ToscaDataDefinition implements Serializable {
 
     public ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> getProperties() {
-        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.PROPERTIES);
+        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
     }
 
     public void setProperties(ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties) {
index 1ee33ee..ed3056c 100644 (file)
@@ -22,7 +22,6 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 public class RequirementNodeFilterPropertyDataDefinition extends ToscaDataDefinition implements Serializable {
 
-
     public List<String> getConstraints() {
         return (List<String>) getToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_CONSTRAINT);
     }
index 21f133a..d6c9a86 100644 (file)
@@ -16,7 +16,6 @@
  *  SPDX-License-Identifier: Apache-2.0
  *  ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.io.Serializable;
@@ -28,8 +27,7 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 public class RequirementSubstitutionFilterCapabilityDataDefinition extends ToscaDataDefinition implements Serializable {
 
     public ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> getProperties() {
-        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.PROPERTIES);
+        return (ListDataDefinition<RequirementNodeFilterPropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
     }
 
     public void setProperties(final ListDataDefinition<RequirementNodeFilterPropertyDataDefinition> properties) {
index 75efd12..b1b53bb 100644 (file)
@@ -25,7 +25,6 @@ import org.openecomp.sdc.be.datatypes.tosca.ToscaDataDefinition;
 
 public class RequirementSubstitutionFilterPropertyDataDefinition extends ToscaDataDefinition implements Serializable {
 
-
     public List<String> getConstraints() {
         return (List<String>) getToscaPresentationValue(JsonPresentationFields.PROPERTY_FILTER_CONSTRAINT);
     }
index c17e7fa..5e7b0ab 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import java.util.List;
@@ -42,12 +41,10 @@ public class SchemaDefinition extends ToscaDataDefinition {
     private Map<String, PropertyDataDefinition> properties;
     private PropertyDataDefinition property;
 
-    public SchemaDefinition(String derivedFrom, List<String> constraints,
-                            Map<String, PropertyDataDefinition> properties) {
+    public SchemaDefinition(String derivedFrom, List<String> constraints, Map<String, PropertyDataDefinition> properties) {
         this.setDerivedFrom(derivedFrom);
         this.setConstraints(constraints);
         this.setProperties(properties);
-
     }
 
     public void addProperty(String key, PropertyDataDefinition property) {
@@ -56,7 +53,7 @@ public class SchemaDefinition extends ToscaDataDefinition {
 
     @Override
     public String toString() {
-        return "SchemaDefinition [" + "derivedFrom='" + derivedFrom + ", constraints=" + constraints + ", properties="
-            + properties + ", property=" + property + ']';
+        return "SchemaDefinition [" + "derivedFrom='" + derivedFrom + ", constraints=" + constraints + ", properties=" + properties + ", property="
+            + property + ']';
     }
 }
index d51822b..7efeb0f 100644 (file)
@@ -47,8 +47,7 @@ public class SubstitutionFilterDataDefinition extends ToscaDataDefinition implem
     }
 
     public ListDataDefinition<RequirementSubstitutionFilterPropertyDataDefinition> getProperties() {
-        return (ListDataDefinition<RequirementSubstitutionFilterPropertyDataDefinition>) getToscaPresentationValue(
-            JsonPresentationFields.PROPERTIES);
+        return (ListDataDefinition<RequirementSubstitutionFilterPropertyDataDefinition>) getToscaPresentationValue(JsonPresentationFields.PROPERTIES);
     }
 
     public void setProperties(final ListDataDefinition<RequirementSubstitutionFilterPropertyDataDefinition> properties) {
@@ -71,5 +70,4 @@ public class SubstitutionFilterDataDefinition extends ToscaDataDefinition implem
     public void setID(final String name) {
         setToscaPresentationValue(JsonPresentationFields.UNIQUE_ID, name);
     }
-
 }
index b0a73a2..058f8aa 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.Getter;
index c4ca549..a21510b 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.elements;
 
 import lombok.Getter;
@@ -39,5 +38,4 @@ public class ToscaTypeDataDefinition extends ToscaDataDefinition {
         this.icon = other.icon;
         this.type = other.type;
     }
-
 }
index 2094699..497077e 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -22,7 +21,6 @@ import lombok.Getter;
 @AllArgsConstructor
 public enum AssetTypeEnum {
     RESOURCES("resources", "Resource"), SERVICES("services", "Service"), PRODUCTS("products", "Product");
-
     private final String value;
     private final String correspondingComponent;
 
@@ -33,7 +31,6 @@ public enum AssetTypeEnum {
                 return ComponentTypeEnum.findByValue(curr.correspondingComponent);
             }
         }
-
         return ret;
     }
 }
index ac6d1bb..435e51b 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -21,7 +20,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum ComponentFieldsEnum {
-
+    // @formatter:off
     PROPERTIES("properties"),
     INPUTS("inputs"),
     OUTPUTS("outputs"),
@@ -55,6 +54,7 @@ public enum ComponentFieldsEnum {
     SUBSTITUTION_FILTER("substitutionFilter"),
     COMPONENT_INSTANCES_INTERFACES("componentInstancesInterfaces"),
     DATA_TYPES("data_types");
+    // @formatter:on
 
     private final String value;
 
index e4e689a..44956ce 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -21,13 +20,9 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum ComponentTypeEnum {
-    RESOURCE("Resource"),
-    SERVICE("Service"),
-    RESOURCE_INSTANCE("Resource Instance"),
-    PRODUCT("Product"),
-    SERVICE_INSTANCE("Service Instance");
-
+    RESOURCE("Resource"), SERVICE("Service"), RESOURCE_INSTANCE("Resource Instance"), PRODUCT("Product"), SERVICE_INSTANCE("Service Instance");
     // Those values cannot be another field in enum, because they are needed
+
     // as constants for Swagger allowedValues param
     public static final String RESOURCE_PARAM_NAME = "resources";
     public static final String SERVICE_PARAM_NAME = "services";
@@ -68,7 +63,6 @@ public enum ComponentTypeEnum {
         if (type == null) {
             return ret;
         }
-
         switch (type) {
             case RESOURCE:
                 ret = RESOURCE_PARAM_NAME;
@@ -86,7 +80,6 @@ public enum ComponentTypeEnum {
     }
 
     public NodeTypeEnum getNodeType() {
-
         switch (this) {
             case RESOURCE:
                 return NodeTypeEnum.Resource;
index 2791055..56ad18e 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.Arrays;
@@ -23,9 +22,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum ConnectionPointEnum {
-
     CAPABILITY("capability"), REQUIREMENT("requirement");
-
     private static List<ConnectionPointEnum> connectionPointEnums = Arrays.asList(values());
     private final String data;
 
index 9c61120..fd9f7c2 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.Getter;
 
 @Getter
-public enum CreatedFrom {
-
-    UI,
-    CSAR
-
-}
+public enum CreatedFrom {UI, CSAR}
index 76ce9cd..116171d 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.Getter;
 
 @Getter
-public enum DeclarationTypeEnum {
-    INPUT,
-    OUTPUT,
-    POLICY
-}
+public enum DeclarationTypeEnum {INPUT, OUTPUT, POLICY}
index 635574b..c8c94b9 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -21,11 +20,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum EnvironmentStatusEnum {
-    UNKNOWN("unknown"),
-    IN_PROGRESS("in_progress"),
-    FAILED("failed"),
-    COMPLETED("completed");
-
+    UNKNOWN("unknown"), IN_PROGRESS("in_progress"), FAILED("failed"), COMPLETED("completed");
     private final String name;
 
     public static EnvironmentStatusEnum getByName(final String name) {
@@ -40,5 +35,4 @@ public enum EnvironmentStatusEnum {
                 return UNKNOWN;
         }
     }
-
 }
index 4b466dd..a5ee617 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -26,9 +25,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum ExternalCategoryTypeEnum {
-
     PARTNER_DOMAIN_SERVICE("Partner Domain Service", true);
-
     private final String value;
     private final boolean isAtomicType;
 
@@ -72,7 +69,6 @@ public enum ExternalCategoryTypeEnum {
      * @return
      */
     public static boolean containsName(String type) {
-
         for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
             if (e.getValue().equals(type)) {
                 return true;
@@ -88,7 +84,6 @@ public enum ExternalCategoryTypeEnum {
      * @return
      */
     public static boolean containsIgnoreCase(String type) {
-
         for (ExternalCategoryTypeEnum e : ExternalCategoryTypeEnum.values()) {
             if (e.getValue().equalsIgnoreCase(type)) {
                 return true;
@@ -96,6 +91,4 @@ public enum ExternalCategoryTypeEnum {
         }
         return false;
     }
-
 }
-
index e4245f3..a4dc008 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.Arrays;
@@ -26,7 +25,6 @@ import lombok.Getter;
 public enum FilterKeyEnum {
     RESOURCE_TYPE("resourceType"), SUB_CATEGORY("subCategory"), CATEGORY("category"), DISTRIBUTION_STATUS("distributionStatus"), NAME_FRAGMENT(
         "nameFragment");
-
     private static final int NUMBER_OF_RESOURCES_FILTERED = 3;
     private static final int NUMBER_OF_SERVICES_FILTERED = 4;
     private final String name;
@@ -47,6 +45,5 @@ public enum FilterKeyEnum {
             default:
                 return null;
         }
-
     }
 }
index 44a0d23..0ed0bd2 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.ArrayList;
@@ -24,7 +23,7 @@ import lombok.Getter;
 @AllArgsConstructor
 @Getter
 public enum GraphPropertyEnum {
-
+    // @formatter:off
     // field name ,class type ,unique ,indexed
     UNIQUE_ID("uid", String.class, true, true),
     LABEL("nodeLabel", String.class, false, true),
@@ -60,14 +59,12 @@ public enum GraphPropertyEnum {
     DATA_TYPES("data_types", Map.class, false, false),
 
     //Archive/Restore
-    IS_ARCHIVED("isArchived", Boolean.class, false, true),
-    IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true),
-    ARCHIVE_TIME("archiveTime", Long.class, false, true),
-    PREV_CATALOG_UPDATE_TIME("previousUpdateTime", Long.class, false, true),
-    CURRENT_CATALOG_UPDATE_TIME("currentUpdateTime", Long.class, false, true),
-
+    IS_ARCHIVED("isArchived", Boolean.class, false, true), IS_VSP_ARCHIVED("isVspArchived", Boolean.class, false, true), ARCHIVE_TIME("archiveTime",
+        Long.class, false, true), PREV_CATALOG_UPDATE_TIME("previousUpdateTime", Long.class, false, true), CURRENT_CATALOG_UPDATE_TIME(
+        "currentUpdateTime", Long.class, false, true),
     //Healing
     HEALING_VERSION("healVersion", Integer.class, false, true);
+    // @formatter:on
 
     private final String property;
     private final Class<?> clazz;
@@ -84,13 +81,10 @@ public enum GraphPropertyEnum {
     }
 
     public static List<String> getAllProperties() {
-
         List<String> arrayList = new ArrayList<>();
-
         for (GraphPropertyEnum graphProperty : GraphPropertyEnum.values()) {
             arrayList.add(graphProperty.getProperty());
         }
-
         return arrayList;
     }
 }
index 4801706..915ce35 100644 (file)
@@ -12,8 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -23,7 +21,5 @@ import lombok.Getter;
 @AllArgsConstructor
 public enum GroupTypeEnum {
     VF_MODULE("org.openecomp.groups.VfModule"), HEAT_STACK("org.openecomp.groups.HeatStack");
-
     private final String groupTypeName;
-
 }
index dc0908b..d16dc55 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.stream.Stream;
@@ -22,10 +21,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum InstantiationTypes {
-
-    A_LA_CARTE("A-la-carte"),
-    MACRO("Macro");
-
+    A_LA_CARTE("A-la-carte"), MACRO("Macro");
     private final String value;
 
     /**
@@ -34,9 +30,7 @@ public enum InstantiationTypes {
      * @param type
      * @return bool
      */
-
     public static boolean containsName(String type) {
-        return Stream.of(InstantiationTypes.values())
-            .anyMatch(instType -> type.equals(instType.getValue()));
+        return Stream.of(InstantiationTypes.values()).anyMatch(instType -> type.equals(instType.getValue()));
     }
 }
index 36d0f40..4cdf050 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -25,7 +24,7 @@ import lombok.ToString;
 @Getter
 @ToString(onlyExplicitlyIncluded = true)
 public enum JsonPresentationFields {
-
+    // @formatter:off
     UNIQUE_ID("uniqueId", GraphPropertyEnum.UNIQUE_ID),
     HIGHEST_VERSION("highestVersion", GraphPropertyEnum.IS_HIGHEST_VERSION),
     LIFECYCLE_STATE("lifecycleState", GraphPropertyEnum.STATE),
@@ -74,7 +73,6 @@ public enum JsonPresentationFields {
 
     ////Inputs
     ANNOTATIONS("annotations", null),
-
     ////Artifact
     ARTIFACT_TYPE("artifactType", null),
     ARTIFACT_REF("artifactRef", null),
@@ -160,13 +158,8 @@ public enum JsonPresentationFields {
     TOSCA_ID("tosca_id", null),
 
     //Relation
-    CAPABILTY_OWNER_ID("capabilityOwnerId", null),
-    REQUIREMENT_OWNER_ID("requirementOwnerId", null),
-    FROM_ID("fromId", null),
-    TO_ID("toId", null),
-    REQUIREMENT("requirement", null),
-    ORIGIN_UI("originUI", null),
-
+    CAPABILTY_OWNER_ID("capabilityOwnerId", null), REQUIREMENT_OWNER_ID("requirementOwnerId", null), FROM_ID("fromId", null), TO_ID("toId",
+        null), REQUIREMENT("requirement", null), ORIGIN_UI("originUI", null),
     //Groups
 
     GROUP_INVARIANT_UUID("invariantUUID", null),
@@ -225,9 +218,7 @@ public enum JsonPresentationFields {
     TARGETS("targets", null),
 
     //External Refs
-    EXTERNAL_REF("externalRef", null),
-    CREATED_FROM("createdFrom", null),
-
+    EXTERNAL_REF("externalRef", null), CREATED_FROM("createdFrom", null),
     //Archive
     IS_ARCHIVED("isArchived", GraphPropertyEnum.IS_ARCHIVED),
     ARCHIVE_TIME("archiveTime", GraphPropertyEnum.ARCHIVE_TIME),
@@ -266,6 +257,7 @@ public enum JsonPresentationFields {
     ATTRIBUTES("attributes", null),
 
     TOSCA_DEFINITIONS_VERSION("tosca_definitions_version", null);
+    // @formatter:on
 
     @ToString.Include
     private final String presentation;
@@ -295,5 +287,4 @@ public enum JsonPresentationFields {
     public String getPresentation() {
         return presentation;
     }
-
 }
index b3e55ac..c5eb865 100644 (file)
@@ -19,7 +19,6 @@
  * Modifications copyright (c) 2019 Nokia
  * ================================================================================
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.List;
@@ -166,5 +165,4 @@ public class JsonPresentationFieldsExtractor {
     public String getServiceFunction() {
         return (String) properties.get(JsonPresentationFields.SERVICE_FUNCTION.getPresentation());
     }
-
 }
index aab37d1..45da511 100644 (file)
@@ -24,12 +24,6 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum MetadataKeyEnum {
-    METADATA_KEYS("metadataKeys"),
-    NAME("name"),
-    MANDATORY("mandatory"),
-    VALID_VALUES("validValues"),
-    DEFAULT("default");
-
+    METADATA_KEYS("metadataKeys"), NAME("name"), MANDATORY("mandatory"), VALID_VALUES("validValues"), DEFAULT("default");
     private final String name;
-
 }
index 13b6629..6070016 100644 (file)
@@ -28,10 +28,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum NodeFilterConstraintType {
-
-    PROPERTIES(NodeFilterConstraintType.PROPERTIES_PARAM_NAME),
-    CAPABILITIES(NodeFilterConstraintType.CAPABILITIES_PARAM_NAME);
-
+    PROPERTIES(NodeFilterConstraintType.PROPERTIES_PARAM_NAME), CAPABILITIES(NodeFilterConstraintType.CAPABILITIES_PARAM_NAME);
     // Those values are needed as constants for Swagger allowedValues param
     public static final String PROPERTIES_PARAM_NAME = "properties";
     public static final String CAPABILITIES_PARAM_NAME = "capabilities";
index 592bdc4..75a2177 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -21,6 +20,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum NodeTypeEnum {
+    // @formatter:off
     User("user"),
     Service("service"),
     Resource("resource"),
@@ -64,6 +64,7 @@ public enum NodeTypeEnum {
     GroupInstance("groupInstance"),
     AnnotationType("annotationType"),
     Component("component");
+    // @formatter:on
 
     private final String name;
 
index 5fad178..6cf663f 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -21,6 +20,7 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum OriginTypeEnum {
+    // @formatter:off
     PRODUCT("Product", "Product", "product instance", ComponentTypeEnum.PRODUCT, false),
     SERVICE("Service", "Service", "service instance", ComponentTypeEnum.SERVICE, false),
     VF("VF", "VF (Virtual Function)", "resource instance", ComponentTypeEnum.RESOURCE, false),
@@ -34,6 +34,7 @@ public enum OriginTypeEnum {
     CR("CR", "CR (Complex Resource)", "resource instance", ComponentTypeEnum.RESOURCE, false),
     ServiceProxy("Service Proxy", "Service Proxy", "service proxy", ComponentTypeEnum.RESOURCE, false),
     ServiceSubstitution("Service Substitution", "Service Substitution", "service substitution", ComponentTypeEnum.RESOURCE, false);
+    // @formatter:on
 
     private final String value;
     private final String displayValue;
@@ -51,5 +52,4 @@ public enum OriginTypeEnum {
         }
         return ret;
     }
-
 }
index a75ee15..e938e26 100644 (file)
@@ -19,7 +19,6 @@
  * Modifications copyright (c) 2019 Nokia
  * ================================================================================
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.AllArgsConstructor;
@@ -28,9 +27,6 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum PortMirroringEnum {
-    CISCO_VENDOR_NAME("CISCO"),
-    CISCO_VENDOR_MODEL_NUMBER("4500x");
-
+    CISCO_VENDOR_NAME("CISCO"), CISCO_VENDOR_MODEL_NUMBER("4500x");
     private final String value;
-
 }
index 379ef69..46f3375 100644 (file)
  * Modifications copyright (c) 2019 Nokia
  * ================================================================================
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import lombok.Getter;
 
 @Getter
-public enum PromoteVersionEnum {
-
-    NONE,
-    MINOR,
-    MAJOR
-
-}
+public enum PromoteVersionEnum {NONE, MINOR, MAJOR}
index d0f1c23..88ff61b 100644 (file)
@@ -12,7 +12,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.openecomp.sdc.be.datatypes.enums;
 
 import java.util.Arrays;
@@ -27,20 +26,23 @@ import lombok.Getter;
 @Getter
 @AllArgsConstructor
 public enum ResourceTypeEnum {
-
+    // @formatter:off
     VFC("VFC"/* (Virtual Function Component)"*/, true),
     VF("VF"/* (Virtual Function)" */, false),
+
     CR("CR"/* (Complex Resource"*/, false),
     CP("CP"/* (Connection Point)"*/, true),
+
     PNF("PNF"/* (Physical Network Function)" */, false),
     CVFC("CVFC"/* Complex Virtual Function Component*/, false),
+
     VL("VL"/* (Virtual Link)"*/, true),
     VFCMT("VFCMT"/* (VFC Monitoring Template)"*/, true),
-    Configuration("Configuration", true),
-    ServiceProxy("ServiceProxy", true),
+    Configuration("Configuration", true), ServiceProxy("ServiceProxy", true),
     //Generic VFC/VF/PNF/Service Type
     ABSTRACT("Abstract", true),
     SERVICE("Service"/*(Network Service)"*/, false);
+    // @formatter:on
 
     private final String value;
     private final boolean isAtomicType;
@@ -75,9 +77,7 @@ public enum ResourceTypeEnum {
         if (type == null) {
             return null;
         }
-        return Arrays.stream(ResourceTypeEnum.values())
-            .filter(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type))
-            .findFirst()
+        return Arrays.stream(ResourceTypeEnum.values()).filter(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type)).findFirst()
             .orElse(null);
     }
 
@@ -91,8 +91,7 @@ public enum ResourceTypeEnum {
         if (type == null) {
             return false;
         }
-        return Arrays.stream(ResourceTypeEnum.values())
-            .anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equals(type));
+        return Arrays.stream(ResourceTypeEnum.values()).anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equals(type));
     }
 
     /**
@@ -105,8 +104,6 @@ public enum ResourceTypeEnum {
         if (type == null) {
             return false;
         }
-        return Arrays.stream(ResourceTypeEnum.values())
-            .anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type));
+        return Arrays.stream(ResourceTypeEnum.values()).anyMatch(resourceTypeEnum -> resourceTypeEnum.name().equalsIgnoreCase(type));
     }
-
 }
index e89537d..a5ac0c7 100644 (file)
@@ -17,7 +17,6 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.datatypes.tosca;
 
 import com.fasterxml.jackson.annotation.JsonCreator;
@@ -44,6 +43,32 @@ public abstract class ToscaDataDefinition {
         toscaPresentation = art;
     }
 
+    public static <T extends ToscaDataDefinition> Either<Map<String, T>, String> mergeDataMaps(Map<String, T> map1, Map<String, T> map2) {
+        return mergeDataMaps(map1, map2, false);
+    }
+
+    // return Either.right(item key) if an illegal merge was attempted (overriding data type is forbidden)
+    public static <T extends ToscaDataDefinition> Either<Map<String, T>, String> mergeDataMaps(Map<String, T> map1, Map<String, T> map2,
+                                                                                               boolean allowDefaultValueOverride) {
+        for (Entry<String, T> entry : map2.entrySet()) {
+            map1.merge(entry.getKey(), entry.getValue(), (item1, item2) -> item1.mergeFunction(item2, allowDefaultValueOverride));
+            // validate merge success
+            if (!map1.containsKey(entry.getKey())) {
+                return Either.right(entry.getKey());
+            }
+        }
+        return Either.left(map1);
+    }
+
+    public static <T extends ToscaDataDefinition> Map<String, T> listToMapByName(List<T> dataList) {
+        return null == dataList ? new HashMap<>()
+            : dataList.stream().collect(Collectors.toMap(p -> (String) p.getToscaPresentationValue(JsonPresentationFields.NAME), p -> p));
+    }
+
+    public static <T extends ToscaDataDefinition> T removeAndCollectByOwnerId(T complexStructure, Set<String> ownerIdList) {
+        return complexStructure.removeByOwnerId(ownerIdList);
+    }
+
     @JsonValue
     public Object getToscaPresentationValue(JsonPresentationFields name) {
         if (toscaPresentation != null && toscaPresentation.containsKey(name.getPresentation())) {
@@ -61,13 +86,12 @@ public abstract class ToscaDataDefinition {
     }
 
     public void setToscaPresentationValue(JsonPresentationFields name, Object value) {
-        if(name !=null) {
+        if (name != null) {
             if (toscaPresentation == null) {
                 toscaPresentation = new HashMap<>();
             }
             toscaPresentation.put(name.getPresentation(), value);
         }
-
     }
 
     public void setOwnerIdIfEmpty(String ownerId) {
@@ -80,62 +104,36 @@ public abstract class ToscaDataDefinition {
         return (String) getToscaPresentationValue(JsonPresentationFields.TYPE);
     }
 
-    public String getVersion() {
-        return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
-    }
-
     public void setType(String type) {
         setToscaPresentationValue(JsonPresentationFields.TYPE, type);
     }
 
-    public void setOwnerId(String ownerId) {
-        setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId);
+    public String getVersion() {
+        return (String) getToscaPresentationValue(JsonPresentationFields.VERSION);
     }
 
     public String getOwnerId() {
         return (String) getToscaPresentationValue(JsonPresentationFields.OWNER_ID);
     }
 
+    public void setOwnerId(String ownerId) {
+        setToscaPresentationValue(JsonPresentationFields.OWNER_ID, ownerId);
+    }
+
     // default merge function for merging data maps - implement where needed and use mergeDataMaps method where applicable instead of map1.putAll(map2)
     public <T extends ToscaDataDefinition> T mergeFunction(T other, boolean allowDefaultValueOverride) {
         other.setOwnerId(getOwnerId());
         return other;
     }
 
-    public static <T extends ToscaDataDefinition> Either<Map<String, T>, String> mergeDataMaps(Map<String, T> map1, Map<String, T> map2) {
-        return mergeDataMaps(map1, map2, false);
-    }
-
-    // return Either.right(item key) if an illegal merge was attempted (overriding data type is forbidden)
-    public static <T extends ToscaDataDefinition> Either<Map<String, T>, String> mergeDataMaps(Map<String, T> map1, Map<String, T> map2, boolean allowDefaultValueOverride) {
-        for (Entry<String, T> entry : map2.entrySet()) {
-            map1.merge(entry.getKey(), entry.getValue(), (item1, item2) -> item1.mergeFunction(item2, allowDefaultValueOverride));
-            // validate merge success
-            if (!map1.containsKey(entry.getKey())) {
-                return Either.right(entry.getKey());
-            }
-        }
-        return Either.left(map1);
-    }
-
-    public static <T extends ToscaDataDefinition> Map<String, T> listToMapByName(List<T> dataList) {
-        return null == dataList ? new HashMap<>() : dataList.stream()
-                .collect(Collectors.toMap(p -> (String) p.getToscaPresentationValue(JsonPresentationFields.NAME), p -> p));
-    }
-
     public boolean findUidMatch(String uid) {
         return uid.equals(getToscaPresentationValue(JsonPresentationFields.UNIQUE_ID));
-
     }
 
     public <T extends ToscaDataDefinition> T removeByOwnerId(Set<String> ownerIdList) {
         return (T) this;
     }
 
-    public static <T extends ToscaDataDefinition> T removeAndCollectByOwnerId(T complexStructure, Set<String> ownerIdList) {
-        return complexStructure.removeByOwnerId(ownerIdList);
-    }
-
     public <T extends ToscaDataDefinition> T updateIfExist(T other, boolean allowDefaultValueOverride) {
         return other;
     }
@@ -143,5 +141,4 @@ public abstract class ToscaDataDefinition {
     public boolean isEmpty() {
         return false;
     }
-
 }
index b269723..bc60eb9 100644 (file)
@@ -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.be.togglz;
 
 import java.util.Arrays;
@@ -26,17 +25,10 @@ import org.togglz.core.annotation.Label;
 import org.togglz.core.context.FeatureContext;
 
 public enum ToggleableFeature implements Feature {
-    @Label("Default Feature")
-    DEFAULT_FEATURE,
-
-    @Label("Healing")
-    HEALING;
+    @Label("Default Feature") DEFAULT_FEATURE, @Label("Healing") HEALING;
 
     public static Feature getFeatureByName(String featureName) {
-        return Arrays.stream(values()).
-                filter(e -> e.name().equals(featureName))
-                .findFirst()
-                .orElse(null);
+        return Arrays.stream(values()).filter(e -> e.name().equals(featureName)).findFirst().orElse(null);
     }
 
     public boolean isActive() {
index 830449c..9278b4f 100644 (file)
@@ -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,9 +17,9 @@
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.togglz;
 
+import java.io.File;
 import org.togglz.core.Feature;
 import org.togglz.core.manager.TogglzConfig;
 import org.togglz.core.repository.StateRepository;
@@ -27,24 +27,22 @@ import org.togglz.core.repository.file.FileBasedStateRepository;
 import org.togglz.core.user.SimpleFeatureUser;
 import org.togglz.core.user.UserProvider;
 
-import java.io.File;
-
 public class TogglzConfiguration implements TogglzConfig {
 
-  private static final String TOGGLZ_FILE_LOCATION = "/tmp/features.properties";
+    private static final String TOGGLZ_FILE_LOCATION = "/tmp/features.properties";
 
-  @Override
-  public Class<? extends Feature> getFeatureClass() {
-    return ToggleableFeature.class;
-  }
+    @Override
+    public Class<? extends Feature> getFeatureClass() {
+        return ToggleableFeature.class;
+    }
 
-  @Override
-  public StateRepository getStateRepository() {
-    return new FileBasedStateRepository(new File(TOGGLZ_FILE_LOCATION));
-  }
+    @Override
+    public StateRepository getStateRepository() {
+        return new FileBasedStateRepository(new File(TOGGLZ_FILE_LOCATION));
+    }
 
-  @Override
-  public UserProvider getUserProvider() {
-    return () -> new SimpleFeatureUser("admin", true);
-  }
+    @Override
+    public UserProvider getUserProvider() {
+        return () -> new SimpleFeatureUser("admin", true);
+    }
 }
index 0539e32..ec3fb92 100644 (file)
  * limitations under the License.
  * ============LICENSE_END=========================================================
  */
-
 package org.openecomp.sdc.be.utils;
 
 import org.openecomp.sdc.common.api.Constants;
 
 public class CommonBeUtils {
+
     /**
      * Compares two ASDC versions of a component. It's for internal usage, so the assumption is that the versions are in valid format.
      *
      * @param firstVersion  - version in format major.minor or just major (e.g, 2.0 or 2)
      * @param secondVersion - version in format major.minor or just major (e.g, 2.0 or 2)
-     * @return Returns true iff:<br>
-     * 1) first version's major number is higher than second's (e.g., firstVersion = 1.1, secondVersion = 0.3)<br>
-     * 2) major version are equal, but first's minor version is higher than second's (e.g., firstVersion = 0.10, secondVersion = 0.9) <br>
+     * @return Returns true iff:<br> 1) first version's major number is higher than second's (e.g., firstVersion = 1.1, secondVersion = 0.3)<br> 2)
+     * major version are equal, but first's minor version is higher than second's (e.g., firstVersion = 0.10, secondVersion = 0.9) <br>
      */
     public static boolean compareAsdcComponentVersions(String firstVersion, String secondVersion) {
         String[] firstVersionNums = firstVersion.split("\\.");
@@ -48,18 +47,15 @@ public class CommonBeUtils {
         }
     }
 
-
     /**
      * Compares two version strings.
-     *
-     * Use this instead of String.compareTo() for a non-lexicographical
-     * comparison that works for version strings. e.g. "1.10".compareTo("1.6").
+     * <p>
+     * Use this instead of String.compareTo() for a non-lexicographical comparison that works for version strings. e.g. "1.10".compareTo("1.6").
      *
      * @param str1 a string of ordinal numbers separated by decimal points.
      * @param str2 a string of ordinal numbers separated by decimal points.
-     * @return The result is a negative integer if str1 is _numerically_ less than str2.
-     * The result is a positive integer if str1 is _numerically_ greater than str2.
-     * The result is zero if the strings are _numerically_ equal.
+     * @return The result is a negative integer if str1 is _numerically_ less than str2. The result is a positive integer if str1 is _numerically_
+     * greater than str2. The result is zero if the strings are _numerically_ equal.
      * @note It does not work if "1.10" is supposed to be equal to "1.10.0".
      */
     public static int conformanceLevelCompare(String str1, String str2) {
@@ -76,6 +72,7 @@ public class CommonBeUtils {
             return Integer.signum(diff);
         }
         // the strings are equal or one string is a substring of the other
+
         // e.g. "1.2.3" = "1.2.3" or "1.2.3" < "1.2.3.4"
         return Integer.signum(vals1.length - vals2.length);
     }
@@ -83,5 +80,4 @@ public class CommonBeUtils {
     public static String generateToscaResourceName(String resourceType, String resourceSystemName) {
         return Constants.USER_DEFINED_RESOURCE_NAMESPACE_PREFIX + resourceType.toLowerCase() + "." + resourceSystemName;
     }
-
 }
index 600401b..21ac7c7 100644 (file)
  */
 package org.openecomp.sdc.be.utils;
 
-import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
+import static java.util.Collections.emptyMap;
+import static java.util.stream.Collectors.toList;
 
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
-
-import static java.util.Collections.emptyMap;
-import static java.util.stream.Collectors.toList;
+import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition;
 
 public class PropertyDefinitionUtils {
 
@@ -41,16 +40,10 @@ public class PropertyDefinitionUtils {
         if (properties == null) {
             return emptyMap();
         }
-        return properties.entrySet()
-                .stream()
-                .collect(Collectors.toMap(Map.Entry::getKey,
-                        entry -> filterGetInputProps(entry.getValue())));
+        return properties.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, entry -> filterGetInputProps(entry.getValue())));
     }
 
     private static <T extends PropertyDataDefinition> List<PropertyDataDefinition> filterGetInputProps(List<T> propDefinitions) {
-        return propDefinitions
-                .stream()
-                .filter(PropertyDataDefinition::isGetInputProperty)
-                .collect(Collectors.toList());
+        return propDefinitions.stream().filter(PropertyDataDefinition::isGetInputProperty).collect(Collectors.toList());
     }
 }
index 7535fbd..be6a8c2 100644 (file)
@@ -43,6 +43,7 @@ public class TypeUtils {
     @Getter
     @AllArgsConstructor
     public enum ToscaTagNamesEnum {
+        // @formatter:off
         DERIVED_FROM("derived_from"), IS_PASSWORD("is_password"),
         // Properties
         PROPERTIES("properties"), TYPE("type"), STATUS("status"),
@@ -63,7 +64,8 @@ public class TypeUtils {
         // Heat env Validation
         PARAMETERS("parameters"),
         // Import Validations
-        TOSCA_VERSION("tosca_definitions_version"), TOPOLOGY_TEMPLATE("topology_template"), OCCURRENCES("occurrences"), NODE_TEMPLATES("node_templates"), GROUPS("groups"), INPUTS("inputs"),
+        TOSCA_VERSION("tosca_definitions_version"), TOPOLOGY_TEMPLATE("topology_template"), OCCURRENCES("occurrences"), NODE_TEMPLATES(
+            "node_templates"), GROUPS("groups"), INPUTS("inputs"),
         SUBSTITUTION_MAPPINGS("substitution_mappings"), NODE_TYPE("node_type"), DIRECTIVES("directives"),
         // Attributes
         ATTRIBUTES("attributes"), LABEL("label"), HIDDEN("hidden"), IMMUTABLE("immutable"), ANNOTATIONS("annotations"),
@@ -76,6 +78,7 @@ public class TypeUtils {
         IMPLEMENTATION("implementation"),
 
         DERIVED_FROM_NAME("derivedFromName");
+        // @formatter:om
 
         private final String elementName;