CodeReviews

Increment I

CalendarListview

  • Code explanation
    • The FrontendCalendarListview shows a list of calendar from the user on the mainpage. In this stage the panel shows just the list of calendar but later it should be possible to change the preferences, such as the color. The checkbox is going to be used for activating the calendar in other panels like dayview or weekview or something like that.

BasePageTest

  • Code explanation
    • The BasePageTest tests the mainpage of the application. The test extends WebicalApplicationTest which sets up the WicketTester before each test.

BasePageListeners

  • Code explanation
    • The FrontendCalendarListViewPanel has a few options. Two of those options are implemented in this increment. One is a link that enables to add a calendar from the frontend. And the other is to directly edit a calendar from the frontend. The listener of those links is in BasePage. It sends a message to the HeaderPanel to open the SettingsPanel. The SettingsPanel has to open a add or edit CalendarPanel.

Outcome

  • Extract wicket ids as String literals
  • Get rid of stacktraces
  • Remove all getters for Spring injected beans
  • Refactor Panel naming
  • Create listener interfaces for all interpanel communication
    • put control in the right place.
  • Move Session initialization to the webapplication class
  • If an authenticated user could not be found in the database a User object should be created and persited
  • Add more javadoc instead of references when methods are overriden

Increment III

Adding/Editing the events (backend)

    • Code explanation
      • In this method the events are refreshed in the database. The new/edited event is stored and then the entire calendar is written back to the webdav server. In order to make this work we had to fool arround a bit with the Hibernate Session to avoid DuplicateEntryExceptions and such. If the incomming event is new it is just stored, otherwise it is merged with the current session (the event orriginally came from a previous session set up by the OpenSessionInViewFilter).

Adding/Editing the events (frontend)

    • Code explanation
      • The situation is like this. If you want to edit an event which has recurence, you can choose for editing the entire serie or just this single occurence. If you wish to edit the entire serie, there is no problem. If you want to edit just this single occurence it goes like this. parameter gCalendar is passed in the constructor so you know for which day you want to edit an occurence. I create a new event which gets all the parameters of given event except the recurence. Is there a better way of doing so. Without knowing the exact parameters of the event. The given event gets stored in 'oldevent'
      • further more on submit you edit the oldEvent and give it an ExDate. You save the oldEvent. Next you save the new event.

Recurring events

  • Code location

  • Code explanation
    • This method checks if the event is valid for a given daterange. At first the method checks if the event is a recurrence event, if true: create an recur object with the rrule string as parameter. If the list is greater than 0. We have to check the date, because the event could be invalidated for this range by the exdate property or exrule property Otherwise the event is not valid for the given range. In case the event has no rrule property we just have to check if startdate and enddate are valid for the given daterange.

-- PaulMaarschalkerweerd - 04 Oct 2006

Topic revision: r7 - 07 Dec 2006 - 10:25:27 - IvoVanDongen
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback