package ru.yandex.webmaster3.viewer.http.searchurl.urls;

import org.joda.time.Instant;
import org.joda.time.LocalDate;
import ru.yandex.autodoc.common.doc.annotation.Description;
import ru.yandex.webmaster3.core.http.RequestQueryProperty;
import ru.yandex.webmaster3.core.sitestructure.NewSiteStructure;
import ru.yandex.webmaster3.viewer.http.AbstractUserVerifiedHostRequest;
import ru.yandex.webmaster3.viewer.http.SiteTreeNodeAware;
import ru.yandex.webmaster3.viewer.http.searchurl.filter.SearchUrlDateRangeAware;

/**
 * @author avhaliullin
 */
public class SearchUrlHistoryRequest extends AbstractUserVerifiedHostRequest implements SiteTreeNodeAware, SearchUrlDateRangeAware {
    private long nodeId = NewSiteStructure.ROOT_NODE_ID;
    private Instant dateFrom;
    private Instant dateTo;

    @Override
    public void setNodeId(long nodeId) {
        this.nodeId = nodeId;
    }

    @Override
    public Long getNodeId() {
        return nodeId;
    }

    public Instant getDateFrom() {
        return dateFrom;
    }

    @Description("Начало диапазона дат")
    @RequestQueryProperty
    public void setDateFrom(Instant dateFrom) {
        this.dateFrom = dateFrom;
    }

    public Instant getDateTo() {
        return dateTo;
    }

    @Description("Конец диапазона дат")
    @RequestQueryProperty
    public void setDateTo(Instant dateTo) {
        this.dateTo = dateTo;
    }
}
