public abstract class CalendarSource

  1. Object
  2. CalendarSource

Known subtypesCalDavCalendarSource, LocalCalendarSource, OAuthCalendarSource

Base contract shared by local stores and online providers.

Constructors

protected CalendarSource(String id, String displayName)

Methods

public final String getId()
public final String getDisplayName()
public boolean isAvailable()
public CalendarCapabilities getCapabilities()
public CalendarAuthorizationStatus getAuthorizationStatus(CalendarAccess access)
public AsyncResource<CalendarAuthorizationStatus> requestAuthorization(CalendarAccess access)
public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)
public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)
public AsyncResource<Boolean> deleteCalendar(String calendarId)
public AsyncResource<Boolean> deleteCalendar(CalendarInfo calendar)Deletes a calendar or task list.
public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)
public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)
public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)
public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)
public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)
public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> calendarIds, Instant startTime, Instant endTime)
public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)
public AsyncResource<CalendarTask> getTask(String calendarId, String taskId)
public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)
public AsyncResource<Boolean> deleteTask(String calendarId, String taskId, CalendarMutationScope scope, String version)
public final synchronized void addChangeListener(CalendarChangeListener listener)
public final synchronized void removeChangeListener(CalendarChangeListener listener)
protected final void fireChange(CalendarChange change)
protected static <T> AsyncResource<T> unsupported(String operation)
protected static <T> AsyncResource<T> unavailable(String message)
protected static <T> AsyncResource<T> completed(T value)

Inherited methods

Constructor details

CalendarSource

protected CalendarSource(String id, String displayName)

Method details

getId

public final String getId()

getDisplayName

public final String getDisplayName()

isAvailable

public boolean isAvailable()

getCapabilities

public CalendarCapabilities getCapabilities()

getAuthorizationStatus

public CalendarAuthorizationStatus getAuthorizationStatus(CalendarAccess access)

requestAuthorization

public AsyncResource<CalendarAuthorizationStatus> requestAuthorization(CalendarAccess access)

listCalendars

public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)

saveCalendar

public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)

deleteCalendar

public AsyncResource<Boolean> deleteCalendar(String calendarId)

deleteCalendar

public AsyncResource<Boolean> deleteCalendar(CalendarInfo calendar)
Deletes a calendar or task list. Sources that expose both use the content type to select the correct provider endpoint.

queryEvents

public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)

getEvent

public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)

saveEvent

public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)

deleteEvent

public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)

respondToEvent

public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)

queryFreeBusy

public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> calendarIds, Instant startTime, Instant endTime)

queryTasks

public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)

getTask

public AsyncResource<CalendarTask> getTask(String calendarId, String taskId)

saveTask

public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)

deleteTask

public AsyncResource<Boolean> deleteTask(String calendarId, String taskId, CalendarMutationScope scope, String version)

addChangeListener

public final synchronized void addChangeListener(CalendarChangeListener listener)

removeChangeListener

public final synchronized void removeChangeListener(CalendarChangeListener listener)

fireChange

protected final void fireChange(CalendarChange change)

unsupported

protected static <T> AsyncResource<T> unsupported(String operation)

unavailable

protected static <T> AsyncResource<T> unavailable(String message)

completed

protected static <T> AsyncResource<T> completed(T value)