From d378c37fbd1ecec7b43394926f1ca32a695e07de Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 22 Mar 2021 15:33:06 +0000 Subject: Reformat openecomp-be Signed-off-by: Vasyl Razinkov Issue-ID: SDC-3449 Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1 --- .../vsp/rest/mapping/MapVspDetailsToDto.java | 51 ++++++++++------------ 1 file changed, 24 insertions(+), 27 deletions(-) (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/MapVspDetailsToDto.java') 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/MapVspDetailsToDto.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/MapVspDetailsToDto.java index 1ba5d1355c..1605ab7218 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/MapVspDetailsToDto.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/MapVspDetailsToDto.java @@ -17,7 +17,6 @@ * limitations under the License. * ============LICENSE_END========================================================= */ - package org.openecomp.sdcrests.vsp.rest.mapping; import org.apache.commons.lang3.StringUtils; @@ -29,31 +28,29 @@ import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDetailsDto; public class MapVspDetailsToDto extends MappingBase { - @Override - public void doMapping(VspDetails source, VspDetailsDto target) { - target.setId(source.getId()); - target.setVersion(source.getVersion() == null ? null : source.getVersion().getId()); - target.setName(source.getName()); - target.setDescription(source.getDescription()); - target.setIcon(source.getIcon()); - target.setCategory(source.getCategory()); - target.setSubCategory(source.getSubCategory()); - target.setVendorId(source.getVendorId()); - target.setVendorName(source.getVendorName()); - target.setLicensingVersion( - source.getVlmVersion() == null ? null : source.getVlmVersion().getId()); - if (StringUtils.isNotBlank(source.getLicenseType())) { - target.setLicenseType(LicenseType.valueOf(source.getLicenseType())); - } else if (StringUtils.isNotBlank(target.getLicensingVersion())){ - target.setLicenseType(LicenseType.INTERNAL); - } - if (source.getLicenseAgreement() != null || source.getFeatureGroups() != null) { - LicensingData licensingData = new LicensingData(); - licensingData.setLicenseAgreement(source.getLicenseAgreement()); - licensingData.setFeatureGroups(source.getFeatureGroups()); - target.setLicensingData(licensingData); + @Override + public void doMapping(VspDetails source, VspDetailsDto target) { + target.setId(source.getId()); + target.setVersion(source.getVersion() == null ? null : source.getVersion().getId()); + target.setName(source.getName()); + target.setDescription(source.getDescription()); + target.setIcon(source.getIcon()); + target.setCategory(source.getCategory()); + target.setSubCategory(source.getSubCategory()); + target.setVendorId(source.getVendorId()); + target.setVendorName(source.getVendorName()); + target.setLicensingVersion(source.getVlmVersion() == null ? null : source.getVlmVersion().getId()); + if (StringUtils.isNotBlank(source.getLicenseType())) { + target.setLicenseType(LicenseType.valueOf(source.getLicenseType())); + } else if (StringUtils.isNotBlank(target.getLicensingVersion())) { + target.setLicenseType(LicenseType.INTERNAL); + } + if (source.getLicenseAgreement() != null || source.getFeatureGroups() != null) { + LicensingData licensingData = new LicensingData(); + licensingData.setLicenseAgreement(source.getLicenseAgreement()); + licensingData.setFeatureGroups(source.getFeatureGroups()); + target.setLicensingData(licensingData); + } + target.setOnboardingMethod(source.getOnboardingMethod()); } - - target.setOnboardingMethod(source.getOnboardingMethod()); - } } -- cgit 1.2.3-korg