public class ERQSJobDescription4Test extends Object implements ERQSJobDescription
| Modifier and Type | Field and Description |
|---|---|
static String |
DEF_GROUP_NAME |
static String |
DEF_JOB_NAME |
static String |
EMAIL_WHEN_FAILED |
static String |
EMAIL_WHEN_SUCCEDED |
| Constructor and Description |
|---|
ERQSJobDescription4Test() |
| Modifier and Type | Method and Description |
|---|---|
String |
classPath()
Object that will be instantiated by the scheduler to make its job.
|
String |
cronExpression()
The cron expression allows you to define a period where the job is triggered.
If the cron expression returns null, the job runs once immediately. |
com.webobjects.foundation.NSTimestamp |
firstExecutionDate()
A getter that returns the first execution date of the job.
|
String |
group()
If group() return null or an empty string, Scheduler.DEFAULT_GROUP is used instead.
|
boolean |
isEnterpriseObject()
Very important: tells the supervisor and the listener if the current object is a EO.
|
String |
jobDescription()
The description is optional.
|
Map<String,Object> |
jobInfos()
jobInfos is used to pass information when the job will run.
|
com.webobjects.foundation.NSTimestamp |
lastExecutionDate()
A getter that returns the last execution date of the job.
|
String |
name()
The name and the group are very important because the scheduler retrieve jobs based on the name and group.
|
com.webobjects.foundation.NSTimestamp |
nextExecutionDate() |
NSArray<String> |
recipients(boolean executionSucceeded)
If you set up the listener to send email when the job is done, recipient() will be used to send emails.
|
void |
setClassPath(String classPath) |
void |
setCronExpression(String cronExpression) |
void |
setFirstExecutionDate(com.webobjects.foundation.NSTimestamp firstExecutionDate) |
void |
setGroup(String group) |
void |
setIsEnterpriseObject(boolean b) |
void |
setJobInfos(Map<String,Object> aMap) |
void |
setLastExecutionDate(com.webobjects.foundation.NSTimestamp lastExecutionDate) |
void |
setName(String name) |
void |
setNextExecutionDate(com.webobjects.foundation.NSTimestamp nextExecutionDate)
A setter to save the next execution date.
|
public static final String DEF_JOB_NAME
public static final String DEF_GROUP_NAME
public static final String EMAIL_WHEN_SUCCEDED
public static final String EMAIL_WHEN_FAILED
public String classPath()
ERQSJobDescriptionclassPath in interface ERQSJobDescriptionpublic void setClassPath(String classPath)
public String cronExpression()
ERQSJobDescriptioncronExpression in interface ERQSJobDescriptionpublic void setCronExpression(String cronExpression)
public String group()
ERQSJobDescriptiongroup in interface ERQSJobDescriptionpublic void setGroup(String group)
public boolean isEnterpriseObject()
ERQSJobDescriptionisEnterpriseObject in interface ERQSJobDescriptiontrue if it's an EObuildTriggerForJobpublic void setIsEnterpriseObject(boolean b)
public String jobDescription()
ERQSJobDescriptionjobDescription in interface ERQSJobDescriptionpublic String name()
ERQSJobDescriptionIt can't be null.
name in interface ERQSJobDescriptionpublic void setName(String name)
public NSArray<String> recipients(boolean executionSucceeded)
ERQSJobDescriptionDepending on the value of executionSucceeded, you can return a different list of recipients.
recipients in interface ERQSJobDescriptionexecutionSucceeded - true if the job ran successfully.public void setFirstExecutionDate(com.webobjects.foundation.NSTimestamp firstExecutionDate)
setFirstExecutionDate in interface ERQSJobDescriptionpublic com.webobjects.foundation.NSTimestamp firstExecutionDate()
ERQSJobDescriptionfirstExecutionDate in interface ERQSJobDescriptionpublic void setLastExecutionDate(com.webobjects.foundation.NSTimestamp lastExecutionDate)
setLastExecutionDate in interface ERQSJobDescriptionpublic com.webobjects.foundation.NSTimestamp lastExecutionDate()
ERQSJobDescriptionlastExecutionDate in interface ERQSJobDescriptionpublic void setNextExecutionDate(com.webobjects.foundation.NSTimestamp nextExecutionDate)
ERQSJobDescriptionNotice that there is no getter because the framework doesn't need it to run. But it's a good idea to code it.
setNextExecutionDate in interface ERQSJobDescriptionpublic com.webobjects.foundation.NSTimestamp nextExecutionDate()
public Map<String,Object> jobInfos()
ERQSJobDescriptionAll key/value pair will be given to the job.
jobInfos in interface ERQSJobDescriptionCopyright © 2002 – 2020 Project Wonder.