public class DefaultTriggerService extends java.lang.Object implements TriggerService
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultTriggerService.Mode |
| Modifier and Type | Field and Description |
|---|---|
static int |
IGNORE_VALUE
ignored value for time, interval, max acceptable waits
|
| Constructor and Description |
|---|
DefaultTriggerService() |
| Modifier and Type | Method and Description |
|---|---|
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. |
boolean |
activateForTest(TriggerModel trigger,
long currentTime) |
java.util.List<TriggerModel> |
getActiveTriggers()
Returns a
List of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) lies before the current system time. |
java.util.List<TriggerModel> |
getActiveTriggers(java.util.Calendar calendar)
Returns a
List of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) lies before the specified calendar date. |
protected java.util.Map<java.lang.String,java.lang.String> |
getConfigAttributes() |
java.util.Calendar |
getNextTime(TriggerModel trigger,
java.util.Calendar relativeTo)
Returns the next activation time for the
TriggerModel in relation to the specified calendar. |
int |
getPulseSeconds()
Returns a time interval at which trigger activation is fired.
|
void |
setCronJobService(CronJobService cronJobService) |
void |
setI18NService(I18NService i18nService) |
void |
setModelService(ModelService modelService) |
void |
setPulseSeconds(int interval)
Sets a time interval at which trigger activation is fired.
|
void |
setSessionService(SessionService sessionService) |
void |
setTriggerDao(TriggerDao triggerDao) |
public static final int IGNORE_VALUE
public void setCronJobService(CronJobService cronJobService)
public void setModelService(ModelService modelService)
public void setTriggerDao(TriggerDao triggerDao)
public void setI18NService(I18NService i18nService)
public void setSessionService(SessionService sessionService)
public boolean activateForTest(TriggerModel trigger, long currentTime)
public void activate(TriggerModel trigger)
TriggerServiceJobModel using the assigned CronJobModel if the next activation
time ((@link TriggerModel#getActivationTime()} is less or equal than the current system time.activate in interface TriggerServicetrigger - the trigger instanceprotected java.util.Map<java.lang.String,java.lang.String> getConfigAttributes()
public java.util.Calendar getNextTime(TriggerModel trigger, java.util.Calendar relativeTo)
TriggerServiceTriggerModel in relation to the specified calendar.
Use this method e.g. for different first day of week modes.
getNextTime in interface TriggerServicetrigger - the trigger instancerelativeTo - the calendar which the next activation time should be calculated relatively forCalendar) for the TriggerModel in relation to the specified
timepublic java.util.List<TriggerModel> getActiveTriggers()
TriggerServiceList of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) lies before the current system time.getActiveTriggers in interface TriggerServiceList of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) is smaller than current system timepublic java.util.List<TriggerModel> getActiveTriggers(java.util.Calendar calendar)
TriggerServiceList of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) lies before the specified calendar date.getActiveTriggers in interface TriggerServicecalendar - the calendarList of all Triggers, whose next activation time (
TriggerService.getNextTime(TriggerModel, Calendar ) lies before the specified calendar datepublic int getPulseSeconds()
TriggerServicegetPulseSeconds in interface TriggerServicepublic void setPulseSeconds(int interval)
TriggerServicesetPulseSeconds in interface TriggerServiceCopyright © 2018 SAP SE. All Rights Reserved.