blob: fb5d013aba9a3c41b34f738a18dec18c58d39e3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package org.openecomp.sdcrests.conflict.rest.mapping;
import org.openecomp.conflicts.types.ItemVersionConflict;
import org.openecomp.sdcrests.conflict.types.ConflictDto;
import org.openecomp.sdcrests.conflict.types.ConflictInfoDto;
import org.openecomp.sdcrests.conflict.types.ItemVersionConflictDto;
import org.openecomp.sdcrests.mapping.MappingBase;
public class MapItemVersionConflictToDto
extends MappingBase<ItemVersionConflict, ItemVersionConflictDto> {
@Override
public void doMapping(ItemVersionConflict source, ItemVersionConflictDto target) {
target
.setConflict(new MapConflictToDto().applyMapping(source.getVersionConflict(), ConflictDto.class));
MapConflictInfoToDto conflictInfoMapper = new MapConflictInfoToDto();
source.getElementConflicts().forEach(conflictInfo -> target
.addConflictInfo(conflictInfoMapper.applyMapping(conflictInfo, ConflictInfoDto.class)));
}
}
|