File outputFolder = new File(record.getOutputFolder() + File.separatorChar + "plugins"
+ File.separatorChar + "0");
outputFolder.mkdirs();
builder.addPlugin(new CrawlOverview(new HostInterfaceImpl(outputFolder, new HashMap<String, String>())));
for (int i = 0, l = config.getPlugins().size(); i < l; i++) {
Plugin pluginConfig = config.getPlugins().get(i);
Plugin plugin = plugins.findByID(pluginConfig.getId());
if (plugin == null) {
LogWebSocketServlet.sendToAll("Could not find plugin: "
+ pluginConfig.getId());
continue;
}
if(!plugin.getCrawljaxVersions().contains(Main.getCrawljaxVersion())) {
LogWebSocketServlet.sendToAll("Plugin "
+ pluginConfig.getId() + " is not compatible with this version of Crawljax (" + Main.getCrawljaxVersion() + ")");
continue;
}
String pluginKey = String.valueOf(i + 1);
outputFolder = new File(record.getOutputFolder() + File.separatorChar + "plugins"
+ File.separatorChar + pluginKey);
outputFolder.mkdirs();
Map<String, String> parameters = new HashMap<>();
for (Parameter parameter : plugin.getParameters()) {
parameters.put(parameter.getId(), "");
for (Parameter configParam : pluginConfig.getParameters()) {
if (configParam.getId().equals(parameter.getId()) && configParam.getValue() != null) {
parameters.put(parameter.getId(), configParam.getValue());
}