Interface TriggerService

All Known Implementing Classes:
DefaultTriggerService

public interface TriggerService
Service for trigger handling covering business methods for data manipulation and search methods.
Since:
4.3
Spring Bean ID:
triggerService
  • Method Details

    • activate

      void activate(TriggerModel trigger)
      Executes the assigned JobModel using the assigned CronJobModel if the next activation time ((@link TriggerModel#getActivationTime()} is less or equal than the current system time.
      Parameters:
      trigger - the trigger instance
    • getNextTime

      Calendar getNextTime(TriggerModel trigger, Calendar relativeTo)
      Returns the next activation time for the TriggerModel in relation to the specified calendar.

      Use this method e.g. for different first day of week modes.

      Parameters:
      trigger - the trigger instance
      relativeTo - the calendar which the next activation time should be calculated relatively for
      Returns:
      the next activation time(Calendar) for the TriggerModel in relation to the specified time
    • getActiveTriggers

      List<TriggerModel> getActiveTriggers()
      Returns a List of all Triggers, whose next activation time ( getNextTime(TriggerModel, Calendar) lies before the current system time.
      Returns:
      a List of all Triggers, whose next activation time ( getNextTime(TriggerModel, Calendar) is smaller than current system time
    • getActiveTriggers

      List<TriggerModel> getActiveTriggers(Calendar calendar)
      Returns a List of all Triggers, whose next activation time ( getNextTime(TriggerModel, Calendar) lies before the specified calendar date.
      Parameters:
      calendar - the calendar
      Returns:
      a List of all Triggers, whose next activation time ( getNextTime(TriggerModel, Calendar) lies before the specified calendar date
    • getPulseSeconds

      int getPulseSeconds()
      Returns a time interval at which trigger activation is fired. See cronjob.trigger.interval' property
    • setPulseSeconds

      void setPulseSeconds(int interval)
      Sets a time interval at which trigger activation is fired. See cronjob.trigger.interval' property .