diff options
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')
1 files changed, 7 insertions, 6 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 77093fe682..ec0843263a 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 @@ -23,11 +23,10 @@ package org.openecomp.sdcrests.vsp.rest.mapping; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.VspDetails; import org.openecomp.sdc.vendorsoftwareproduct.types.LicensingData; import org.openecomp.sdc.versioning.dao.types.Version; +import org.openecomp.sdcrests.common.types.VersionDto; import org.openecomp.sdcrests.mapping.MappingBase; import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto; -import java.util.regex.Pattern; - public class MapVspDescriptionDtoToVspDetails extends MappingBase<VspDescriptionDto, VspDetails> { @Override @@ -40,11 +39,13 @@ public class MapVspDescriptionDtoToVspDetails extends MappingBase<VspDescription target.setVendorName(source.getVendorName()); target.setVendorId(source.getVendorId()); - String vlmVersion = source.getLicensingVersion(); + VersionDto vlmVersion = source.getLicensingVersion(); if (vlmVersion != null) { - target.setVlmVersion( - Pattern.compile(Version.VERSION_REGEX).matcher(vlmVersion).find() ? Version - .valueOf(vlmVersion) : null); + Version version = Version.valueOf(vlmVersion.getId()); + target.setVlmVersion(version); +// target.setVlmVersion( +// Pattern.compile(Version.VERSION_REGEX).matcher(vlmVersion.getId()).find() ? Version +// .valueOf(vlmVersion.getId()) : null); } LicensingData licensingData = source.getLicensingData(); |