public class GCalendarSynchronizer
extends java.lang.Object
Constructor and Description |
---|
GCalendarSynchronizer() |
Modifier and Type | Method and Description |
---|---|
boolean |
connect(JDCConnection oConn,
java.lang.String sUser,
java.lang.String sWorkArea,
DistributedCachePeer oCache)
Conect to Google Calendar Service
This method looks for a PasswordRecord at table k_user_pwd which id_pwd column value is 'gmail'.
|
void |
deleteMeetingFromGoogle(JDCConnection oConn,
Meeting oMeet)
Delete Google Calendar Event Entry which iCalendar UID is the same as the one of the given Meeting
|
java.util.ArrayList<Meeting> |
readMeetingsFromGoogle(JDCConnection oConn,
java.util.Date dtFrom,
java.util.Date dtTo)
Read Google Calendar Event Entries for a date range
|
void |
writeMeetingToGoogle(JDCConnection oConn,
Meeting oMeet)
Create or update an hipergate Meeting as a Google Calendar Event Entry
|
public boolean connect(JDCConnection oConn, java.lang.String sUser, java.lang.String sWorkArea, DistributedCachePeer oCache) throws java.io.IOException, java.sql.SQLException, java.net.MalformedURLException, com.google.gdata.util.AuthenticationException, com.google.gdata.util.ServiceException
Conect to Google Calendar Service
This method looks for a PasswordRecord at table k_user_pwd which id_pwd column value is 'gmail'. If a PasswordRecord for gmail exists and its cal field has a non-empty value, then a connection attempt with Google Calendar Service is made. The matching between Google event objects and hipergate meeting objects is done with the iCalendar Unique Identifier of the object retrieved with method CalendarEventEntry.getIcalUID() from Google and with method Meeting.getString(DB.id_calendar) from hipergate. If a new iCalendar UID must be generated by hipergate, this will be the GUID of the Meeting concatenated with '@hipergate.org'. The time zone for the dates will be the one of the Fellow corresponding to the ACLUser with sUser GUID. If no time zone is set the GMT will be assumed.oConn
- JDCConnection Opened JDBC database connectionsUser
- GUID of hipergate user (from k_users table)sWorkArea
- GUID of hipergate calendar work area (from k_workareas table)DistributedCachePeer
- Optional instance of a cache for reducing database accessesjava.io.IOException
java.sql.SQLException
java.net.MalformedURLException
com.google.gdata.util.AuthenticationException
com.google.gdata.util.ServiceException
public java.util.ArrayList<Meeting> readMeetingsFromGoogle(JDCConnection oConn, java.util.Date dtFrom, java.util.Date dtTo) throws java.io.IOException, java.sql.SQLException, java.net.MalformedURLException, com.google.gdata.util.ServiceException
Read Google Calendar Event Entries for a date range
oConn
- JDCConnection Opened JDBC database connectiondtFrom
- Date interval startdtTo
- Date interval endjava.io.IOException
java.sql.SQLException
java.net.MalformedURLException
com.google.gdata.util.ServiceException
public void writeMeetingToGoogle(JDCConnection oConn, Meeting oMeet) throws java.io.IOException, java.sql.SQLException, java.net.MalformedURLException, com.google.gdata.util.ServiceException
Create or update an hipergate Meeting as a Google Calendar Event Entry
oConn
- JDCConnection Opened JDBC database connectionMeeting
- Fully loaded instance of hipergate Meeting to be written to Google Calendarjava.io.IOException
java.sql.SQLException
java.net.MalformedURLException
com.google.gdata.util.ServiceException
public void deleteMeetingFromGoogle(JDCConnection oConn, Meeting oMeet) throws java.io.IOException, java.sql.SQLException, java.net.MalformedURLException, com.google.gdata.util.ServiceException
Delete Google Calendar Event Entry which iCalendar UID is the same as the one of the given Meeting
oConn
- JDCConnection Opened JDBC database connectionMeeting
- Fully loaded instance of hipergate Meeting to be deleted from Google Calendarjava.io.IOException
java.sql.SQLException
java.net.MalformedURLException
com.google.gdata.util.ServiceException