Ontimize 5.2072EN

com.ontimize.util.quartz
Interface QuartzManager

All Known Implementing Classes:
DefaultQuartzManager

public interface QuartzManager


Method Summary
 void addTask(java.util.Properties taskProperties)
          Insert a new task in the quartz scheduler
 void addTask(java.lang.String propertiesFile)
          Insert a new task in the quartz scheduler.
 void addTask(java.lang.String taskName, java.lang.String taskGroup, java.lang.String taskClassName, java.lang.String triggerName, java.lang.String triggerGroup, java.util.Date startTime, java.util.Date endTime, int repeatCount, long repeatInterval, java.util.Map actionParametersMap, java.util.Map queryParametersMap)
          Insert a new task in the quartz scheduler
 void addTask(java.lang.String taskName, java.lang.String taskGroup, java.lang.String taskClassName, java.lang.String cronName, java.lang.String cronGroup, java.lang.String cronExpression, java.util.Date endTime)
          Insert a new task in the quartz scheduler.
 void addTask(java.lang.String taskName, java.lang.String taskGroup, java.lang.String taskClassName, java.lang.String cronName, java.lang.String cronGroup, java.lang.String cronExpression, java.util.Date endTime, java.util.Map actionParametersMap, java.util.Map queryParametersMap)
          Insert a new task in the Quartz scheduler.
 EntityReferenceLocator getReferenceLocator()
           
 boolean removeTask(java.lang.String taskName, java.lang.String taskGroup)
          Remove an existing task of the scheduler
 

Method Detail

getReferenceLocator

public EntityReferenceLocator getReferenceLocator()

addTask

public void addTask(java.util.Properties taskProperties)
Insert a new task in the quartz scheduler

Parameters:
taskProperties - Properties file to configure the task. It must contain:
Task name, task group, thread name, name of the thread group, timing configuration expression and name of the class to execute
The names of this properties are in the interface Task

addTask

public void addTask(java.lang.String propertiesFile)
Insert a new task in the quartz scheduler.

Parameters:
propertiesFile - Path of the configuration properties file with the task parameters
See Also:
addTask(Properties)

addTask

public void addTask(java.lang.String taskName,
                    java.lang.String taskGroup,
                    java.lang.String taskClassName,
                    java.lang.String cronName,
                    java.lang.String cronGroup,
                    java.lang.String cronExpression,
                    java.util.Date endTime)
Insert a new task in the quartz scheduler.

Parameters:
taskName - Name of the task, it must be unique in the scheduler
taskGroup - The name of the tasks group to add the task in. This parameter can be null
taskClassName - Name of the class that executes the task. This class must implement the interface Task
cronName - Name of the thread that will execute the task. This name must be unique in the quartz scheduler
cronGroup - Name of the group of threads to add the thread in the previous parameter. This parameter can be null
cronExpression - Expression to configure the temporal timing to execute the task. This is a string with 7 values separated by ';'. This 7 parameters are:
seconds (0-59), minutes (0-59), hours (0-23), month day (1-31), month (1-12 or JAN-DEC), week day (1-7 or SUN-SAT), year (optional between 1970 and 2099).
endTime - Date to stop or finish the task execution

addTask

public void addTask(java.lang.String taskName,
                    java.lang.String taskGroup,
                    java.lang.String taskClassName,
                    java.lang.String cronName,
                    java.lang.String cronGroup,
                    java.lang.String cronExpression,
                    java.util.Date endTime,
                    java.util.Map actionParametersMap,
                    java.util.Map queryParametersMap)
Insert a new task in the Quartz scheduler.

Parameters:
taskName - The name of the task, it must be unique in the scheduler
taskGroup - The name of the tasks group to add the task in. This parameter can be null
taskClassName - Name of the class that executes the task. This class must implement the interface Task
cronName - Name of the thread that will execute the task. This name must be unique in the quartz scheduler
cronGroup - Name of the group of threads to add the thread in the previous parameter. This parameter can be null
cronExpression - Expression to configure the temporal timing to execute the task. This is a string with 7 values separated by ';'. This 7 parameters are:
seconds (0-59), minutes (0-59), hours (0-23), month day (1-31), month (1-12 or JAN-DEC), week day (1-7 or SUN-SAT), year (optional between 1970 and 2099).
endTime - Date to stop or finish the task execution
actionParametersMap - Parameters used to execute the task
queryParametersMap - Parameters used to execute a query to get some data to know if the task must be executed or not

addTask

public void addTask(java.lang.String taskName,
                    java.lang.String taskGroup,
                    java.lang.String taskClassName,
                    java.lang.String triggerName,
                    java.lang.String triggerGroup,
                    java.util.Date startTime,
                    java.util.Date endTime,
                    int repeatCount,
                    long repeatInterval,
                    java.util.Map actionParametersMap,
                    java.util.Map queryParametersMap)
Insert a new task in the quartz scheduler

Parameters:
taskName - The name of the task, it must be unique in the scheduler
taskGroup - The name of the tasks group to add the task in. This parameter can be null
taskClassName - Name of the class that executes the task. This class must implement the interface Task
triggerName - Name of the thread that will execute the task. This name must be unique in the quartz scheduler
triggerGroup - Name of the group of threads to add the thread in the previous parameter. This parameter can be null
startTime - Date to start the task execution
endTime - Date to stop or finish the execution of the task
repeatCount - Number of times to execute the task
repeatInterval - Time between to executions of the task
actionParametersMap - Parameters used to execute the task
queryParametersMap - Parameters used to execute a query to get some data to know if the task must be executed or not

removeTask

public boolean removeTask(java.lang.String taskName,
                          java.lang.String taskGroup)
Remove an existing task of the scheduler

Parameters:
taskName - Name of the task to remove
taskGroup - name of the group of tasks that contains the task
Returns:
True if the task is removed successfully or false when some error happens

Ontimize