Class QuartzTriggerBuilder

  • All Implemented Interfaces:
    JobTriggerVisitor

    public final class QuartzTriggerBuilder
    extends Object
    implements JobTriggerVisitor
    A builder of a Quartz Trigger for a given job and from a JobTrigger instance representing a triggering rules in Silverpeas. In Quartz, a trigger is always related to a given job and a job can have one or more triggers. In Silverpeas, a trigger isn't related to a specific job and it represents only a job triggering rule that can be used to schedule one or more job; hence a job in Silverpeas is always related to one and only one trigger. The builder converts the JobTrigger representation in Silverpeas into a Trigger representation in Quartz for the job the trigger will be used to schedule it.
    • Method Detail

      • forJob

        public static QuartzTriggerBuilder forJob​(String jobName)
        Constructs a new Quartz Trigger builder for the specified job name to which it will be related in the Quartz scheduler.
        Parameters:
        jobName - the name of a job to schedule.
        Returns:
        a QuartzTriggerBuilder instance.
      • buildFrom

        public org.quartz.Trigger buildFrom​(JobTrigger jobTrigger)
        Builds from the JobTrigger instance a Trigger object to be used to schedule the underlying job with a Quartz scheduler.
        Parameters:
        jobTrigger - the JobTrigger to convert.
        Returns:
        a Trigger object.