Package io.jmix.quartz.service
Class QuartzService
java.lang.Object
io.jmix.quartz.service.QuartzService
Serves as proxy from Jmix to the Quartz engine for fetch information about jobs and triggers and update them
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkJobExists
(String jobName, String jobGroup) Delegates to the Quartz engine determination if the given job existsboolean
checkTriggerExists
(String triggerName, String triggerGroup) Delegates to the Quartz engine determination if the given trigger existsvoid
Delegates to the Quartz engine deleting given jobvoid
executeNow
(String jobName, String jobGroup) Delegates to the Quartz engine triggering given job (executing now)Returns information about all configured quartz jobs with related triggersReturns names of all known JobDetail groupsReturns names of all known Trigger groupsvoid
Delegates to the Quartz engine pausing given job.void
Delegates to the Quartz engine resuming given job.void
updateQuartzJob
(JobModel jobModel, List<JobDataParameterModel> jobDataParameterModels, List<TriggerModel> triggerModels, boolean replaceJobIfExists) Updates job in the Quartz engine
-
Constructor Details
-
QuartzService
public QuartzService()
-
-
Method Details
-
getAllJobs
Returns information about all configured quartz jobs with related triggers -
getJobGroupNames
Returns names of all known JobDetail groups -
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 editjobDataParameterModels
- parameters for jobtriggerModels
- triggers for jobreplaceJobIfExists
- replace if job with the same name already exists
-
resumeJob
Delegates to the Quartz engine resuming given job. This operation makes sense only for job with paused triggers.- Parameters:
jobName
- name of the jobjobGroup
- group of the job
-
pauseJob
Delegates to the Quartz engine pausing given job. This operation makes sense only for jobs with active triggers.- Parameters:
jobName
- name of the jobjobGroup
- group of the job
-
executeNow
Delegates to the Quartz engine triggering given job (executing now)- Parameters:
jobName
- name of the jobjobGroup
- group of the job
-
deleteJob
Delegates to the Quartz engine deleting given job- Parameters:
jobName
- name of the jobjobGroup
- group of the job
-
checkJobExists
Delegates to the Quartz engine determination if the given job exists- Parameters:
jobName
- name of the jobjobGroup
- group of the job- Returns:
- true if job with provided name and group exists, false otherwise
-
checkTriggerExists
Delegates to the Quartz engine determination if the given trigger exists- Parameters:
triggerName
- name of the triggertriggerGroup
- group of the trigger- Returns:
- true if trigger with provided name and group exists, false otherwise
-