aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services
diff options
context:
space:
mode:
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) {