org.oddjob.schedules.schedules
Class DayOfWeekSchedule
java.lang.Object
org.oddjob.schedules.AbstractSchedule
org.oddjob.schedules.ConstrainedSchedule
org.oddjob.schedules.schedules.DayOfWeekSchedule
- All Implemented Interfaces:
- RefineableSchedule, Schedule, java.io.Serializable
- public final class DayOfWeekSchedule
- extends ConstrainedSchedule
- implements java.io.Serializable
- Description:
- A schedule for the days of the week.
- Example:
<dayofweek on="TUE"/>
- See Also:
- Serialized Form
- Author:
- Rob Gordon
|
Method Summary |
java.util.Date |
getEndDate(ScheduleContext context)
For the given time, calculate when this schedule
interval should finish. |
java.lang.String |
getFrom()
Get the from date/time as a String. |
java.util.Date |
getStartDate(ScheduleContext context)
For the given time, calculate when this schedule
should start or should have started. |
java.lang.String |
getTo()
Get the to date/time as a String. |
void |
setFrom(java.lang.String from)
|
void |
setTo(java.lang.String to)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DayOfWeekSchedule
public DayOfWeekSchedule()
setFrom
public void setFrom(java.lang.String from)
- Specified by:
setFrom in class ConstrainedSchedule
- Oddjob Property:
- from
- Description:
- The from day of the week.
- Required:
- No. Default to the start of the week. This is
region specific.
- Parameters:
from - The from date.
getFrom
public java.lang.String getFrom()
- Description copied from class:
ConstrainedSchedule
- Get the from date/time as a String.
- Specified by:
getFrom in class ConstrainedSchedule
- Returns:
- The from date.
setTo
public void setTo(java.lang.String to)
- Specified by:
setTo in class ConstrainedSchedule
- Oddjob Property:
- to
- Description:
- The to day of the week.
- Required:
- No. Defaults to the last day of the week.
This is region specific.
- Parameters:
to - The to day.
getTo
public java.lang.String getTo()
- Description copied from class:
ConstrainedSchedule
- Get the to date/time as a String.
- Specified by:
getTo in class ConstrainedSchedule
- Returns:
- The to date.
getStartDate
public java.util.Date getStartDate(ScheduleContext context)
- Description copied from class:
ConstrainedSchedule
- For the given time, calculate when this schedule
should start or should have started.
- Specified by:
getStartDate in class ConstrainedSchedule
- Returns:
- The date/time the scheudle is/was due.
getEndDate
public java.util.Date getEndDate(ScheduleContext context)
- Description copied from class:
ConstrainedSchedule
- For the given time, calculate when this schedule
interval should finish.
- Specified by:
getEndDate in class ConstrainedSchedule
- Returns:
- The date/time the schedule should finish.