package eu.dnetlib.client.adminpanel;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import eu.dnetlib.shared.HarvestHistoryInfo;
import eu.dnetlib.shared.HarvestScheduleInfo;

import java.util.Date;
import java.util.List;

/**
 * Created by stefania on 6/17/14.
 */

@RemoteServiceRelativePath("harvestInfo")
public interface HarvestInfoService extends RemoteService {

    public void harvest(List<String> types, Date dateFrom, Date dateTo, String dataProviderId) throws Exception;

    public String scheduleHarvest(List<String> types, Date initialDate, String dataProviderId, String cronExpression) throws Exception;

    public void updateHarvestSchedule(String scheduleId, List<String> types, String dataProviderId, String cronExpression) throws Exception;

    public void pauseHarvestSchedules(List<String> scheduleIds) throws Exception;

    public void resumeHarvestSchedules(List<String> scheduleIds) throws Exception;

    public void cancelHarvestSchedules(List<String> scheduleIds) throws Exception;

    public List<HarvestScheduleInfo> getHarvestSchedules(String dataProviderId) throws Exception;

    public List<HarvestHistoryInfo> getHarvestHistory(String dataProviderId) throws Exception;

    public void deleteHarvestHistory(List<String> harvestIds) throws Exception;
}
