summaryrefslogtreecommitdiffstats
path: root/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java
index 634bd90d20..3ab2667821 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/mapping/MapVspDescriptionDtoToVspDetails.java
@@ -20,6 +20,7 @@
package org.openecomp.sdcrests.vsp.rest.mapping;
+import org.openecomp.sdc.vendorsoftwareproduct.dao.type.LicenseType;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails;
import org.openecomp.sdc.vendorsoftwareproduct.types.LicensingData;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -38,12 +39,15 @@ public class MapVspDescriptionDtoToVspDetails extends MappingBase<VspDescription
target.setVendorName(source.getVendorName());
target.setVendorId(source.getVendorId());
- if (source.getLicensingVersion() != null) {
+ if (source.getLicensingVersion() != null && source.getLicenseType() != LicenseType.EXTERNAL) {
target.setVlmVersion(new Version(source.getLicensingVersion()));
}
+ if (source.getLicenseType() != null) {
+ target.setLicenseType(source.getLicenseType().name());
+ }
LicensingData licensingData = source.getLicensingData();
- if (licensingData != null) {
+ if (licensingData != null && source.getLicenseType() != LicenseType.EXTERNAL) {
target.setLicenseAgreement(licensingData.getLicenseAgreement());
target.setFeatureGroups(licensingData.getFeatureGroups());
}