93ee1590f0a673022f6a745e0966fd6ecdc56d61
[sdc.git] /
1 package org.openecomp.sdcrests.vsp.rest.mapping;
2
3 import org.openecomp.sdc.versioning.types.Item;
4 import org.openecomp.sdcrests.mapping.MappingBase;
5 import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDetailsDto;
6 import org.openecomp.sdcrests.vsp.rest.services.VspItemProperty;
7
8 public class MapItemToVspDetailsDto extends MappingBase<Item, VspDetailsDto> {
9   @Override
10   public void doMapping(Item source, VspDetailsDto target) {
11     target.setId(source.getId());
12     target.setName(source.getName());
13     target.setDescription(source.getDescription());
14     target.setVendorId((String) source.getProperties().get(VspItemProperty.VENDOR_ID));
15     target.setVendorName((String) source.getProperties().get(VspItemProperty.VENDOR_NAME));
16     target.setOnboardingMethod((String) source.getProperties().get(VspItemProperty.ONBOARDING_METHOD));
17     target.setOwner(source.getOwner());
18     target.setStatus(source.getStatus().name());
19   }
20 }