Class QuartzService

java.lang.Object
io.jmix.quartz.service.QuartzService

@Service("quartz_QuartzService") public class QuartzService extends Object
Serves as proxy from Jmix to the Quartz engine for fetch information about jobs and triggers and update them
  • Constructor Details

    • QuartzService

      public QuartzService()
  • Method Details

    • getAllJobs

      public List<JobModel> getAllJobs()
      Returns information about all configured quartz jobs with related triggers
    • getJobGroupNames

      public List<String> getJobGroupNames()
      Returns names of all known JobDetail groups
    • getTriggerGroupNames

      public List<String> getTriggerGroupNames()
      Returns names of all known Trigger groups
    • updateQuartzJob

      public void updateQuartzJob(JobModel jobModel, List<JobDataParameterModel> jobDataParameterModels, List<TriggerModel> triggerModels, boolean replaceJobIfExists)
      Updates job in the Quartz engine
      Parameters:
      jobModel - job to edit
      jobDataParameterModels - parameters for job
      triggerModels - triggers for job
      replaceJobIfExists - replace if job with the same name already exists
    • resumeJob

      public void resumeJob(String jobName, String jobGroup)
      Delegates to the Quartz engine resuming given job. This operation makes sense only for job with paused triggers.
      Parameters:
      jobName - name of the job
      jobGroup - group of the job
    • pauseJob

      public void pauseJob(String jobName, String jobGroup)
      Delegates to the Quartz engine pausing given job. This operation makes sense only for jobs with active triggers.
      Parameters:
      jobName - name of the job
      jobGroup - group of the job
    • executeNow

      public void executeNow(String jobName, String jobGroup)
      Delegates to the Quartz engine triggering given job (executing now)
      Parameters:
      jobName - name of the job
      jobGroup - group of the job
    • deleteJob

      public void deleteJob(String jobName, String jobGroup)
      Delegates to the Quartz engine deleting given job
      Parameters:
      jobName - name of the job
      jobGroup - group of the job
    • checkJobExists

      public boolean checkJobExists(String jobName, String jobGroup)
      Delegates to the Quartz engine determination if the given job exists
      Parameters:
      jobName - name of the job
      jobGroup - group of the job
      Returns:
      true if job with provided name and group exists, false otherwise
    • checkTriggerExists

      public boolean checkTriggerExists(String triggerName, String triggerGroup)
      Delegates to the Quartz engine determination if the given trigger exists
      Parameters:
      triggerName - name of the trigger
      triggerGroup - group of the trigger
      Returns:
      true if trigger with provided name and group exists, false otherwise