diff options
author | talig <talig@amdocs.com> | 2017-12-20 14:30:43 +0200 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2017-12-21 11:12:33 +0000 |
commit | 8e9c0653dd6c6862123c9609ae34e1206d86456e (patch) | |
tree | 5eeef00ec0677133baa439ca8d7ffd7aca4804b6 /openecomp-be/api/openecomp-sdc-rest-webapp/vendor-license-rest/vendor-license-rest-services/src/main/java/org/openecomp/sdcrests/vendorlicense/rest/services/FeatureGroupsImpl.java | |
parent | 785ebcc95de3e064e843bec04ba7a209d854fc7c (diff) |
Add collaboration feature
Issue-ID: SDC-767
Change-Id: I14fb4c1f54086ed03a56a7ff7fab9ecd40381795
Signed-off-by: talig <talig@amdocs.com>
Diffstat (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/FeatureGroupsImpl.java')
-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/FeatureGroupsImpl.java | 16 |
1 files changed, 9 insertions, 7 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/FeatureGroupsImpl.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/FeatureGroupsImpl.java index 593ed1939f..9f87f98bb5 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/FeatureGroupsImpl.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/FeatureGroupsImpl.java @@ -44,7 +44,6 @@ import org.openecomp.sdcrests.vendorlicense.types.FeatureGroupUpdateRequestDto; import org.openecomp.sdcrests.vendorlicense.types.LicenseKeyGroupEntityDto; 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; @@ -69,7 +68,7 @@ public class FeatureGroupsImpl implements FeatureGroups { MdcUtil.initMdc(LoggerServiceName.List_FG.toString()); Collection<FeatureGroupEntity> featureGroupEntities = - vendorLicenseManager.listFeatureGroups(vlmId, Version.valueOf(versionId), user); + vendorLicenseManager.listFeatureGroups(vlmId, new Version(versionId)); MapFeatureGroupEntityToFeatureGroupDescriptorDto outputMapper = new MapFeatureGroupEntityToFeatureGroupDescriptorDto(); @@ -101,11 +100,12 @@ public class FeatureGroupsImpl implements FeatureGroups { FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity() .applyMapping(request, FeatureGroupEntity.class); featureGroupEntity.setVendorLicenseModelId(vlmId); + featureGroupEntity.setVersion(new Version(versionId)); featureGroupEntity.setLicenseKeyGroupIds(request.getAddedLicenseKeyGroupsIds()); featureGroupEntity.setEntitlementPoolIds(request.getAddedEntitlementPoolsIds()); FeatureGroupEntity createdFeatureGroup = - vendorLicenseManager.createFeatureGroup(featureGroupEntity, user); + vendorLicenseManager.createFeatureGroup(featureGroupEntity); StringWrapperResponse result = createdFeatureGroup != null ? new StringWrapperResponse(createdFeatureGroup.getId()) : null; @@ -125,12 +125,13 @@ public class FeatureGroupsImpl implements FeatureGroups { FeatureGroupEntity featureGroupEntity = new MapFeatureGroupDescriptorDtoToFeatureGroupEntity() .applyMapping(request, FeatureGroupEntity.class); featureGroupEntity.setVendorLicenseModelId(vlmId); + featureGroupEntity.setVersion(new Version(versionId)); featureGroupEntity.setId(featureGroupId); vendorLicenseManager .updateFeatureGroup(featureGroupEntity, request.getAddedLicenseKeyGroupsIds(), request.getRemovedLicenseKeyGroupsIds(), request.getAddedEntitlementPoolsIds(), - request.getRemovedEntitlementPoolsIds(), user); + request.getRemovedEntitlementPoolsIds()); mdcDataDebugMessage.debugExitMessage("VLM id, FG id", vlmId, featureGroupId); @@ -146,9 +147,9 @@ public class FeatureGroupsImpl implements FeatureGroups { MdcUtil.initMdc(LoggerServiceName.Get_FG.toString()); FeatureGroupEntity fgInput = new FeatureGroupEntity(); fgInput.setVendorLicenseModelId(vlmId); - fgInput.setVersion(Version.valueOf(versionId)); + fgInput.setVersion(new Version(versionId)); fgInput.setId(featureGroupId); - FeatureGroupModel featureGroupModel = vendorLicenseManager.getFeatureGroupModel(fgInput, user); + FeatureGroupModel featureGroupModel = vendorLicenseManager.getFeatureGroupModel(fgInput); if (featureGroupModel == null) { return Response.ok().build(); @@ -197,8 +198,9 @@ public class FeatureGroupsImpl implements FeatureGroups { MdcUtil.initMdc(LoggerServiceName.Delete_FG.toString()); FeatureGroupEntity fgInput = new FeatureGroupEntity(); fgInput.setVendorLicenseModelId(vlmId); + fgInput.setVersion(new Version(versionId)); fgInput.setId(featureGroupId); - vendorLicenseManager.deleteFeatureGroup(fgInput, user); + vendorLicenseManager.deleteFeatureGroup(fgInput); mdcDataDebugMessage.debugExitMessage("VLM id, FG id", vlmId, featureGroupId); |