.. java:import:: java.io BufferedReader .. java:import:: java.io File .. java:import:: java.io FileNotFoundException .. java:import:: java.io FileReader .. java:import:: java.io IOException .. java:import:: java.util ArrayList .. java:import:: java.util HashMap .. java:import:: java.util LinkedList .. java:import:: java.util List .. java:import:: java.util Map .. java:import:: org.caosdb.server CaosDBServer .. java:import:: org.caosdb.server ServerProperties .. java:import:: org.caosdb.server.entity EntityID .. java:import:: org.caosdb.server.entity EntityInterface .. java:import:: org.caosdb.server.entity RetrieveEntity .. java:import:: org.caosdb.server.entity.container TransactionContainer .. java:import:: org.caosdb.server.entity.wrapper EntityWrapper .. java:import:: org.caosdb.server.jobs.core JobFailureSeverity .. java:import:: org.caosdb.server.transaction Transaction .. java:import:: org.caosdb.server.utils ConfigurationException JobConfig ========= .. java:package:: org.caosdb.server.jobs :noindex: .. java:type:: public class JobConfig Configuration of the jobs which have to run during all entity transactions with "job rules". A job rule contains of a quintuple (domain, entity, transaction type, job name, job failure severity). The domain and entity define for which entities the job (of the given name) should be loaded. The transaction type (e.g. Insert, Update, Delete) defines the transaction where this rule applies. The job failure severity sets the related property of a job. The configuration is being read by default from a config file \ :java:ref:`ServerProperties.KEY_JOB_RULES_CONFIG`\ This class works as a singleton, most of the time. It is possible to instanciate it otherwise, though. :author: Timm Fitschen Constructors ------------ JobConfig ^^^^^^^^^ .. java:constructor:: public JobConfig() throws FileNotFoundException, IOException :outertype: JobConfig JobConfig ^^^^^^^^^ .. java:constructor:: public JobConfig(File config) throws FileNotFoundException, IOException :outertype: JobConfig Methods ------- getConfiguredJobs ^^^^^^^^^^^^^^^^^ .. java:method:: public List getConfiguredJobs(EntityID domain, EntityID entity, EntityInterface target, Transaction transaction) :outertype: JobConfig Factory method for the instantiation and configuration of jobs for a specific entity. :param domain: the domain of the rule :param entity: the entity of the rule (this might be a particular datatype or a role, like "RecordType") :param target: the entity for which the job will run. :param transaction: the transaction for which the job will run. :return: Fresh job instances, one for each matching job rule. getInstance ^^^^^^^^^^^ .. java:method:: public static JobConfig getInstance() :outertype: JobConfig getTransactionType ^^^^^^^^^^^^^^^^^^ .. java:method:: String getTransactionType(EntityInterface e) :outertype: JobConfig Return the type of transaction of an entity, e.g. "Retrieve" for a \ :java:ref:`RetrieveEntity`\ .