summaryrefslogtreecommitdiffstats
path: root/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
diff options
context:
space:
mode:
authorvempo <vitaliy.emporopulo@amdocs.com>2018-11-07 18:48:04 +0200
committerOren Kleks <orenkle@amdocs.com>2018-11-08 06:32:41 +0000
commitb6379cce2e96293cdc00fc3633a0295b55d6f40c (patch)
tree34d9eaa255e8accf0704c3b881c95a9885b6c379 /openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main
parent3edb71cfc640b32a7cea3ee0823350ef19dd7694 (diff)
Removed dead and duplicate code in onboarding
Change-Id: I2ca0f1a4b00938838213ba2d615ab72c80d6dda3 Issue-ID: SDC-1903 Signed-off-by: vempo <vitaliy.emporopulo@amdocs.com>
Diffstat (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main')
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImpl.java63
1 files changed, 19 insertions, 44 deletions
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImpl.java
index 1946db8b5d..e9c75319f5 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/CompositionEntityDataManagerImpl.java
@@ -16,6 +16,16 @@
package org.openecomp.sdc.vendorsoftwareproduct.impl;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.openecomp.core.utilities.CommonMethods;
@@ -34,7 +44,15 @@ import org.openecomp.sdc.vendorsoftwareproduct.dao.ImageDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao;
-import org.openecomp.sdc.vendorsoftwareproduct.dao.type.*;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.CompositionEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComputeEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.DeploymentFlavorEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ImageEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NicEntity;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspQuestionnaireEntity;
import org.openecomp.sdc.vendorsoftwareproduct.services.schemagenerator.SchemaGenerator;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.ComponentData;
@@ -52,17 +70,6 @@ import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTempl
import org.openecomp.sdc.vendorsoftwareproduct.types.schemagenerator.SchemaTemplateInput;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-
public class CompositionEntityDataManagerImpl implements CompositionEntityDataManager {
private static final String COMPOSITION_ENTITY_DATA_MANAGER_ERR =
@@ -218,38 +225,6 @@ public class CompositionEntityDataManagerImpl implements CompositionEntityDataMa
return new HashSet<>();
}
- private boolean isThereErrorsInSubTree(CompositionEntityValidationData entity) {
- if (Objects.isNull(entity)) {
- return false;
- }
-
- if (CollectionUtils.isNotEmpty(entity.getErrors())) {
- return true;
- }
-
- Collection<CompositionEntityValidationData> subEntitiesValidationData =
- entity.getSubEntitiesValidationData();
- return !CollectionUtils.isEmpty(subEntitiesValidationData) &&
- checkForErrorsInChildren(subEntitiesValidationData);
-
- }
-
- private boolean checkForErrorsInChildren(
- Collection<CompositionEntityValidationData> subEntitiesValidationData) {
- boolean result = false;
- for (CompositionEntityValidationData subEntity : subEntitiesValidationData) {
- if (CollectionUtils.isNotEmpty(subEntity.getErrors())) {
- return true;
- }
-
- result = isThereErrorsInSubTree(subEntity) || result;
- if (result) {
- return true;
- }
- }
- return false;
- }
-
private void saveComponents(String vspId, Version version, CompositionData compositionData,
Map<String, String> networkIdByName) {
if (CollectionUtils.isNotEmpty(compositionData.getComponents())) {