planetj.dataengine.autorun
Class EmailTask

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

public class EmailTask
extends AutoRunTask

A Task used for sending out an operation periodically via email


Constructor Summary
protected EmailTask()
          EMailTask constructor comment.
  EmailTask(EmailOperation emailOperation, Operation targetOperation)
          EMailTask constructor
 
Method Summary
 void autoRun()
          The action to be performed by this task.
 PropertyGroup getAlternateEmailPropertyGroup()
          Gets properties from another email property group.
protected  java.lang.String getBody(Operation mTargetOperation)
          Gets the body of the email
protected  DistributionPropertyGroup getDistributionPropertyGroup()
          Gets the property group containing the distribution properties
 EmailOperation getEmailOperation()
          Gets this EmailTask's Email Operation
 int getEmailOperationId()
          Gets the ID of this EMailTask's Email Operation
 long getFrequency()
          Gets the frequency (in seconds) at which the task should run
 CMMailer getMailer()
          Gets the mailer to use
 java.util.Date getStartTime()
          Gets the exact day and time when this task should begin executing
protected  void setEmailOperationId(int newSourceOperationId)
          Sets the ID of this EmailTask's EmailOperation
 
Methods inherited from class planetj.dataengine.autorun.AutoRunTask
clone, cloneTask, getAutoRunOperation, getAutoRunOperationId, getAutoRunPropertyGroup, getMetadataAlias, getTargetOperation, getTargetOperationId, performTask, setAutoRunOperationId, setMetadataAlias, setTargetOperationId
 
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

EmailTask

protected EmailTask()
EMailTask constructor comment.


EmailTask

public EmailTask(EmailOperation emailOperation,
                 Operation targetOperation)
EMailTask constructor

Method Detail

autoRun

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

Specified by:
autoRun in class AutoRunTask
Throws:
CMException

getAlternateEmailPropertyGroup

public PropertyGroup getAlternateEmailPropertyGroup()
                                             throws CMException
Gets properties from another email property group.

Throws:
CMException

getBody

protected java.lang.String getBody(Operation mTargetOperation)
                            throws CMException
Gets the body of the email

Throws:
CMException

getDistributionPropertyGroup

protected DistributionPropertyGroup getDistributionPropertyGroup()
                                                          throws CMException
Gets the property group containing the distribution properties

Throws:
CMException

getEmailOperation

public EmailOperation getEmailOperation()
                                 throws CMException
Gets this EmailTask's Email Operation

Throws:
CMException

getEmailOperationId

public int getEmailOperationId()
Gets the ID of this EMailTask's Email Operation


getFrequency

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

Specified by:
getFrequency in class AutoRunTask
Throws:
CMException

getMailer

public CMMailer getMailer()
                   throws CMException
Gets the mailer to use

Throws:
CMException

getStartTime

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

Specified by:
getStartTime in class AutoRunTask
Throws:
CMException

setEmailOperationId

protected void setEmailOperationId(int newSourceOperationId)
Sets the ID of this EmailTask's EmailOperation