package de.jeha.kame.crawler.service.config;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import de.jeha.kame.crawler.service.ds.DocumentStore;
import io.dropwizard.Configuration;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author jenshadlich@googlemail.com
 */
public class CrawlerServiceConfiguration extends Configuration {

    @Valid
    @NotNull
    private MongoDbFactory mongoDb = new MongoDbFactory();

    @Valid
    @NotNull
    private CrawlerFactory crawler = new CrawlerFactory();

    @NotNull
    @Valid
    private DocumentStoreFactory documentStore;

    @JsonCreator
    public CrawlerServiceConfiguration(@JsonProperty("mongoDb") MongoDbFactory mongoDb,
                                       @JsonProperty("crawler") CrawlerFactory crawler,
                                       @JsonProperty("documentStore")DocumentStoreFactory documentStoreFactory) {
        this.mongoDb = mongoDb;
        this.crawler = crawler;
        this.documentStore = documentStoreFactory;
    }

    @JsonProperty("mongoDb")
    public MongoDbFactory getMongoDb() {
        return mongoDb;
    }

    @JsonProperty("crawler")
    public CrawlerFactory getCrawler() {
        return crawler;
    }

    @JsonProperty("documentStore")
    public DocumentStoreFactory getDocumentStore() {
        return documentStore;
    }

}

@@ -150,62 +150,8 @@
 ty;%0A
-import de.jeha.kame.crawler.service.ds.DocumentStore;%0A
 impo
@@ -262,31 +262,8 @@
 ull;
-%0Aimport java.util.List;
 %0A%0A/*
@@ -875,16 +875,17 @@
 tStore%22)
+ 
 Document

remove unused imports