planetj.dataengine.autorun
Class AutoRunTask

java.lang.Object
  extended byjava.util.TimerTask
      extended byplanetj.util.CMTimerTask
          extended byplanetj.dataengine.task.DataEngineTimerTask
              extended byplanetj.dataengine.autorun.AutoRunTask
All Implemented Interfaces:
java.lang.Runnable
Direct Known Subclasses:
BatchProcessTask, EmailTask

public abstract class AutoRunTask
extends DataEngineTimerTask

Describes how an Operation should be automatically run. All subclasses must provide a default constructor.


Constructor Summary
protected AutoRunTask()
          AutoRunTask constructor comment.
protected AutoRunTask(AutoRunOperation pSourceOperation, Operation pTargetOperation)
          AutoRunTask constructor
 
Method Summary
abstract  void autoRun()
          The action to be performed by this task.
 java.lang.Object clone()
          Clones this task.
 AutoRunTask cloneTask()
          Clones this task.
 AutoRunOperation getAutoRunOperation()
          Gets this AutoRunTask's source operation (the operation which defines this task)
 int getAutoRunOperationId()
          Gets the ID of this AutoRunTask's source operation (the operation which defines this task)
protected  AutoRunPropertyGroup getAutoRunPropertyGroup()
          Gets the property group containing the auto run properties.
abstract  long getFrequency()
          Gets the frequency (in seconds) at which the task should run
 java.lang.String getMetadataAlias()
          Gets the metadata alias this AutoRunTask is using
abstract  java.util.Date getStartTime()
          Gets the exact day and time when this task should begin executing
 Operation getTargetOperation()
          Gets this AutoRunTask's target operation
 int getTargetOperationId()
          Gets the ID of this AutoRunTask's target operation (the operation which will be autorun)
 void performTask()
          The action to be performed by this task.
 void setAutoRunOperationId(int newAutoRunOperationId)
          Sets the ID of this AutoRunTask's source operation (the operation which defines this task)
protected  void setMetadataAlias(java.lang.String newMetadataAlias)
          Sets the metadata alias this AutoRunTask is using
protected  void setTargetOperationId(int newTargetOperationId)
          Sets the ID of this AutoRunTask's target operation (the operation which will be autorun)
 
Methods inherited from class planetj.dataengine.task.DataEngineTimerTask
postTask, preTask
 
Methods inherited from class planetj.util.CMTimerTask
addListener, getNewTaskEvent, getTaskEvent, removeListener, run, taskCompleted, taskFailed, taskStarted
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoRunTask

protected AutoRunTask()
AutoRunTask constructor comment.


AutoRunTask

protected AutoRunTask(AutoRunOperation pSourceOperation,
                      Operation pTargetOperation)
AutoRunTask constructor

Parameters:
pSourceOperation - The AutoRunOperation from which this task was created
pTargetOperation - The Operation which the task will run
Method Detail

autoRun

public abstract void autoRun()
                      throws CMException
The action to be performed by this task.

Throws:
CMException

clone

public java.lang.Object clone()
Clones this task. If this method is overriden, you should invoke it on the superclass first


cloneTask

public AutoRunTask cloneTask()
Clones this task. If this method is overriden, you should invoke it on the superclass first


getAutoRunOperation

public AutoRunOperation getAutoRunOperation()
                                     throws CMException
Gets this AutoRunTask's source operation (the operation which defines this task)

Throws:
CMException

getAutoRunOperationId

public int getAutoRunOperationId()
Gets the ID of this AutoRunTask's source operation (the operation which defines this task)


getAutoRunPropertyGroup

protected AutoRunPropertyGroup getAutoRunPropertyGroup()
                                                throws CMException
Gets the property group containing the auto run properties. It is assumed that there is only one of these property groups

Throws:
CMException

getFrequency

public abstract long getFrequency()
                           throws CMException
Gets the frequency (in seconds) at which the task should run

Throws:
CMException

getMetadataAlias

public java.lang.String getMetadataAlias()
Gets the metadata alias this AutoRunTask is using


getStartTime

public abstract java.util.Date getStartTime()
                                     throws CMException
Gets the exact day and time when this task should begin executing

Throws:
CMException

getTargetOperation

public Operation getTargetOperation()
                             throws CMException
Gets this AutoRunTask's target operation

Throws:
CMException

getTargetOperationId

public int getTargetOperationId()
Gets the ID of this AutoRunTask's target operation (the operation which will be autorun)


performTask

public final void performTask()
The action to be performed by this task.

Specified by:
performTask in class CMTimerTask

setAutoRunOperationId

public void setAutoRunOperationId(int newAutoRunOperationId)
Sets the ID of this AutoRunTask's source operation (the operation which defines this task)


setMetadataAlias

protected void setMetadataAlias(java.lang.String newMetadataAlias)
Sets the metadata alias this AutoRunTask is using


setTargetOperationId

protected void setTargetOperationId(int newTargetOperationId)
Sets the ID of this AutoRunTask's target operation (the operation which will be autorun)