/** * <p> * Set the time at which the <code>DailyTimeIntervalTrigger</code> should occur. * </p> * * @exception IllegalArgumentException * if startTime is <code>null</code>. */ @Override public void setStartTime(Date startTime) { if (startTime == null) { throw new IllegalArgumentException("Start time cannot be null"); } Date eTime = getEndTime(); if (eTime != null && eTime.before(startTime)) { throw new IllegalArgumentException( "End time cannot be before start time"); } this.startTime = startTime; }
/** * <p> * Set the time at which the <code>DailyTimeIntervalTrigger</code> should occur. * </p> * * @exception IllegalArgumentException * if startTime is <code>null</code>. */ @Override public void setStartTime(Date startTime) { if (startTime == null) { throw new IllegalArgumentException("Start time cannot be null"); } Date eTime = getEndTime(); if (eTime != null && eTime.before(startTime)) { throw new IllegalArgumentException( "End time cannot be before start time"); } this.startTime = startTime; }
/** * <p> * Returns the final time at which the <code>DailyTimeIntervalTrigger</code> will * fire, if there is no end time set, null will be returned. * </p> * * <p> * Note that the return time may be in the past. * </p> */ @Override public Date getFinalFireTime() { if (complete || getEndTime() == null) { return null; } // We have an endTime, we still need to check to see if there is a endTimeOfDay if that's applicable. Date eTime = getEndTime(); if (endTimeOfDay != null) { Date endTimeOfDayDate = endTimeOfDay.getTimeOfDayForDate(eTime); if (eTime.getTime() < endTimeOfDayDate.getTime()) { eTime = endTimeOfDayDate; } } return eTime; }
/** * <p> * Returns the final time at which the <code>DailyTimeIntervalTrigger</code> will * fire, if there is no end time set, null will be returned. * </p> * * <p> * Note that the return time may be in the past. * </p> */ @Override public Date getFinalFireTime() { if (complete || getEndTime() == null) { return null; } // We have an endTime, we still need to check to see if there is a endTimeOfDay if that's applicable. Date eTime = getEndTime(); if (endTimeOfDay != null) { Date endTimeOfDayDate = endTimeOfDay.getTimeOfDayForDate(eTime); if (eTime.getTime() < endTimeOfDayDate.getTime()) { eTime = endTimeOfDayDate; } } return eTime; }
Date eTime = getEndTime(); if (eTime != null && fireTime.getTime() > eTime.getTime()) { return null;
Date eTime = getEndTime(); if (eTime != null && fireTime.getTime() > eTime.getTime()) { return null;