/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param id the id * @return A CalendarFolder instance representing the calendar folder * corresponding to the specified Id * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, FolderId id) throws Exception { return CalendarFolder.bind(service, id, PropertySet .getFirstClassProperties()); }
/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param name the name * @param propertySet the property set * @return A CalendarFolder instance representing the calendar folder with * the specified name. * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, WellKnownFolderName name, PropertySet propertySet) throws Exception { return CalendarFolder.bind(service, new FolderId(name), propertySet); }
/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param name the name * @return A CalendarFolder instance representing the calendar folder with * the specified name. * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, WellKnownFolderName name) throws Exception { return CalendarFolder.bind(service, new FolderId(name), PropertySet .getFirstClassProperties()); }
/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param id the id * @return A CalendarFolder instance representing the calendar folder * corresponding to the specified Id * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, FolderId id) throws Exception { return CalendarFolder.bind(service, id, PropertySet .getFirstClassProperties()); }
/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param name the name * @param propertySet the property set * @return A CalendarFolder instance representing the calendar folder with * the specified name. * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, WellKnownFolderName name, PropertySet propertySet) throws Exception { return CalendarFolder.bind(service, new FolderId(name), propertySet); }
private CalendarFolder createCalendar(String calendarName) { try { LOG.info(String.format("Trying to create new calendar with name '%s'", calendarName)); CalendarFolder folder = new CalendarFolder(exchangeService); folder.setDisplayName(calendarName); folder.save(WellKnownFolderName.Calendar); LOG.info(String.format("New calendar folder '%s' created.", calendarName)); return CalendarFolder.bind(exchangeService, folder.getId()); } catch (Exception ex) { // NOSONAR - EWS Java API throws Exception, that's life throw new CalendarNotCreatedException(String.format("Exchange calendar '%s' could not be created", calendarName), ex); } }
/** * Binds to an existing calendar folder and loads the specified set of * property. Calling this method results in a call to EWS. * * @param service the service * @param name the name * @return A CalendarFolder instance representing the calendar folder with * the specified name. * @throws Exception the exception */ public static CalendarFolder bind(ExchangeService service, WellKnownFolderName name) throws Exception { return CalendarFolder.bind(service, new FolderId(name), PropertySet .getFirstClassProperties()); }