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. |
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.
|
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.
|
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(NSTimestamp firstExecutionDate) |
void |
setGroup(String group) |
void |
setIsEnterpriseObject(boolean b) |
void |
setJobInfos(Map<String,Object> aMap) |
void |
setLastExecutionDate(NSTimestamp lastExecutionDate) |
void |
setName(String name) |
void |
setNextExecutionDate(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()
ERQSJobDescription
classPath
in interface ERQSJobDescription
public void setClassPath(String classPath)
public String cronExpression()
ERQSJobDescription
cronExpression
in interface ERQSJobDescription
public void setCronExpression(String cronExpression)
public String group()
ERQSJobDescription
group
in interface ERQSJobDescription
public void setGroup(String group)
public boolean isEnterpriseObject()
ERQSJobDescription
isEnterpriseObject
in interface ERQSJobDescription
true
if it's an EObuildTriggerForJob
public void setIsEnterpriseObject(boolean b)
public String jobDescription()
ERQSJobDescription
jobDescription
in interface ERQSJobDescription
public String name()
ERQSJobDescription
It can't be null.
name
in interface ERQSJobDescription
public void setName(String name)
public NSArray<String> recipients(boolean executionSucceeded)
ERQSJobDescription
Depending on the value of executionSucceeded, you can return a different list of recipients.
recipients
in interface ERQSJobDescription
executionSucceeded
- true
if the job ran successfully.public void setFirstExecutionDate(NSTimestamp firstExecutionDate)
setFirstExecutionDate
in interface ERQSJobDescription
public NSTimestamp firstExecutionDate()
ERQSJobDescription
firstExecutionDate
in interface ERQSJobDescription
public void setLastExecutionDate(NSTimestamp lastExecutionDate)
setLastExecutionDate
in interface ERQSJobDescription
public NSTimestamp lastExecutionDate()
ERQSJobDescription
lastExecutionDate
in interface ERQSJobDescription
public void setNextExecutionDate(NSTimestamp nextExecutionDate)
ERQSJobDescription
Notice 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 ERQSJobDescription
public NSTimestamp nextExecutionDate()
public Map<String,Object> jobInfos()
ERQSJobDescription
All key/value pair will be given to the job.
jobInfos
in interface ERQSJobDescription
Copyright © 2002 – 2024 Project Wonder.