| java.lang.Object org.quartz.impl.calendar.BaseCalendar org.quartz.impl.calendar.DailyCalendar
DailyCalendar | public class DailyCalendar extends BaseCalendar (Code) | | This implementation of the Calendar excludes (or includes - see below) a
specified time range each day. For example, you could use this calendar to
exclude business hours (8AM - 5PM) every day. Each DailyCalendar
only allows a single time range to be specified, and that time range may not
cross daily boundaries (i.e. you cannot specify a time range from 8PM - 5AM).
If the property invertTimeRange is false (default),
the time range defines a range of times in which triggers are not allowed to
fire. If invertTimeRange is true , the time range
is inverted – that is, all times outside the defined time range
are excluded.
Note when using DailyCalendar , it behaves on the same principals
as, for example,
org.quartz.impl.calendar.WeeklyCalendar WeeklyCalendar . WeeklyCalendar defines a set of days that are
excluded every week. Likewise, DailyCalendar defines a
set of times that are excluded every day.
author: Mike Funk, Aaron Craven |
Constructor Summary | |
public | DailyCalendar(String rangeStartingTime, String rangeEndingTime) Create a DailyCalendar with a time range defined by the
specified strings and no baseCalendar . | public | DailyCalendar(org.quartz.Calendar baseCalendar, String rangeStartingTime, String rangeEndingTime) Create a DailyCalendar with a time range defined by the
specified strings and the specified baseCalendar . | public | DailyCalendar(int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis) Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . | public | DailyCalendar(org.quartz.Calendar baseCalendar, int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis) Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . | public | DailyCalendar(Calendar rangeStartingCalendar, Calendar rangeEndingCalendar) Create a DailyCalendar with a time range defined by the
specified java.util.Calendar s and no
baseCalendar . | public | DailyCalendar(org.quartz.Calendar baseCalendar, Calendar rangeStartingCalendar, Calendar rangeEndingCalendar) Create a DailyCalendar with a time range defined by the
specified java.util.Calendar s and the specified
baseCalendar . | public | DailyCalendar(long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . | public | DailyCalendar(org.quartz.Calendar baseCalendar, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . | public | DailyCalendar(TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . | public | DailyCalendar(org.quartz.Calendar baseCalendar, TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . | public | DailyCalendar(String name, String rangeStartingTime, String rangeEndingTime) | public | DailyCalendar(String name, org.quartz.Calendar baseCalendar, String rangeStartingTime, String rangeEndingTime) | public | DailyCalendar(String name, int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis) | public | DailyCalendar(String name, org.quartz.Calendar baseCalendar, int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis) | public | DailyCalendar(String name, Calendar rangeStartingCalendar, Calendar rangeEndingCalendar) | public | DailyCalendar(String name, org.quartz.Calendar baseCalendar, Calendar rangeStartingCalendar, Calendar rangeEndingCalendar) | public | DailyCalendar(String name, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) | public | DailyCalendar(String name, org.quartz.Calendar baseCalendar, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) | public | DailyCalendar(String name, TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) | public | DailyCalendar(String name, org.quartz.Calendar baseCalendar, TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis) |
Method Summary | |
public boolean | getInvertTimeRange() Indicates whether the time range represents an inverted time range (see
class description). | public String | getName() | public long | getNextIncludedTime(long timeInMillis) Determines the next time included by the DailyCalendar
after the specified time. | public long | getTimeRangeEndingTimeInMillis(long timeInMillis) Returns the end time of the time range (in milliseconds) of the day
specified in timeInMillis
Parameters: timeInMillis - a time containing the desired date for the endingtime of the time range. | public long | getTimeRangeStartingTimeInMillis(long timeInMillis) Returns the start time of the time range (in milliseconds) of the day
specified in timeInMillis
Parameters: timeInMillis - a time containing the desired date for the startingtime of the time range. | public boolean | isTimeIncluded(long timeInMillis) | public void | setInvertTimeRange(boolean flag) Indicates whether the time range represents an inverted time range (see
class description). | public String | toString() |
serialVersionUID | final static long serialVersionUID(Code) | | |
DailyCalendar | public DailyCalendar(String rangeStartingTime, String rangeEndingTime)(Code) | | Create a DailyCalendar with a time range defined by the
specified strings and no baseCalendar .
rangeStartingTime and rangeEndingTime
must be in the format "HH:MM[:SS[:mmm]]" where:
- HH is the hour of the specified time. The hour should be
specified using military (24-hour) time and must be in the range
0 to 23.
- MM is the minute of the specified time and must be in the range
0 to 59.
- SS is the second of the specified time and must be in the range
0 to 59.
- mmm is the millisecond of the specified time and must be in the
range 0 to 999.
- items enclosed in brackets ('[', ']') are optional.
- The time range starting time must be before the time range ending
time. Note this means that a time range may not cross daily
boundaries (10PM - 2AM)
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: rangeStartingTime - a String representing the starting time for thetime range Parameters: rangeEndingTime - a String representing the ending time for thethe time range |
DailyCalendar | public DailyCalendar(org.quartz.Calendar baseCalendar, String rangeStartingTime, String rangeEndingTime)(Code) | | Create a DailyCalendar with a time range defined by the
specified strings and the specified baseCalendar .
rangeStartingTime and rangeEndingTime
must be in the format "HH:MM[:SS[:mmm]]" where:
- HH is the hour of the specified time. The hour should be
specified using military (24-hour) time and must be in the range
0 to 23.
- MM is the minute of the specified time and must be in the range
0 to 59.
- SS is the second of the specified time and must be in the range
0 to 59.
- mmm is the millisecond of the specified time and must be in the
range 0 to 999.
- items enclosed in brackets ('[', ']') are optional.
- The time range starting time must be before the time range ending
time. Note this means that a time range may not cross daily
boundaries (10PM - 2AM)
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: baseCalendar - the base calendar for this calendar instance– see BaseCalendar for moreinformation on base calendar functionality Parameters: rangeStartingTime - a String representing the starting time for thetime range Parameters: rangeEndingTime - a String representing the ending time for thetime range |
DailyCalendar | public DailyCalendar(int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . Values are subject to
the following validations:
- Hours must be in the range 0-23 and are expressed using military
(24-hour) time.
- Minutes must be in the range 0-59
- Seconds must be in the range 0-59
- Milliseconds must be in the range 0-999
- The time range starting time must be before the time range ending
time. Note this means that a time range may not cross daily
boundaries (10PM - 2AM)
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: rangeStartingHourOfDay - the hour of the start of the time range Parameters: rangeStartingMinute - the minute of the start of the time range Parameters: rangeStartingSecond - the second of the start of the time range Parameters: rangeStartingMillis - the millisecond of the start of the time range Parameters: rangeEndingHourOfDay - the hour of the end of the time range Parameters: rangeEndingMinute - the minute of the end of the time range Parameters: rangeEndingSecond - the second of the end of the time range Parameters: rangeEndingMillis - the millisecond of the start of the time range |
DailyCalendar | public DailyCalendar(org.quartz.Calendar baseCalendar, int rangeStartingHourOfDay, int rangeStartingMinute, int rangeStartingSecond, int rangeStartingMillis, int rangeEndingHourOfDay, int rangeEndingMinute, int rangeEndingSecond, int rangeEndingMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . Values are
subject to the following validations:
- Hours must be in the range 0-23 and are expressed using military
(24-hour) time.
- Minutes must be in the range 0-59
- Seconds must be in the range 0-59
- Milliseconds must be in the range 0-999
- The time range starting time must be before the time range ending
time. Note this means that a time range may not cross daily
boundaries (10PM - 2AM)
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: baseCalendar - the base calendar for this calendarinstance – see BaseCalendar for more information on base calendar functionality Parameters: rangeStartingHourOfDay - the hour of the start of the time range Parameters: rangeStartingMinute - the minute of the start of the time range Parameters: rangeStartingSecond - the second of the start of the time range Parameters: rangeStartingMillis - the millisecond of the start of the time range Parameters: rangeEndingHourOfDay - the hour of the end of the time range Parameters: rangeEndingMinute - the minute of the end of the time range Parameters: rangeEndingSecond - the second of the end of the time range Parameters: rangeEndingMillis - the millisecond of the start of the time range |
DailyCalendar | public DailyCalendar(Calendar rangeStartingCalendar, Calendar rangeEndingCalendar)(Code) | | Create a DailyCalendar with a time range defined by the
specified java.util.Calendar s and no
baseCalendar . The Calendars are subject to the following
considerations:
- Only the time-of-day fields of the specified Calendars will be
used (the date fields will be ignored)
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time fields are
are used, it is possible for two Calendars to represent a valid
time range and
rangeStartingCalendar.after(rangeEndingCalendar) ==
true )
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: rangeStartingCalendar - a java.util.Calendar representing the starting time for the time range Parameters: rangeEndingCalendar - a java.util.Calendar representing the endingtime for the time range |
DailyCalendar | public DailyCalendar(org.quartz.Calendar baseCalendar, Calendar rangeStartingCalendar, Calendar rangeEndingCalendar)(Code) | | Create a DailyCalendar with a time range defined by the
specified java.util.Calendar s and the specified
baseCalendar . The Calendars are subject to the following
considerations:
- Only the time-of-day fields of the specified Calendars will be
used (the date fields will be ignored)
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time fields are
are used, it is possible for two Calendars to represent a valid
time range and
rangeStartingCalendar.after(rangeEndingCalendar) ==
true )
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone)
Parameters: baseCalendar - the base calendar for this calendar instance– see BaseCalendar for more information on base calendar functionality Parameters: rangeStartingCalendar - a java.util.Calendar representing the starting time for the time range Parameters: rangeEndingCalendar - a java.util.Calendar representing the endingtime for the time range |
DailyCalendar | public DailyCalendar(long rangeStartingTimeInMillis, long rangeEndingTimeInMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . The values are
subject to the following considerations:
- Only the time-of-day portion of the specified values will be
used
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time value are
are used, it is possible for the two values to represent a valid
time range and
rangeStartingTime >
rangeEndingTime )
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone) .
You should use
DailyCalendar.DailyCalendar(String,TimeZone,long,long)
if you don't want the given rangeStartingTimeInMillis and
rangeEndingTimeInMillis to be evaluated in the default
time zone.
Parameters: rangeStartingTimeInMillis - a long representing the starting time for the time range Parameters: rangeEndingTimeInMillis - a long representing the ending time forthe time range |
DailyCalendar | public DailyCalendar(org.quartz.Calendar baseCalendar, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . The values
are subject to the following considerations:
- Only the time-of-day portion of the specified values will be
used
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time value are
are used, it is possible for the two values to represent a valid
time range and
rangeStartingTime >
rangeEndingTime )
Note: This DailyCalendar will use the
TimeZone.getDefault time zone unless an explicit
time zone is set via
BaseCalendar.setTimeZone(TimeZone) .
You should use
DailyCalendar.DailyCalendar(String,Calendar,TimeZone,long,long)
if you don't want the given rangeStartingTimeInMillis and
rangeEndingTimeInMillis to be evaluated in the default
time zone.
Parameters: baseCalendar - the base calendar for this calendarinstance – see BaseCalendar for more information on base calendar functionality Parameters: rangeStartingTimeInMillis - a long representing the starting time for the time range Parameters: rangeEndingTimeInMillis - a long representing the ending time forthe time range |
DailyCalendar | public DailyCalendar(TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and no baseCalendar . The values are
subject to the following considerations:
- Only the time-of-day portion of the specified values will be
used
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time value are
are used, it is possible for the two values to represent a valid
time range and
rangeStartingTime >
rangeEndingTime )
Parameters: timeZone - the time zone for of the DailyCalendar which will also be used to resolve the given start/end times. Parameters: rangeStartingTimeInMillis - a long representing the starting time for the time range Parameters: rangeEndingTimeInMillis - a long representing the ending time forthe time range |
DailyCalendar | public DailyCalendar(org.quartz.Calendar baseCalendar, TimeZone timeZone, long rangeStartingTimeInMillis, long rangeEndingTimeInMillis)(Code) | | Create a DailyCalendar with a time range defined by the
specified values and the specified baseCalendar . The values
are subject to the following considerations:
- Only the time-of-day portion of the specified values will be
used
- The starting time must be before the ending time of the defined
time range. Note this means that a time range may not cross
daily boundaries (10PM - 2AM). (because only time value are
are used, it is possible for the two values to represent a valid
time range and
rangeStartingTime >
rangeEndingTime )
Parameters: baseCalendar - the base calendar for this calendarinstance – see BaseCalendar for more information on base calendar functionality Parameters: timeZone - the time zone for of the DailyCalendar which will also be used to resolve the given start/end times. Parameters: rangeStartingTimeInMillis - a long representing the starting time for the time range Parameters: rangeEndingTimeInMillis - a long representing the ending time forthe time range |
getInvertTimeRange | public boolean getInvertTimeRange()(Code) | | Indicates whether the time range represents an inverted time range (see
class description).
a boolean indicating whether the time range is inverted |
getName | public String getName()(Code) | | Returns the name of the DailyCalendar
the name of the DailyCalendar |
getNextIncludedTime | public long getNextIncludedTime(long timeInMillis)(Code) | | Determines the next time included by the DailyCalendar
after the specified time.
Parameters: timeInMillis - the initial date/time after which to find an included time the time in milliseconds representing the next time includedafter the specified time. |
getTimeRangeEndingTimeInMillis | public long getTimeRangeEndingTimeInMillis(long timeInMillis)(Code) | | Returns the end time of the time range (in milliseconds) of the day
specified in timeInMillis
Parameters: timeInMillis - a time containing the desired date for the endingtime of the time range. a date/time (in milliseconds) representing the end time of thetime range for the specified date. |
getTimeRangeStartingTimeInMillis | public long getTimeRangeStartingTimeInMillis(long timeInMillis)(Code) | | Returns the start time of the time range (in milliseconds) of the day
specified in timeInMillis
Parameters: timeInMillis - a time containing the desired date for the startingtime of the time range. a date/time (in milliseconds) representing the start time of thetime range for the specified date. |
isTimeIncluded | public boolean isTimeIncluded(long timeInMillis)(Code) | | Determines whether the given time (in milliseconds) is 'included' by the
BaseCalendar
Parameters: timeInMillis - the date/time to test a boolean indicating whether the specified time is 'included' bythe BaseCalendar |
setInvertTimeRange | public void setInvertTimeRange(boolean flag)(Code) | | Indicates whether the time range represents an inverted time range (see
class description).
Parameters: flag - the new value for the invertTimeRange flag. |
toString | public String toString()(Code) | | Returns a string representing the properties of the
DailyCalendar
the properteis of the DailyCalendar in a String format |
Fields inherited from org.quartz.impl.calendar.BaseCalendar | final static long serialVersionUID(Code)(Java Doc)
|
|
|