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/MapVspDescriptionDtoToItem.java
blob: 3a7800f1c351db08b678bb3be3a9c56d62f49b78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package org.openecomp.sdcrests.vsp.rest.mapping;

import org.openecomp.sdc.versioning.types.Item;
import org.openecomp.sdcrests.mapping.MappingBase;
import org.openecomp.sdcrests.vendorsoftwareproducts.types.VspDescriptionDto;
import org.openecomp.sdcrests.vsp.rest.services.VspItemProperty;

public class MapVspDescriptionDtoToItem extends MappingBase<VspDescriptionDto, Item> {
  @Override
  public void doMapping(VspDescriptionDto source, Item target) {
    target.setName(source.getName());
    target.setDescription(source.getDescription());
    target.addProperty(VspItemProperty.VENDOR_ID, source.getVendorId());
    target.addProperty(VspItemProperty.VENDOR_NAME, source.getVendorName());
  }
}