All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jaeksoft.searchlib.webservice.scheduler.SchedulerDefinition Maven / Gradle / Ivy

Go to download

OpenSearchServer is a powerful, enterprise-class, search engine program. Using the web user interface, the crawlers (web, file, database, ...) and the REST/RESTFul API you will be able to integrate quickly and easily advanced full-text search capabilities in your application. OpenSearchServer runs on Windows and Linux/Unix/BSD.

The newest version!
package com.jaeksoft.searchlib.webservice.scheduler;

import com.jaeksoft.searchlib.config.Config;
import com.jaeksoft.searchlib.scheduler.*;

import java.util.*;

/**
 * Created by aureliengiudici on 22/04/2016.
 */
public class SchedulerDefinition {
	public String name;
	public String type;
	public TaskCronExpression cron;
	public String mailRecipients;
	public boolean active;
	public boolean emailNotification;
	public LinkedHashMap> tasks;
	private Config config;
	private List tasksList = new ArrayList<>();


	SchedulerDefinition() {
	}

	public void initialize() {
		TaskItem taskItem;
		TaskAbstract taskAbstract;

		for (Map.Entry> item : tasks.entrySet()) {
			taskAbstract = config.getJobTaskEnum().findClass(item.getKey());
			taskItem = new TaskItem(this.config, taskAbstract);
			for (Map.Entry prop : item.getValue().entrySet()) {
				taskItem.getProperties().setValue(taskAbstract.findPropertyByConfigName(prop.getKey()),
						prop.getValue());
			}
			if (taskItem != null)
				this.tasksList.add(new TaskItem(taskItem));
		}
	}

	public void setConfig(Config conf) { this.config = conf; }

	public Config getConfig() { return this.config; }

	public List getTasksList() { return this.tasksList; }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy