org.pentaho.platform.scheduler2.quartz
Class QuartzSchedulerAvailability

java.lang.Object
  extended by org.quartz.impl.calendar.BaseCalendar
      extended by org.pentaho.platform.scheduler2.quartz.QuartzSchedulerAvailability
All Implemented Interfaces:
Serializable, org.quartz.Calendar

public class QuartzSchedulerAvailability
extends org.quartz.impl.calendar.BaseCalendar

Implementation of a Quartz calendar. Note that unlike typical Quartz calendars in which you specify when the trigger is not allowed to fire, when constructing this calendar you specify when the trigger is allowed to fire.

Author:
arodriguez
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.quartz.Calendar
MONTH
 
Constructor Summary
QuartzSchedulerAvailability(Date startTime, Date endTime)
          Creates a quartz calender which is used to indicate when a trigger is allowed to fire.
 
Method Summary
 Date getEndTime()
           
 long getNextIncludedTime(long arg0)
          
 Date getStartTime()
           
 boolean isTimeIncluded(long arg0)
          
 
Methods inherited from class org.quartz.impl.calendar.BaseCalendar
buildHoliday, buildHoliday, getBaseCalendar, getDescription, getJavaCalendar, setBaseCalendar, setDescription
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuartzSchedulerAvailability

public QuartzSchedulerAvailability(Date startTime,
                                   Date endTime)
Creates a quartz calender which is used to indicate when a trigger is allowed to fire. The trigger will be allowed to fire between the start date and end date.

Parameters:
startTime - the earliest time at which the trigger may fire. If null the trigger may fire immediately.
endTime - the last date at which the trigger may fire. If null the trigger may fire indefinitely.
Method Detail

getNextIncludedTime

public long getNextIncludedTime(long arg0)

Specified by:
getNextIncludedTime in interface org.quartz.Calendar
Overrides:
getNextIncludedTime in class org.quartz.impl.calendar.BaseCalendar

isTimeIncluded

public boolean isTimeIncluded(long arg0)

Specified by:
isTimeIncluded in interface org.quartz.Calendar
Overrides:
isTimeIncluded in class org.quartz.impl.calendar.BaseCalendar

getStartTime

public Date getStartTime()

getEndTime

public Date getEndTime()