diff options
author | sheetalm <sheetal.mudholkar@amdocs.com> | 2018-02-19 11:05:17 +0530 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-02-19 16:13:04 +0000 |
commit | 38b4e81eab76202bcafdec7e0b6374679090ce7e (patch) | |
tree | db6afd3705c212e043cd106e4e44e4934f92d0ea /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services | |
parent | d299e8af2e9dfa79e53f7cf9e79977bab3474919 (diff) |
Onboarding foundation changes - UniqueValueUtil
Refactored UniqueValueUtil
Change-Id: I7523ad501de9a49c5fbbb59f33c07a40c55eda2f
Issue-ID: SDC-1047
Signed-off-by: sheetalm <sheetal.mudholkar@amdocs.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.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); |