Ontimize 5.2071EN

com.ontimize.util.quartz
Class AbstractTask

java.lang.Object
  extended bycom.ontimize.util.quartz.AbstractTask
All Implemented Interfaces:
org.quartz.Job, java.io.Serializable, Task
Direct Known Subclasses:
SendAutomaticNotice

public abstract class AbstractTask
extends java.lang.Object
implements Task, org.quartz.Job, java.io.Serializable

See Also:
Serialized Form

Field Summary
protected  java.util.Map actionParameters
           
protected  EntityReferenceLocator locator
           
protected  java.util.Map queryParameters
           
protected  java.lang.String taskGroup
           
protected  java.lang.String taskName
           
 
Fields inherited from interface com.ontimize.util.quartz.Task
ACTION_PARAMETERS_KEY, CRON_EXPRESSION_KEY, CRON_GROUP_KEY, CRON_NAME_KEY, QUERY_PARAMETERS_KEY, TASK_CLASS_KEY, TASK_GROUP_KEY, TASK_NAME_KEY
 
Constructor Summary
AbstractTask()
           
 
Method Summary
abstract  void doOnConditionFalse()
           
abstract  void doOnConditionTrue()
           
 int doOnEnd()
           
abstract  boolean evaluateCondition()
           
 void execute(org.quartz.JobExecutionContext context)
          This method is used for the Quartz Scheduler in the context of a task execution.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionParameters

protected java.util.Map actionParameters

queryParameters

protected java.util.Map queryParameters

taskName

protected java.lang.String taskName

taskGroup

protected java.lang.String taskGroup

locator

protected EntityReferenceLocator locator
Constructor Detail

AbstractTask

public AbstractTask()
Method Detail

evaluateCondition

public abstract boolean evaluateCondition()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

doOnConditionTrue

public abstract void doOnConditionTrue()
                                throws java.lang.Exception
Throws:
java.lang.Exception

doOnConditionFalse

public abstract void doOnConditionFalse()
                                 throws java.lang.Exception
Throws:
java.lang.Exception

execute

public void execute(org.quartz.JobExecutionContext context)
             throws org.quartz.JobExecutionException
This method is used for the Quartz Scheduler in the context of a task execution. It initializes the task parameters and calls the evaluateCondition() method. If evaluate condition returns true then executes the doOnConditionTrue() method and if it returns false then executes doOnConditionFalse(). At the end it always executes the doOnEnd() method;

Specified by:
execute in interface org.quartz.Job
Throws:
org.quartz.JobExecutionException

doOnEnd

public int doOnEnd()

Ontimize