NotificationScheduleApiServiceImpl.java
/*
* Copyright 2026 Global Crop Diversity Trust
* Licensed under the Apache License, Version 2.0
* See LICENSE file in project root folder or http://www.apache.org/licenses/LICENSE-2.0
*/
package org.gringlobal.api.v2.facade.impl;
import java.util.List;
import org.gringlobal.api.model.NotificationScheduleDTO;
import org.gringlobal.api.v2.facade.NotificationScheduleApiService;
import org.gringlobal.model.notification.NotificationSchedule;
import org.gringlobal.service.NotificationScheduleService;
import org.gringlobal.service.filter.NotificationScheduleFilter;
import org.springframework.stereotype.Service;
@Service
public class NotificationScheduleApiServiceImpl extends APIFilteredServiceFacadeImpl<NotificationScheduleService, NotificationScheduleDTO, NotificationSchedule, NotificationScheduleFilter>
implements NotificationScheduleApiService {
@Override
protected NotificationSchedule convert(NotificationScheduleDTO source) {
return mapper.map(source);
}
@Override
protected NotificationScheduleDTO convert(NotificationSchedule source) {
return mapper.map(source);
}
@Override
public List<NotificationScheduleDTO> listNotificationGenerators() {
return mapper.map(service.listNotificationGenerators(), mapper::map);
}
@Override
public NotificationScheduleDTO subscribe(NotificationScheduleDTO notification, List<String> aclSids) {
return mapper.map(service.subscribe(mapper.map(notification), aclSids));
}
@Override
public NotificationScheduleDTO unsubscribe(NotificationScheduleDTO notification, List<String> aclSids) {
return mapper.map(service.unsubscribe(mapper.map(notification), aclSids));
}
}