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 TypeMethodDescriptionvoid
addCustomParams
(String key, Serializable value) Add a new custom param to the existing custom parameters map.void
addJobResults
(List<JobResult> jobResults) Add the results of the job in bulk.void
Appends 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 void
executeJob
(HashMap attributes) getId()
getJobID()
getName()
boolean
boolean
isStop()
Provides a flag indicating whether a schedule job is stopped or not.void
sendNotification
(Double failedJobID, String execeptionMessage, String jobName, String jobStartDate) method to generate notification eventvoid
setCustomParams
(HashMap<String, Serializable> customParams) Set the custom parameters for the job.void
setCustomStatus
(String customStatus) Set the custom status for the job.void
setEmailConfig
(EmailConfig emailConfig) Sets the email configvoid
setImplementation
(String implementation) void
void
setTaskName
(String taskName) boolean
stop()
This method is used to stop a schedule task.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
setEmailConfig
in 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:
isJobSuccess
in interfaceoracle.iam.scheduler.vo.Task
-
getTaskName
- Specified by:
getTaskName
in interfaceoracle.iam.scheduler.vo.Task
-
setTaskName
- Specified by:
setTaskName
in interfaceoracle.iam.scheduler.vo.Task
-
getName
- Specified by:
getName
in interfaceoracle.iam.scheduler.vo.Task
-
getImplementation
- Specified by:
getImplementation
in interfaceoracle.iam.scheduler.vo.Task
-
setName
- Specified by:
setName
in interfaceoracle.iam.scheduler.vo.Task
-
setImplementation
- Specified by:
setImplementation
in interfaceoracle.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 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:
getId
in interfaceoracle.iam.scheduler.vo.Task
-
executeJob
- Specified by:
executeJob
in 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
-