Class TaskSupport

java.lang.Object
oracle.iam.scheduler.vo.TaskSupport
All Implemented Interfaces:
StoppableTask, oracle.iam.scheduler.vo.Task
Direct Known Subclasses:
com.thortech.xl.scheduler.tasks.SchedulerBaseTask

public abstract class TaskSupport extends Object implements StoppableTask
This is a base class for each schedule task implementation class.
  • Constructor Details

    • TaskSupport

      public TaskSupport()
  • Method Details

    • getJobID

      public Double getJobID()
    • setCustomParams

      public void setCustomParams(HashMap<String,Serializable> customParams)
      Set the custom parameters for the job. The final map will be set at the end of the job.
      Parameters:
      customParams - HashMap of the custom parameters for the job
    • addCustomParams

      public void addCustomParams(String key, Serializable value)
      Add a new custom param to the existing custom parameters map.
      Parameters:
      key - Name of the custom param
      value - Value of the custom param
    • setCustomStatus

      public void setCustomStatus(String customStatus)
      Set the custom status for the job.
      Parameters:
      customStatus - The custom status to be set
    • setEmailConfig

      public void setEmailConfig(EmailConfig emailConfig)
      Sets the email config
      Specified by:
      setEmailConfig in interface oracle.iam.scheduler.vo.Task
      Parameters:
      emailConfig -
    • addJobResults

      public void addJobResults(List<JobResult> jobResults)
      Add the results of the job in bulk.
      Parameters:
      jobResults - List of JobResult
    • addResult

      public void addResult(JobResult result)
      Appends a particular JobResult to the jobResults list.
      Parameters:
      result - The JobResult to be added to the jobResults list
    • isJobSuccess

      public boolean isJobSuccess()
      Specified by:
      isJobSuccess in interface oracle.iam.scheduler.vo.Task
    • getTaskName

      public String getTaskName()
      Specified by:
      getTaskName in interface oracle.iam.scheduler.vo.Task
    • setTaskName

      public void setTaskName(String taskName)
      Specified by:
      setTaskName in interface oracle.iam.scheduler.vo.Task
    • getName

      public String getName()
      Specified by:
      getName in interface oracle.iam.scheduler.vo.Task
    • getImplementation

      public String getImplementation()
      Specified by:
      getImplementation in interface oracle.iam.scheduler.vo.Task
    • setName

      public void setName(String name)
      Specified by:
      setName in interface oracle.iam.scheduler.vo.Task
    • setImplementation

      public void setImplementation(String implementation)
      Specified by:
      setImplementation in interface oracle.iam.scheduler.vo.Task
    • stop

      public boolean stop()
      Description copied from interface: StoppableTask
      This method is used to stop a schedule task. if schedule task is stopped without any error than return TRUE else FALSE.
      Specified by:
      stop in interface StoppableTask
      Returns:
      TRUE if schedule task is stopped otherwise FALSE
    • isStop

      public boolean isStop()
      Provides a flag indicating whether a schedule job is stopped or not. 'TRUE' if job is stopped otherwise 'FALSE'.
      Returns:
      Flag indicating whether a schedule job is stopped or not.
    • getId

      public String getId()
      Specified by:
      getId in interface oracle.iam.scheduler.vo.Task
    • executeJob

      public final void executeJob(HashMap attributes) throws Exception
      Specified by:
      executeJob in interface oracle.iam.scheduler.vo.Task
      Throws:
      Exception
    • sendNotification

      public void sendNotification(Double failedJobID, String execeptionMessage, String jobName, String jobStartDate)
      method to generate notification event
      Parameters:
      failedJobID - id of failed job exceptionMessage To provide exception cause jobName name of failed schedule job jobStartDate date of failed job creation
    • createNotificationEvent

      public BulkNotificationEvent createNotificationEvent(Double failedJobID, String execeptionMessage, String jobName, String jobStartDate)
      This Method is used to create a Notification event using following arguments
      Parameters:
      failedJobID - id of failed job
      execeptionMessage - To provide exception cause
      jobName - name of failed schedule job
      jobStartDate - start time of job
      Returns:
      instance of BulkNotificationEvent