Пример #1
1
 /** Removes the task. */
 public void remove() {
   startTask.cancel();
   endTask.cancel();
   calendarService.removeFromTaskMap(id);
   calendarService.removeFromCurrentItems(this);
   calendarService.updateStateFromCurrentItems();
 }
Пример #2
0
 /** This method is executed in the end of the calendar item. */
 protected void stop() {
   calendarService.removeFromTaskMap(id);
   calendarService.removeFromCurrentItems(this);
   calendarService.updateStateFromCurrentItems();
   if (pattern != null) {
     CalendarItemTimerTask nextTask = pattern.next(startDate, endDate);
     this.pattern = null;
     nextTask.scheduleTasks();
   }
 }