Package modules :: Module calendar_google :: Class SynchronizationModule
[hide private]
[frames] | no frames]

Class SynchronizationModule

source code

   pisiinterfaces.AbstractSynchronizationModule --+    
                                                  |    
events.events.AbstractCalendarSynchronizationModule --+
                                                      |
                                                     SynchronizationModule

The implementation of the interface events.AbstractCalendarSynchronizationModule for the Google Calendar backend

Instance Methods [hide private]
 
__init__(self, modulesString, config, configsection, folder, verbose=False, soft=False)
Constructor
source code
 
load(self)
Load all data from backend
source code
 
_saveAddEvent(self, id)
Saves an event as part of saving modifications
source code
 
_saveReplaceEvent(self, id)
Replace event as part of saving modifications
source code
 
_saveRemoveEvent(self, id)
Removes an event as part of saving modifications
source code
 
_commitModifications(self)
Makes changes permanent
source code
 
saveModifications(self)
Save whatever changes have come by
source code
 
_convertToGoogle(self, dateTimeObject, allday)
Supporting function to assemble a date-time-object depending on the type of event (all day or special times)
source code
 
_convertPisiEventToGoogle(self, event)
Supporting function to convert a PISI event (internal format) into a Google Gdata Calendar event
source code
 
_geventToPisiEvent(self, event)
Converts a Google event to Pisi event (internal format)
source code
 
_gtimeToDatetime(self, gtime)
Converts Google normal way (RFC3339) to write date and time to a datetime instance
source code
 
_login(self, user, password)
Supporting function to perform login at Google's Calendar Web-Service API
source code

Inherited from events.events.AbstractCalendarSynchronizationModule: addEvent, allEvents, getEvent, removeEvent, replaceEvent

Inherited from pisiinterfaces.AbstractSynchronizationModule: addEntry, allEntries, flush, getDescription, getEntry, getName, postProcess, preProcess, prettyPrint, removeEntry, replaceEntry

Instance Variables [hide private]
Method Details [hide private]

__init__(self, modulesString, config, configsection, folder, verbose=False, soft=False)
(Constructor)

source code 

Constructor

Super class constructor (events.AbstractCalendarSynchronizationModule.__init__) is called. Local variables are initialized. The settings from the configuration file are loaded. The connection to the Google Gdata backend is established.

Overrides: pisiinterfaces.AbstractSynchronizationModule.__init__

load(self)

source code 

Load all data from backend

A single query is performed and the result set is parsed afterwards.

saveModifications(self)

source code 

Save whatever changes have come by

Iterates the history of actions and calls the corresponding supporting functions. In the end, the commit supporting function _commitModifications is called for writing through changes.