/** * Obtains a list of appointments by searching the contents of a specific * folder. Calling this method results in a call to EWS. * * @param parentFolderName the parent folder name * @param calendarView the calendar view * @return A collection of appointments representing the contents of the * specified folder. * @throws Exception the exception */ public FindItemsResults<Appointment> findAppointments( WellKnownFolderName parentFolderName, CalendarView calendarView) throws Exception { return this.findAppointments(new FolderId(parentFolderName), calendarView); }
/** * Obtains a list of appointments by searching the contents of a specific * folder. Calling this method results in a call to EWS. * * @param parentFolderName the parent folder name * @param calendarView the calendar view * @return A collection of appointments representing the contents of the * specified folder. * @throws Exception the exception */ public FindItemsResults<Appointment> findAppointments( WellKnownFolderName parentFolderName, CalendarView calendarView) throws Exception { return this.findAppointments(new FolderId(parentFolderName), calendarView); }
final CalendarView calendarView = new CalendarView(startDate.toDate(), endDate.toDate(), MAX_RESULTS); calendarView.setPropertySet(createIdOnlyPropertySet()); final FindItemsResults<Appointment> appointments = service.findAppointments(WellKnownFolderName.Calendar, calendarView); final Iterable<Item> items = new ArrayList<Item>(appointments.getItems());