class InterviewInviteServiceImpl extends InviteService<InterviewInvite> implements InterviewInviteService {

    @Override
    public ServiceResult<AssessorInvitesToSendResource> getAllInvitesToResend(long competitionId, List<Long> inviteIds) {
        return getCompetition(competitionId).andOnSuccess(competition -> {

            List<InterviewInvite> invites = interviewInviteRepository.getByIdIn(inviteIds);
            List<String> recipients = simpleMap(invites, InterviewInvite::getName);
            recipients.sort(String::compareTo);

            return serviceSuccess(new AssessorInvitesToSendResource(
                    recipients,
                    competition.getId(),
                    competition.getName(),
                    getInvitePreviewContent(competition)
            ));
        });
    }

}