|
||||||||
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.WeeklySchedule
public final class WeeklySchedule
TimeSchedule
refinement property.
The days of the week are specified according to the ISO 8601 standard with Monday being day 1 and Sunday being day 7, or as one of MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY (case insensitive).
<schedules:weekly on="Tuesday" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"/>
<schedules:weekly from="Friday" to="Monday" xmlns:schedules="http://rgordon.co.uk/oddjob/schedules"> <refinement> <schedules:daily at="15:45"/> </refinement> </schedules:weekly>
Constructor Summary | |
---|---|
WeeklySchedule()
|
Method Summary | |
---|---|
protected Calendar |
fromCalendar(Date referenceDate,
TimeZone timeZone)
Provide a Calendar for the start of the constraint. |
DayOfWeek |
getFrom()
|
DayOfWeek |
getTo()
|
protected CalendarUnit |
intervalBetween()
Sub classes must provide a unit which is what must be added to move the schedule on. |
void |
setFrom(DayOfWeek from)
|
void |
setOn(DayOfWeek on)
|
void |
setTo(DayOfWeek 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 |
Constructor Detail |
---|
public WeeklySchedule()
Method Detail |
---|
public void setFrom(DayOfWeek from)
Property: from
Description: The from day of the week.
Required: No. Defaults to Monday.
from
- The from date.public DayOfWeek getFrom()
public void setTo(DayOfWeek to)
Property: to
Description: The to day of the week.
Required: No. Defaults to Sunday.
to
- The to day.public DayOfWeek getTo()
public void setOn(DayOfWeek on)
Property: on
Description: The on day of week. This has the same effect as setting from and to to the same thing.
Required: No.
on
- The on text.protected CalendarUnit intervalBetween()
ConstrainedSchedule
intervalBetween
in class ConstrainedSchedule
protected Calendar fromCalendar(Date referenceDate, TimeZone timeZone)
ConstrainedSchedule
fromCalendar
in class ConstrainedSchedule
referenceDate
- The date/time now.timeZone
- The time zone.
protected Calendar toCalendar(Date referenceDate, TimeZone timeZone)
ConstrainedSchedule
toCalendar
in class ConstrainedSchedule
referenceDate
- 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 |