public List<CalDAVCalendar> getSubscribedCalendars() { if (subscribedCalendars == null) { try { subscribedCalendars = calendarManagementService.getSubscribedCalendars(getIwc().getCurrentUser(), -1, -1); } catch (Exception e) { getLogger().log(Level.WARNING, "Error getting subscribed calendars for current user", e); subscribedCalendars = Collections.emptyList(); } } getLogger().info("Calendars user is subscribed to: " + subscribedCalendars); return subscribedCalendars; }
public Collection<CalDAVCalendar> getAvailableCalendars() { if (availableCalendars == null) { try { availableCalendars = calendarManagementService.getVisibleSubscriptions(getIwc().getCurrentUser(), -1, -1); } catch (Exception e) { getLogger().log(Level.WARNING, "Error getting available calendars for current user", e); availableCalendars = Collections.emptyList(); } } getLogger().info("Available calendars: " + availableCalendars); return availableCalendars; }