From 8e9c0653dd6c6862123c9609ae34e1206d86456e Mon Sep 17 00:00:00 2001 From: talig Date: Wed, 20 Dec 2017 14:30:43 +0200 Subject: Add collaboration feature Issue-ID: SDC-767 Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795 Signed-off-by: talig --- .../rest/services/LicenseKeyGroupsImpl.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/LicenseKeyGroupsImpl.java') 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/LicenseKeyGroupsImpl.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/LicenseKeyGroupsImpl.java index 4c4bf134fd..6fe33d77ae 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/LicenseKeyGroupsImpl.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/LicenseKeyGroupsImpl.java @@ -34,7 +34,6 @@ import org.openecomp.sdcrests.vendorlicense.types.LicenseKeyGroupEntityDto; import org.openecomp.sdcrests.vendorlicense.types.LicenseKeyGroupRequestDto; import org.openecomp.sdcrests.wrappers.GenericCollectionWrapper; import org.openecomp.sdcrests.wrappers.StringWrapperResponse; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; @@ -67,7 +66,7 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { MdcUtil.initMdc(LoggerServiceName.List_LKG.toString()); Collection licenseKeyGroups = - vendorLicenseManager.listLicenseKeyGroups(vlmId, Version.valueOf(versionId), user); + vendorLicenseManager.listLicenseKeyGroups(vlmId, new Version(versionId)); GenericCollectionWrapper result = new GenericCollectionWrapper<>(); MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto outputMapper = @@ -99,9 +98,10 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity() .applyMapping(request, LicenseKeyGroupEntity.class); licenseKeyGroupEntity.setVendorLicenseModelId(vlmId); + licenseKeyGroupEntity.setVersion(new Version(versionId)); LicenseKeyGroupEntity createdLicenseKeyGroup = - vendorLicenseManager.createLicenseKeyGroup(licenseKeyGroupEntity, user); + vendorLicenseManager.createLicenseKeyGroup(licenseKeyGroupEntity); StringWrapperResponse result = createdLicenseKeyGroup != null ? new StringWrapperResponse(createdLicenseKeyGroup.getId()) : null; @@ -131,9 +131,10 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { new MapLicenseKeyGroupRequestDtoToLicenseKeyGroupEntity() .applyMapping(request, LicenseKeyGroupEntity.class); licenseKeyGroupEntity.setVendorLicenseModelId(vlmId); + licenseKeyGroupEntity.setVersion(new Version(versionId)); licenseKeyGroupEntity.setId(licenseKeyGroupId); - vendorLicenseManager.updateLicenseKeyGroup(licenseKeyGroupEntity, user); + vendorLicenseManager.updateLicenseKeyGroup(licenseKeyGroupEntity); mdcDataDebugMessage.debugExitMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); @@ -157,9 +158,9 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { MdcUtil.initMdc(LoggerServiceName.Get_LKG.toString()); LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity(); lkgInput.setVendorLicenseModelId(vlmId); - lkgInput.setVersion(Version.valueOf(versionId)); + lkgInput.setVersion(new Version(versionId)); lkgInput.setId(licenseKeyGroupId); - LicenseKeyGroupEntity licenseKeyGroup = vendorLicenseManager.getLicenseKeyGroup(lkgInput, user); + LicenseKeyGroupEntity licenseKeyGroup = vendorLicenseManager.getLicenseKeyGroup(lkgInput); LicenseKeyGroupEntityDto licenseKeyGroupEntityDto = licenseKeyGroup == null ? null : new MapLicenseKeyGroupEntityToLicenseKeyGroupEntityDto() @@ -186,8 +187,9 @@ public class LicenseKeyGroupsImpl implements LicenseKeyGroups { MdcUtil.initMdc(LoggerServiceName.Delete_LKG.toString()); LicenseKeyGroupEntity lkgInput = new LicenseKeyGroupEntity(); lkgInput.setVendorLicenseModelId(vlmId); + lkgInput.setVersion(new Version(versionId)); lkgInput.setId(licenseKeyGroupId); - vendorLicenseManager.deleteLicenseKeyGroup(lkgInput, user); + vendorLicenseManager.deleteLicenseKeyGroup(lkgInput); mdcDataDebugMessage.debugExitMessage("VLM id, LKG id", vlmId, licenseKeyGroupId); -- cgit 1.2.3-korg