public final class DateSchedule extends AbstractSchedule implements Serializable
The dates must be of the form yyyy-MM-dd where the format is as specified by the Java Date Format.
<schedules:date on="2004-12-25" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
Constructor and Description |
---|
DateSchedule() |
Modifier and Type | Method and Description |
---|---|
String |
getFrom()
Get the from Date as a String.
|
String |
getTo()
Return the to date as a string.
|
ScheduleResult |
nextDue(ScheduleContext context)
For a given date a schedule will provide the interval this schedule
should next be scheduled in.
|
void |
setFrom(String startDateString) |
void |
setOn(String on) |
void |
setTo(String endDateString) |
String |
toString()
Override toString.
|
getRefinement, setRefinement
public void setFrom(String startDateString)
Property: from
Description: The from date for the schedule. Defaults to along time ago.
Required: No.
startDateString
- The from date. May be null.ParseException
- If the String isn't a Date.public String getFrom()
public void setTo(String endDateString)
Property: to
Description: The to date for the schedule. This date is inclusive, the defined interval is up to and including the last millisecond of this date. This defaults to a long time away.
Required: No.
endDateString
- The end date. May be null.ParseException
- If the string isn't a valid date.public String getTo()
public void setOn(String on)
Property: on
Description: A specific date on which to schedule something.
Required: No.
in
- The on text.ParseException
- If the string isn't a date.public ScheduleResult nextDue(ScheduleContext context)
Schedule
If the schedule is never due again for the given date, null is returned.