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 Detail

      • 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

        java.util.Calendar getNextTime​(TriggerModel trigger,
                                       java.util.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

        java.util.List<TriggerModel> getActiveTriggers​(java.util.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 .