You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
645 B

package internal.hw.crawler.commands;
import internal.hw.crawler.repositories.ArticleRepository;
import java.util.List;
public class CrawlCommand implements Command {
private ArticleRepository repository;
public CrawlCommand(ArticleRepository repository) {
this.repository = repository;
}
@Override
public String getName() {
return "crawl";
}
@Override
public List<CommandArg> getArgs() {
return List.of(new CommandArg("url", "The website to crawl", true));
}
@Override
public void execute(String[] args) {
System.out.printf("Will crawl %s%n", args[1]);
}
}