diff options
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest')
-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.java | 9 |
1 files changed, 6 insertions, 3 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 812e3d94f0..b9c2ea3bb8 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 @@ -17,6 +17,7 @@ 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; @@ -101,6 +102,8 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { VendorLicenseManagerFactory.getInstance().createInterface(); private ActivityLogManager activityLogManager = ActivityLogManagerFactory.getInstance().createInterface(); + private UniqueValueUtil uniqueValueUtil = new UniqueValueUtil(UniqueValueDaoFactory.getInstance() + .createInterface()); @Override public Response listLicenseModels(String versionStatus, String user) { @@ -135,10 +138,10 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { item.setName(request.getVendorName()); item.setDescription(request.getDescription()); - UniqueValueUtil + uniqueValueUtil .validateUniqueValue(VendorLicenseConstants.UniqueValues.VENDOR_NAME, item.getName()); item = asdcItemManager.create(item); - UniqueValueUtil + uniqueValueUtil .createUniqueValue(VendorLicenseConstants.UniqueValues.VENDOR_NAME, item.getName()); Version version = versioningManager.create(item.getId(), new Version(), null); @@ -214,7 +217,7 @@ public class VendorLicenseModelsImpl implements VendorLicenseModels { if (Objects.isNull(certifiedVersionsCounter) || certifiedVersionsCounter == 0) { asdcItemManager.delete(vlm); permissionsManager.deleteItemPermissions(vlmId); - UniqueValueUtil + uniqueValueUtil .deleteUniqueValue(VendorLicenseConstants.UniqueValues.VENDOR_NAME, vlm.getName()); notifyUsers(vlmId, vlm.getName(), null, "VLM was deleted", user, NotificationEventTypes.DELETE); |