Package oracle.iam.scheduler.vo
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
This is a base class for each schedule task implementation class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomParams(String key, Serializable value) Add a new custom param to the existing custom parameters map.voidaddJobResults(List<JobResult> jobResults) Add the results of the job in bulk.voidAppends a particular JobResult to the jobResults list.createNotificationEvent(Double failedJobID, String execeptionMessage, String jobName, String jobStartDate) This Method is used to create a Notification event using following argumentsfinal voidexecuteJob(HashMap attributes) getId()getJobID()getName()booleanbooleanisStop()Provides a flag indicating whether a schedule job is stopped or not.voidsendNotification(Double failedJobID, String execeptionMessage, String jobName, String jobStartDate) method to generate notification eventvoidsetCustomParams(HashMap<String, Serializable> customParams) Set the custom parameters for the job.voidsetCustomStatus(String customStatus) Set the custom status for the job.voidsetEmailConfig(EmailConfig emailConfig) Sets the email configvoidsetImplementation(String implementation) voidvoidsetTaskName(String taskName) booleanstop()This method is used to stop a schedule task.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface oracle.iam.scheduler.vo.Task
execute, getAttributes, setAttributes
-
Constructor Details
-
TaskSupport
public TaskSupport()
-
-
Method Details
-
getJobID
-
setCustomParams
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
Add a new custom param to the existing custom parameters map.- Parameters:
key- Name of the custom paramvalue- Value of the custom param
-
setCustomStatus
Set the custom status for the job.- Parameters:
customStatus- The custom status to be set
-
setEmailConfig
Sets the email config- Specified by:
setEmailConfigin interfaceoracle.iam.scheduler.vo.Task- Parameters:
emailConfig-
-
addJobResults
Add the results of the job in bulk.- Parameters:
jobResults- List of JobResult
-
addResult
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:
isJobSuccessin interfaceoracle.iam.scheduler.vo.Task
-
getTaskName
- Specified by:
getTaskNamein interfaceoracle.iam.scheduler.vo.Task
-
setTaskName
- Specified by:
setTaskNamein interfaceoracle.iam.scheduler.vo.Task
-
getName
- Specified by:
getNamein interfaceoracle.iam.scheduler.vo.Task
-
getImplementation
- Specified by:
getImplementationin interfaceoracle.iam.scheduler.vo.Task
-
setName
- Specified by:
setNamein interfaceoracle.iam.scheduler.vo.Task
-
setImplementation
- Specified by:
setImplementationin interfaceoracle.iam.scheduler.vo.Task
-
stop
public boolean stop()Description copied from interface:StoppableTaskThis method is used to stop a schedule task. if schedule task is stopped without any error than return TRUE else FALSE.- Specified by:
stopin interfaceStoppableTask- 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
- Specified by:
getIdin interfaceoracle.iam.scheduler.vo.Task
-
executeJob
- Specified by:
executeJobin interfaceoracle.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 jobexeceptionMessage- To provide exception causejobName- name of failed schedule jobjobStartDate- start time of job- Returns:
- instance of BulkNotificationEvent
-