Class GoogleCalendarReader


public class GoogleCalendarReader extends GoogleApiReader
Reads the events of a Google Calendar, one record per event with its details, attendees, attachments, conference data and calendar properties.
  • Constructor Details

    • GoogleCalendarReader

      public GoogleCalendarReader(Credential credential, HttpTransport httpTransport)
      Creates a reader that uses the caller's transport, which is not shut down on close.
  • Method Details

    • getBatchSize

      public int getBatchSize()
      Returns the number of events requested per page (defaults to 50).
    • setBatchSize

      public GoogleCalendarReader setBatchSize(int batchSize)
      Sets the number of events requested per page, from 1 to 100 (defaults to 50).
    • getTimeMin

      public Date getTimeMin()
    • setTimeMin

      public GoogleCalendarReader setTimeMin(Date timeMin)
    • getTimeMax

      public Date getTimeMax()
    • setTimeMax

      public GoogleCalendarReader setTimeMax(Date timeMax)
    • getUpdatedMin

      public Date getUpdatedMin()
    • setUpdatedMin

      public GoogleCalendarReader setUpdatedMin(Date updatedMin)
    • getCalendarId

      public String getCalendarId()
      Returns the ID of the calendar to read (defaults to "primary").
    • setCalendarId

      public GoogleCalendarReader setCalendarId(String calendarId)
      Sets the ID of the calendar to read (defaults to "primary").
    • getOrderBy

      public String getOrderBy()
      Returns the order in which events are requested (defaults to "startTime").
    • setOrderBy

      public GoogleCalendarReader setOrderBy(String orderBy)
      Sets the order in which events are requested (defaults to "startTime").
    • isSingleEvent

      public boolean isSingleEvent()
      Indicates the singleEvents value of the events request (default is true).
    • setSingleEvent

      public GoogleCalendarReader setSingleEvent(boolean singleEvent)
      Indicates the singleEvents value of the events request (default is true).
    • isAlwaysIncludeEmail

      public boolean isAlwaysIncludeEmail()
      Indicates the alwaysIncludeEmail value of the events request (default is true).
    • setAlwaysIncludeEmail

      public GoogleCalendarReader setAlwaysIncludeEmail(boolean alwaysIncludeEmail)
      Indicates the alwaysIncludeEmail value of the events request (default is true).
    • getException

      public DataException getException()
      Returns the pending error recorded by this reader (such as a failed batch request) or null; the next read throws it.
    • open

      public void open() throws DataException
      Description copied from class: DataEndpoint
      Makes this endpoint ready for reading or writing.
      Overrides:
      open in class IntegrationReader
      Throws:
      DataException
    • close

      public void close() throws DataException
      Description copied from class: DataEndpoint
      Indicates that this endpoint has finished reading or writing.
      Overrides:
      close in class GoogleApiReader
      Throws:
      DataException
    • readImpl

      protected Record readImpl() throws Throwable
      Description copied from class: DataReader
      Overridden by subclasses to read the next record from this DataReader. The default implementation of DataReader.read() now insures that this method will not be called again after it returns a null.

      If no record is available, null will be returned.

      Contract for subclasses (see also docs/authoring/DataReader.md):

      Specified by:
      readImpl in class DataReader
      Throws:
      Throwable
    • addExceptionProperties

      public DataException addExceptionProperties(DataException exception)
      Description copied from class: Endpoint
      Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.
      Overrides:
      addExceptionProperties in class GoogleApiReader