JobConfig

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 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

public JobConfig()

JobConfig

public JobConfig(File config)

Methods

getConfiguredJobs

public List<Job> getConfiguredJobs(EntityID domain, EntityID entity, EntityInterface target, Transaction<? extends TransactionContainer> transaction)

Factory method for the instantiation and configuration of jobs for a specific entity.

Parameters:
  • domain – the domain of the rule

  • entity – the entity of the rule (this might be a particular datatype or a role, like “RecordType”)

  • target – the entity for which the job will run.

  • transaction – the transaction for which the job will run.

Returns:

Fresh job instances, one for each matching job rule.

getInstance

public static JobConfig getInstance()

getTransactionType

String getTransactionType(EntityInterface e)

Return the type of transaction of an entity, e.g. “Retrieve” for a RetrieveEntity.