@Override
public Collection<AppointmentDto> getAllAppointments(final DateTime startDate, final DateTime endDate)
throws Exception {
// Return a task for each calendar item
final Set<AppointmentDto> results = new HashSet<AppointmentDto>();
final CalendarView calendarView = new CalendarView(startDate.toDate(), endDate.toDate(), MAX_RESULTS);
calendarView.setPropertySet(createIdOnlyPropertySet());
final FindItemsResults<Appointment> appointments = service.findAppointments(WellKnownFolderName.Calendar, calendarView);
service.loadPropertiesForItems(appointments, createCalendarPropertySet());
for (final Appointment appointment : appointments.getItems()) {
DateTime eventStartDate = convertToJodaDateTime(appointment.getStart(), appointment.getIsAllDayEvent());
DateTime eventEndDate = convertToJodaDateTime(appointment.getEnd(), appointment.getIsAllDayEvent());