From f4398a841ce8c4c185ab75abdf5e5a1c2d8ff784 Mon Sep 17 00:00:00 2001 From: talig Date: Mon, 23 Oct 2017 09:23:14 +0300 Subject: Fix onboarding undo checkout impl Fix reset in zusammen collaboration plugin, Throw explicit exception in case of zusammen db illegal state. Change-Id: Ic9463517b72c7a89a2de78b86da5679ac57371a6 Issue-ID: SDC-490 Signed-off-by: talig --- .../impl/VendorSoftwareProductManagerImpl.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'openecomp-be/backend/openecomp-sdc-vendor-software-product-manager') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java index 1891cddfd5..be1aaf08e5 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/impl/VendorSoftwareProductManagerImpl.java @@ -256,6 +256,12 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa Version version = getVersionInfo(vendorSoftwareProductId, VersionableEntityAction.Read, user) .getActiveVersion(); + + ActivityLogEntity activityLogEntity = + new ActivityLogEntity(vendorSoftwareProductId, String.valueOf(version.getMajor() + 1), + ActivityType.UNDO_CHECKOUT.toString(), user, true, "", ""); + activityLogManager.addActionLog(activityLogEntity, user); + String preVspName = vspInfoDao .get(new VspDetails(vendorSoftwareProductId, version)).getName(); @@ -407,8 +413,8 @@ public class VendorSoftwareProductManagerImpl implements VendorSoftwareProductMa getFeatureGroupMandatoryErrorBuilder(deploymentlocalFlavor.getModel()); errorCodeList.add(deploymentFlavorErrorBuilder); } - List componetComputeAssociations = new ArrayList<>(); - componetComputeAssociations = deploymentlocalFlavor.getComponentComputeAssociations(); + List componetComputeAssociations = + deploymentlocalFlavor.getComponentComputeAssociations(); if (CollectionUtils.isEmpty(componetComputeAssociations)) { CompositionEntityValidationData compositionEntityValidationData = new CompositionEntityValidationData(CompositionEntityType.deployment, deploymentFlavor -- cgit 1.2.3-korg