Package com.logicaldoc.google
Class CalendarClient
java.lang.Object
com.logicaldoc.google.GoogleClient
com.logicaldoc.google.CalendarClient
Facade for Google Calendar.
 
 To handle the API: https://console.developers.google.com
- Since:
- 78.9.4
- Author:
- Marco Meschieri - LogicalDOC
- 
Method SummaryModifier and TypeMethodDescriptionvoiddeleteEvent(String eventId) Deletes a remote eventstatic CalendarClientRetrieves all the upcoming events from the remote calendar synchronising at the same time the local counterpartsPublishes a local event to the remote calendar, if the event does not exist it is created otherwise it gets synchronized.voidSynchronizes the local calendar with the Google oneMethods inherited from class com.logicaldoc.google.GoogleClientconnect, getAccessToken, getRefreshToken, getUserName, isConnected, loadSettings
- 
Method Details- 
getpublic static CalendarClient get(String name) throws com.logicaldoc.core.PersistenceException, com.logicaldoc.util.security.StringEncrypter.EncryptionException, IOException - Throws:
- com.logicaldoc.core.PersistenceException
- com.logicaldoc.util.security.StringEncrypter.EncryptionException
- IOException
 
- 
getUpcomingEventspublic List<Event> getUpcomingEvents() throws IOException, com.logicaldoc.core.PersistenceException, ParseExceptionRetrieves all the upcoming events from the remote calendar synchronising at the same time the local counterparts- Returns:
- The local future calendar events
- Throws:
- IOException- Error in the I/O
- com.logicaldoc.core.PersistenceException- Error in the data layer
- ParseException- Error parting the dates
 
- 
deleteEventDeletes a remote event- Parameters:
- eventId- Identifi3er of the event to delete
- Throws:
- IOException- Error in the I/O
 
- 
pushEventpublic String pushEvent(Event localEvent) throws IOException, com.logicaldoc.core.PersistenceException, ParseException Publishes a local event to the remote calendar, if the event does not exist it is created otherwise it gets synchronized.- Parameters:
- localEvent- The local event to publish
- Returns:
- The external identifier of the remote event
- Throws:
- IOException- Error in the I/O
- com.logicaldoc.core.PersistenceException- Error in the data layer
- ParseException- Error in the JSON manipulation
 
- 
synchronizepublic void synchronize() throws com.logicaldoc.core.PersistenceException, IOException, ParseExceptionSynchronizes the local calendar with the Google one- Throws:
- ParseException- Exception parsing the dates
- IOException- Generic I/O error
- com.logicaldoc.core.PersistenceException- Error in the data layer
 
 
-