CronTriggerFactoryBean allows 'calendarName' and 'description' to be specified
Also making 'description' available on SimpleTriggerFactoryBean. Issue: SPR-9771
This commit is contained in:
parent
477e60f28a
commit
7502ecd35e
|
@ -84,10 +84,14 @@ public class CronTriggerFactoryBean implements FactoryBean<CronTrigger>, BeanNam
|
|||
|
||||
private TimeZone timeZone;
|
||||
|
||||
private String calendarName;
|
||||
|
||||
private int priority;
|
||||
|
||||
private int misfireInstruction;
|
||||
|
||||
private String description;
|
||||
|
||||
private String beanName;
|
||||
|
||||
private CronTrigger cronTrigger;
|
||||
|
@ -174,6 +178,13 @@ public class CronTriggerFactoryBean implements FactoryBean<CronTrigger>, BeanNam
|
|||
this.timeZone = timeZone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate a specific calendar with this cron trigger.
|
||||
*/
|
||||
public void setCalendarName(String calendarName) {
|
||||
this.calendarName = calendarName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify the priority of this trigger.
|
||||
*/
|
||||
|
@ -200,6 +211,13 @@ public class CronTriggerFactoryBean implements FactoryBean<CronTrigger>, BeanNam
|
|||
this.misfireInstruction = constants.asNumber(constantName).intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate a textual description with this trigger.
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
@ -231,8 +249,10 @@ public class CronTriggerFactoryBean implements FactoryBean<CronTrigger>, BeanNam
|
|||
cti.setStartTime(this.startTime);
|
||||
cti.setCronExpression(this.cronExpression);
|
||||
cti.setTimeZone(this.timeZone);
|
||||
cti.setCalendarName(this.calendarName);
|
||||
cti.setPriority(this.priority);
|
||||
cti.setMisfireInstruction(this.misfireInstruction);
|
||||
cti.setDescription(this.description);
|
||||
this.cronTrigger = cti;
|
||||
*/
|
||||
|
||||
|
@ -264,8 +284,10 @@ public class CronTriggerFactoryBean implements FactoryBean<CronTrigger>, BeanNam
|
|||
pvs.add("startTime", this.startTime);
|
||||
pvs.add("cronExpression", this.cronExpression);
|
||||
pvs.add("timeZone", this.timeZone);
|
||||
pvs.add("calendarName", this.calendarName);
|
||||
pvs.add("priority", this.priority);
|
||||
pvs.add("misfireInstruction", this.misfireInstruction);
|
||||
pvs.add("description", this.description);
|
||||
bw.setPropertyValues(pvs);
|
||||
this.cronTrigger = (CronTrigger) bw.getWrappedInstance();
|
||||
}
|
||||
|
|
|
@ -87,6 +87,8 @@ public class SimpleTriggerFactoryBean implements FactoryBean<SimpleTrigger>, Bea
|
|||
|
||||
private int misfireInstruction;
|
||||
|
||||
private String description;
|
||||
|
||||
private String beanName;
|
||||
|
||||
private SimpleTrigger simpleTrigger;
|
||||
|
@ -204,6 +206,13 @@ public class SimpleTriggerFactoryBean implements FactoryBean<SimpleTrigger>, Bea
|
|||
this.misfireInstruction = constants.asNumber(constantName).intValue();
|
||||
}
|
||||
|
||||
/**
|
||||
* Associate a textual description with this trigger.
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
@ -234,6 +243,7 @@ public class SimpleTriggerFactoryBean implements FactoryBean<SimpleTrigger>, Bea
|
|||
sti.setRepeatCount(this.repeatCount);
|
||||
sti.setPriority(this.priority);
|
||||
sti.setMisfireInstruction(this.misfireInstruction);
|
||||
cti.setDescription(this.description);
|
||||
this.simpleTrigger = sti;
|
||||
*/
|
||||
|
||||
|
@ -267,6 +277,7 @@ public class SimpleTriggerFactoryBean implements FactoryBean<SimpleTrigger>, Bea
|
|||
pvs.add("repeatCount", this.repeatCount);
|
||||
pvs.add("priority", this.priority);
|
||||
pvs.add("misfireInstruction", this.misfireInstruction);
|
||||
pvs.add("description", this.description);
|
||||
bw.setPropertyValues(pvs);
|
||||
this.simpleTrigger = (SimpleTrigger) bw.getWrappedInstance();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue