Class CalendarTemplate
- java.lang.Object
-
- org.springframework.social.google.api.impl.AbstractGoogleApiOperations
-
- org.springframework.social.google.api.calendar.impl.CalendarTemplate
-
- All Implemented Interfaces:
CalendarOperations
public class CalendarTemplate extends AbstractGoogleApiOperations implements CalendarOperations
CalendarOperationsimplementation.- Author:
- Martin Wink
-
-
Field Summary
-
Fields inherited from class org.springframework.social.google.api.impl.AbstractGoogleApiOperations
isAuthorized, restTemplate
-
Fields inherited from interface org.springframework.social.google.api.calendar.CalendarOperations
PRIMARY_CALENDAR_ID
-
-
Constructor Summary
Constructors Constructor Description CalendarTemplate(org.springframework.web.client.RestTemplate restTemplate, boolean isAuthorized)
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class org.springframework.social.google.api.impl.AbstractGoogleApiOperations
deleteEntity, deleteEntity, getEntity, patch, requireAuthorization, saveEntity
-
-
-
-
Method Detail
-
calendarListQuery
public CalendarListQueryBuilder calendarListQuery()
Description copied from interface:CalendarOperationsCreate a builder pattern object for refining a query that lists the calendars that are accessible to the authenticated user.- Specified by:
calendarListQueryin interfaceCalendarOperations- Returns:
- a query builder for listing calendars.
-
eventListQuery
public EventListQueryBuilder eventListQuery(String calendarId)
Description copied from interface:CalendarOperationsCreate a builder pattern object for refining a query that lists the events that are accessible to the authenticated user.- Specified by:
eventListQueryin interfaceCalendarOperations- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (CalendarOperations.PRIMARY_CALENDAR_ID) may be used.- Returns:
- a query builder for listing events.
-
getCalendar
public Calendar getCalendar(String calendarId)
Description copied from interface:CalendarOperationsFetch a calendar from the user's calendar list.- Specified by:
getCalendarin interfaceCalendarOperations- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (CalendarOperations.PRIMARY_CALENDAR_ID) may be used.- Returns:
- the calendar.
-
getEvent
public Event getEvent(String calendarId, String eventId)
Description copied from interface:CalendarOperationsFetch an event from the specified calendar.- Specified by:
getEventin interfaceCalendarOperations- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (CalendarOperations.PRIMARY_CALENDAR_ID) may be used.eventId- the event's identifier.- Returns:
- the event.
-
quickAddEvent
public Event quickAddEvent(String calendarId, String specification, boolean sendNotifications)
Description copied from interface:CalendarOperationsCreate a new event in the specified calendar, based on the specification text.- Specified by:
quickAddEventin interfaceCalendarOperations- Parameters:
calendarId- the calendar's identifier. The special identifier "primary" (CalendarOperations.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
public void deleteEvent(String calendarId, String eventId, boolean sendNotifications)
Description copied from interface:CalendarOperationsDelete an existing event.- Specified by:
deleteEventin interfaceCalendarOperations- Parameters:
calendarId- the identifier of the calendar containing the event. The special identifier "primary" (CalendarOperations.PRIMARY_CALENDAR_ID) may be used.eventId- the event's identifier.sendNotifications- whether to send notifications about the deletion of the event.
-
updateEvent
public void updateEvent(String calendarId, Event event, boolean sendNotifications)
Description copied from interface:CalendarOperationsUpdate an existing event.- Specified by:
updateEventin interfaceCalendarOperations- Parameters:
calendarId- The identifier of the calendar containing the event. The special identifier "primary" (CalendarOperations.PRIMARY_CALENDAR_ID) may be used.event- The event to update.sendNotifications- Whether to send notifications about the update to the event.
-
-