From 5c9769c3e3a6d6675c5ec1bd450720791ef2793c Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Mon, 20 Aug 2018 01:27:45 +0300 Subject: fix merge issue restore activity log add clean up to the onboarding back end docker Issue-ID: SDC-1664 Change-Id: Ib7994ca12439bc842650c3cacddb0e4d87215390 Signed-off-by: Michael Lando --- .../vendorlicense/rest/services/VendorLicenseModelsImpl.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java index 815f06a18f..df6363c883 100644 --- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java @@ -19,6 +19,10 @@ package org.openecomp.sdcrests.vendorlicense.rest.services; import org.openecomp.core.dao.UniqueValueDaoFactory; import org.openecomp.core.util.UniqueValueUtil; +import org.openecomp.sdc.activitylog.ActivityLogManager; +import org.openecomp.sdc.activitylog.ActivityLogManagerFactory; +import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity; +import org.openecomp.sdc.activitylog.dao.type.ActivityType; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCode; import org.openecomp.sdc.common.errors.Messages; @@ -89,6 +93,7 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { private AsdcItemManager asdcItemManager = AsdcItemManagerFactory.getInstance().createInterface(); private VersioningManager versioningManager = VersioningManagerFactory.getInstance().createInterface(); private VendorLicenseManager vendorLicenseManager = VendorLicenseManagerFactory.getInstance().createInterface(); + private ActivityLogManager activityLogManager = ActivityLogManagerFactory.getInstance().createInterface(); private UniqueValueUtil uniqueValueUtil = new UniqueValueUtil(UniqueValueDaoFactory.getInstance().createInterface()); @@ -133,6 +138,9 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { itemCreationDto.setItemId(item.getId()); itemCreationDto.setVersion(new MapVersionToDto().applyMapping(version, VersionDto.class)); + activityLogManager + .logActivity(new ActivityLogEntity(vlm.getId(), version, ActivityType.Create, user, true, "", "")); + return Response.ok(itemCreationDto).build(); } @@ -218,6 +226,8 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { vendorLicenseManager.validate(vlmId, version); versioningManager.submit(vlmId, version, message); + activityLogManager + .logActivity(new ActivityLogEntity(vlmId, version, ActivityType.Submit, user, true, "", message)); } private void submitHealedVersion(String vlmId, Version healedVersion, String baseVersionId, String user) { -- cgit 1.2.3-korg