package ru.yandex.webmaster.periodic.seolinks;

import org.springframework.beans.factory.annotation.Required;
import ru.yandex.common.scheduler.ExecutionContext;
import ru.yandex.webmaster.common.antispam.sanctions.AntispamSanctionsService;
import ru.yandex.wmtools.common.error.InternalException;
import ru.yandex.wmtools.common.util.scheduler.timetable.AbstractTaskExecutor;

/**
 * User: azakharov
 * Date: 05.06.14
 * Time: 13:19
 */
public class ImportAntispamSanctionsTask extends AbstractTaskExecutor {

    private AntispamSanctionsService antispamSanctionsService;

    @Override
    public String runWithRELogging(ExecutionContext context) throws InternalException {
        return antispamSanctionsService.importAntispamSanctions();
    }

    @Required
    public void setAntispamSanctionsService(AntispamSanctionsService antispamSanctionsService) {
        this.antispamSanctionsService = antispamSanctionsService;
    }
}
