Package org.openbravo.scheduling.trigger
Class TriggerProvider
- java.lang.Object
-
- org.openbravo.scheduling.trigger.TriggerProvider
-
public class TriggerProvider extends Object
Provides Quartz's Trigger instances configured with the timing options and schedules defined with a process request.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.quartz.Trigger
createTrigger(String name, ProcessBundle bundle, ConnectionProvider conn)
Loads the trigger details from AD_PROCESS_REQUEST and converts them into a schedulable Quartz Trigger instance.static TriggerProvider
getInstance()
-
-
-
Method Detail
-
getInstance
public static TriggerProvider getInstance()
- Returns:
- the TriggerProvider singleton instance
-
createTrigger
public org.quartz.Trigger createTrigger(String name, ProcessBundle bundle, ConnectionProvider conn) throws TriggerGenerationException
Loads the trigger details from AD_PROCESS_REQUEST and converts them into a schedulable Quartz Trigger instance.- Parameters:
name
- The name element for the Trigger's TriggerKey. In general this will be the the ID of the AD_PROCESS_REQUEST.bundle
- the ProcessBundle to be included into the Trigger's job data mapconn
- the ConnectionProvider used to load the AD_PROCESS_REQUEST information- Returns:
- a Trigger instance configured according to the AD_PROCESS_REQUEST information retrieved from database
- Throws:
TriggerGenerationException
- if the trigger generation fails.
-
-