aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2018-08-20 01:27:45 +0300
committerVitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com>2018-09-05 08:37:54 +0000
commit5c9769c3e3a6d6675c5ec1bd450720791ef2793c (patch)
tree91ca1c456ed703dacfd46ded2ac5918711c8ce1a /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services
parent828ee221b1d186e637bffffaeea1684e752ceb36 (diff)
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 <ml636r@att.com>
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/VendorLicenseModelsImpl.java10
1 files changed, 10 insertions, 0 deletions
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) {