ese-unibe-ch/ese2011-team2 — Issue #11: Support repeated events
Author: retobg
Created: 2011-10-17 17:45:05+00:00
State: open

Implement basic structure to allow adding, editing and removing event series.

## Implementation proposal

* Extract Superclass CalendarEntry from Event, the class (I think) has all the methods of the current Event class so that Event becomes an Empty subclass, wherever currently Event is used we shall continue using Event.

Rationale: an EventSeries is not an Event, yet Event and EventSeries have many properties in common, this are moved to the common superclass CalendarEntry. An Event is a single thing, a CalendarEntry is anything that a container can contain.

* Create Class EventSeries which extends CalendarEntry with a field repetition which can have one of the following values (Enumeration): daily, weekly, yearly

* Add a method addEventSeries(EventSeries) to EseCalendar, same for removeEventSeries(EventSeries)

* Add a package visible method getSerialEventsForDay(Date) returning a sorted List of serial events of the day containing the point in time specified by the argument (in the default timezone). SerialEvent is a subclass of Event with a reference to the EventSeries it belongs to.

* Adapt the frontend and controller so that the form to create an event contains a field "repeat" with the options never|daily|weekly|yearly. For selections other than "never" instead of an Event and EventSeries is added to the calendar.

* Have EseCalandar.iterate(User,Date) mix in the serial events. For this an IteratorWrapper similar to ACFilteringIterator is created that uses the getSerialEventsForDay method.

* Adapt frontend/controller so that EventSeries are modified/removed when the user modifies/removes a SerialEvent, the user is warned that the operation affects the whole series.