/** Removes the task. */ public void remove() { startTask.cancel(); endTask.cancel(); calendarService.removeFromTaskMap(id); calendarService.removeFromCurrentItems(this); calendarService.updateStateFromCurrentItems(); }
/** Schedules the start and end tasks of the calendar item. */ public void scheduleTasks() { if (!executeNow) { timer.schedule(startTask, startDate); } else { startTask.run(); } timer.schedule(endTask, endDate); }