package org.synyx.urlaubsverwaltung.settings;

import org.synyx.urlaubsverwaltung.application.vacationtype.VacationType;

import java.util.List;

import static java.util.stream.Collectors.toList;

public class AbsenceTypeSettingsDtoMapper {

    public static AbsenceTypeSettingsDto mapToAbsenceTypeItemSettingDto(List<VacationType> allVacationTypes) {

        final List<AbsenceTypeSettingsItemDto> absenceTypeDtos = allVacationTypes
            .stream()
            .map(AbsenceTypeSettingsDtoMapper::vacationTypeToDto)
            .collect(toList());

        final AbsenceTypeSettingsDto absenceTypeSettingsDto = new AbsenceTypeSettingsDto();
        absenceTypeSettingsDto.setItems(absenceTypeDtos);

        return absenceTypeSettingsDto;
    }

    private static AbsenceTypeSettingsItemDto vacationTypeToDto(VacationType vacationType) {
        return AbsenceTypeSettingsItemDto.builder()
            .setId(vacationType.getId())
            .setMessageKey(vacationType.getMessageKey())
            .setCategory(vacationType.getCategory())
            .setActive(vacationType.isActive())
            .setRequiresApproval(vacationType.isRequiresApproval())
            .setColor(vacationType.getColor())
            .build();
    }
}

@@ -231,24 +231,76 @@
 toMapper %7B%0A%0A
+    private AbsenceTypeSettingsDtoMapper() %7B%0A    %7D%0A%0A
     public s

add private constructor to static class