|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.oddjob.schedules.AbstractSchedule
org.oddjob.schedules.ConstrainedSchedule
org.oddjob.schedules.schedules.YearlySchedule
public final class YearlySchedule
The format for dates is MM-dd, i.e. 03-02 is The second of March.
The format for months is either the month number, 1 to 12 or one of JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER (case insensitive).
<schedules:list xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
<schedules>
<schedules:yearly fromMonth="4" toMonth="9">
<refinement>
<schedules:daily at="10:00"/>
</refinement>
</schedules:yearly>
<schedules:yearly fromMonth="10" toMonth="3">
<refinement>
<schedules:daily at="11:00"/>
</refinement>
</schedules:yearly>
</schedules>
</schedules:list>
Instead of month numbers, English month names can be used. This is
equivalent to the above.
<schedules:list xmlns:schedules="http://rgordon.co.uk/oddjob/schedules">
<schedules>
<schedules:yearly fromMonth="April" toMonth="September">
<refinement>
<schedules:daily at="10:00"/>
</refinement>
</schedules:yearly>
<schedules:yearly fromMonth="October" toMonth="March">
<refinement>
<schedules:daily at="11:00"/>
</refinement>
</schedules:yearly>
</schedules>
</schedules:list>
<schedules:yearly fromDate="12-25" toDate="12-26" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
<schedules:yearly onDate="01-01" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
| Field Summary | |
|---|---|
static Pattern |
DAY_FORMAT
|
| Constructor Summary | |
|---|---|
YearlySchedule()
|
|
| Method Summary | |
|---|---|
protected Calendar |
fromCalendar(Date referenceDate,
TimeZone timeZone)
Provide a Calendar for the start of the constraint. |
String |
getFromDate()
|
Month |
getFromMonth()
|
String |
getToDate()
|
Month |
getToMonth()
|
protected CalendarUnit |
intervalBetween()
Sub classes must provide a unit which is what must be added to move the schedule on. |
void |
setFromDate(String from)
|
void |
setFromMonth(Month from)
|
void |
setInMonth(Month in)
|
void |
setOnDate(String on)
|
void |
setToDate(String to)
|
void |
setToMonth(Month to)
|
protected Calendar |
toCalendar(Date referenceDate,
TimeZone timeZone)
Provide a Calendar for the end of the constraint. |
String |
toString()
Override toString. |
| Methods inherited from class org.oddjob.schedules.ConstrainedSchedule |
|---|
lastInterval, nextDue, nextInterval, shiftFromCalendar, shiftToCalendar |
| Methods inherited from class org.oddjob.schedules.AbstractSchedule |
|---|
getRefinement, setRefinement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Pattern DAY_FORMAT
| Constructor Detail |
|---|
public YearlySchedule()
| Method Detail |
|---|
public void setFromMonth(Month from)
public Month getFromMonth()
public void setToMonth(Month to)
public Month getToMonth()
public void setInMonth(Month in)
Property: inMonth
Description: The month in which this schedule is for. This has the same effect as setting fromMonth and toMonth to the same thing.
Required: No.
in - The in month.public void setFromDate(String from)
public String getFromDate()
public void setToDate(String to)
public String getToDate()
public void setOnDate(String on)
Property: onDate
Description: The day on which this schedule is for. This has the same effect as setting fromDate and toDate to the same thing.
Required: No.
on - The day on which this schedule is for.protected CalendarUnit intervalBetween()
ConstrainedSchedule
intervalBetween in class ConstrainedSchedule
protected Calendar fromCalendar(Date referenceDate,
TimeZone timeZone)
ConstrainedSchedule
fromCalendar in class ConstrainedSchedulereferenceDate - The date/time now.timeZone - The time zone.
protected Calendar toCalendar(Date referenceDate,
TimeZone timeZone)
ConstrainedSchedule
toCalendar in class ConstrainedSchedulereferenceDate - The date/time now.timeZone - The time zone.
public String toString()
toString in class ConstrainedSchedule
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||