# Class MicrosoftCalendarSource

java.lang.Object
com.codename1.calendar.CalendarSource
com.codename1.calendar.OAuthCalendarSource
com.codename1.calendar.MicrosoftCalendarSource

public class MicrosoftCalendarSource extends OAuthCalendarSource
Microsoft Graph calendar and Microsoft To Do source. No client secret or refresh token is stored by this class.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `SCOPE_CALENDARS`
  `static final String`
  `SCOPE_TASKS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MicrosoftCalendarSource(CalendarTokenProvider tokens)`
  `MicrosoftCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AsyncResource<Boolean>`
  `deleteCalendar(CalendarInfo calendar)`
  Deletes a calendar or task list.
  `AsyncResource<Boolean>`
  `deleteCalendar(String calendarId)`
  `AsyncResource<Boolean>`
  `deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)`
  `AsyncResource<Boolean>`
  `deleteTask(String list, String id, CalendarMutationScope scope, String version)`
  `CalendarCapabilities`
  `getCapabilities()`
  `AsyncResource<CalendarEvent>`
  `getEvent(String calendarId, String eventId)`
  `AsyncResource<CalendarTask>`
  `getTask(String list, String id)`
  `AsyncResource<CalendarPage<CalendarInfo>>`
  `listCalendars(CalendarInfo.ContentType type, String pageToken)`
  `AsyncResource<CalendarPage<CalendarEvent>>`
  `queryEvents(CalendarQuery query)`
  `AsyncResource<List<FreeBusyInterval>>`
  `queryFreeBusy(List<String> ids, Instant start, Instant end)`
  `AsyncResource<CalendarPage<CalendarTask>>`
  `queryTasks(CalendarQuery query)`
  `AsyncResource<CalendarEvent>`
  `respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)`
  `AsyncResource<CalendarInfo>`
  `saveCalendar(CalendarInfo calendar)`
  `AsyncResource<CalendarEvent>`
  `saveEvent(CalendarEvent event, CalendarMutationScope scope)`
  `AsyncResource<CalendarTask>`
  `saveTask(CalendarTask task, CalendarMutationScope scope)`

  ### Methods inherited from class OAuthCalendarSource

  `getAuthorizationStatus, json, raw, requestAuthorization`

  ### Methods inherited from class CalendarSource

  `addChangeListener, completed, fireChange, getDisplayName, getId, isAvailable, removeChangeListener, unavailable, unsupported`

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### SCOPE_CALENDARS

    public static final String SCOPE_CALENDARS
    See Also:
      - Constant Field Values

  - ### SCOPE_TASKS

    public static final String SCOPE_TASKS
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### MicrosoftCalendarSource

    public MicrosoftCalendarSource(CalendarTokenProvider tokens)

  - ### MicrosoftCalendarSource

    public MicrosoftCalendarSource(CalendarTokenProvider tokens, CalendarHttpTransport transport)

- ## Method Details

  - ### getCapabilities

    public CalendarCapabilities getCapabilities()
    Overrides:
      `getCapabilities` in class `CalendarSource`

  - ### listCalendars

    public AsyncResource<CalendarPage<CalendarInfo>> listCalendars(CalendarInfo.ContentType type, String pageToken)
    Overrides:
      `listCalendars` in class `CalendarSource`

  - ### saveCalendar

    public AsyncResource<CalendarInfo> saveCalendar(CalendarInfo calendar)
    Overrides:
      `saveCalendar` in class `CalendarSource`

  - ### deleteCalendar

    public AsyncResource<Boolean> deleteCalendar(String calendarId)
    Overrides:
      `deleteCalendar` in class `CalendarSource`

  - ### deleteCalendar

    public AsyncResource<Boolean> deleteCalendar(CalendarInfo calendar)
    Description copied from class: `CalendarSource`
    Deletes a calendar or task list. Sources that expose both use the content type to select the correct provider endpoint.
    Overrides:
      `deleteCalendar` in class `CalendarSource`

  - ### queryEvents

    public AsyncResource<CalendarPage<CalendarEvent>> queryEvents(CalendarQuery query)
    Overrides:
      `queryEvents` in class `CalendarSource`

  - ### getEvent

    public AsyncResource<CalendarEvent> getEvent(String calendarId, String eventId)
    Overrides:
      `getEvent` in class `CalendarSource`

  - ### saveEvent

    public AsyncResource<CalendarEvent> saveEvent(CalendarEvent event, CalendarMutationScope scope)
    Overrides:
      `saveEvent` in class `CalendarSource`

  - ### deleteEvent

    public AsyncResource<Boolean> deleteEvent(String calendarId, String eventId, CalendarMutationScope scope, String version)
    Overrides:
      `deleteEvent` in class `CalendarSource`

  - ### respondToEvent

    public AsyncResource<CalendarEvent> respondToEvent(String calendarId, String eventId, CalendarAttendee.Response response, String comment)
    Overrides:
      `respondToEvent` in class `CalendarSource`

  - ### queryFreeBusy

    public AsyncResource<List<FreeBusyInterval>> queryFreeBusy(List<String> ids, Instant start, Instant end)
    Overrides:
      `queryFreeBusy` in class `CalendarSource`

  - ### queryTasks

    public AsyncResource<CalendarPage<CalendarTask>> queryTasks(CalendarQuery query)
    Overrides:
      `queryTasks` in class `CalendarSource`

  - ### getTask

    public AsyncResource<CalendarTask> getTask(String list, String id)
    Overrides:
      `getTask` in class `CalendarSource`

  - ### saveTask

    public AsyncResource<CalendarTask> saveTask(CalendarTask task, CalendarMutationScope scope)
    Overrides:
      `saveTask` in class `CalendarSource`

  - ### deleteTask

    public AsyncResource<Boolean> deleteTask(String list, String id, CalendarMutationScope scope, String version)
    Overrides:
      `deleteTask` in class `CalendarSource`