public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new CalendarFolder(srv); } }, null);
public Object createServiceObjectWithServiceParam( ExchangeService srv) throws Exception { return new CalendarFolder(srv); } }, null);
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); } }