Interface CalendarOperations
-
- All Known Implementing Classes:
CalendarTemplate
public interface CalendarOperationsInterface defining operations for integrating with Google Calendar.
See the reference documentation at http://developers.google.com/google-apps/calendar/v3/reference/.
Requires one of the following OAuth scope(s):- https://www.googleapis.com/auth/calendar.readonly
- https://www.googleapis.com/auth/calendar
- Author:
- Martin Wink
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIMARY_CALENDAR_IDThe identifier for the user's primary calendar.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CalendarListQueryBuildercalendarListQuery()Create a builder pattern object for refining a query that lists the calendars that are accessible to the authenticated user.voiddeleteEvent(String calendarId, String eventId, boolean sendNotifications)Delete an existing event.EventListQueryBuildereventListQuery(String calendarId)Create a builder pattern object for refining a query that lists the events that are accessible to the authenticated user.CalendargetCalendar(String calendarId)Fetch a calendar from the user's calendar list.EventgetEvent(String calendarId, String eventId)Fetch an event from the specified calendar.EventquickAddEvent(String calendarId, String specification, boolean sendNotifications)Create a new event in the specified calendar, based on the specification text.voidupdateEvent(String calendarId, Event event, boolean sendNotifications)Update an existing event.
-
-
-
Field Detail
-
PRIMARY_CALENDAR_ID
static final String PRIMARY_CALENDAR_ID
The identifier for the user's primary calendar.- See Also:
- Constant Field Values
-
-
Method Detail
-
calendarListQuery
CalendarListQueryBuilder calendarListQuery()
Create a builder pattern object for refining a query that lists the calendars that are accessible to the authenticated user.- Returns:
- a query builder for listing calendars.
-
getCalendar
Calendar getCalendar(String calendarId)
Fetch a calendar from the user's calendar list.- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.- Returns:
- the calendar.
-
eventListQuery
EventListQueryBuilder eventListQuery(String calendarId)
Create a builder pattern object for refining a query that lists the events that are accessible to the authenticated user.- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.- Returns:
- a query builder for listing events.
-
getEvent
Event getEvent(String calendarId, String eventId)
Fetch an event from the specified calendar.- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.eventId- the event's identifier.- Returns:
- the event.
-
quickAddEvent
Event quickAddEvent(String calendarId, String specification, boolean sendNotifications)
Create a new event in the specified calendar, based on the specification text.- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.specification- text describing the event to be created.sendNotifications- whether to send notifications about the creation of the event.- Returns:
- the new event.
-
deleteEvent
void deleteEvent(String calendarId, String eventId, boolean sendNotifications)
Delete an existing event.- Parameters:
calendarId- the identifier of the calendar containing the event. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.eventId- the event's identifier.sendNotifications- whether to send notifications about the deletion of the event.
-
updateEvent
void updateEvent(String calendarId, Event event, boolean sendNotifications)
Update an existing event.- Parameters:
calendarId- The identifier of the calendar containing the event. The special identifier "primary" (PRIMARY_CALENDAR_ID) may be used.event- The event to update.sendNotifications- Whether to send notifications about the update to the event.
-
-