Example #1
1
 /** Removes the task. */
 public void remove() {
   startTask.cancel();
   endTask.cancel();
   calendarService.removeFromTaskMap(id);
   calendarService.removeFromCurrentItems(this);
   calendarService.updateStateFromCurrentItems();
 }
Example #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();
   }
 }
Example #3
0
 /** This method is executed in the beginning of the calendar item. */
 protected void start() {
   calendarService.addToCurrentItems(this);
   calendarService.updateStateFromCurrentItems();
 }