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

Class SynchronizationModule

source code

      pisiinterfaces.AbstractSynchronizationModule --+    
                                                     |    
contacts.contacts.AbstractContactSynchronizationModule --+
                                                         |
                                                        SynchronizationModule

The implementation of the interface contacts.AbstractContactSynchronizationModule for OPIMD persistence backend

Instance Methods [hide private]
 
__init__(self, modulesString, config, configsection, folder, verbose=False, soft=False)
Constructor
source code
 
_extractValue(self, atts, attName, contactObject, opimdField)
Supporting function to extract a single attribute value
source code
 
load(self)
Loads all attributes for all contact entries from the OPIMD backend
source code
 
_checkAndApplyTypes(self)
Makes sure that all required types for PISI are available in OPIMD.
source code
 
_saveOneEntry(self, fields, fieldName, contact, attribute) source code
 
_saveOperationAdd(self, id)
Making changes permanent: Add a single contact instance to backend
source code
 
_saveOperationDelete(self, id)
Making changes permanent: Remove a single contact instance from backend
source code
 
_saveOperationModify(self, id)
Making changes permanent: Update a single contact instance in backend
source code
 
saveModifications(self)
Save whatever changes have come by
source code

Inherited from contacts.contacts.AbstractContactSynchronizationModule: addContact, allContacts, flush, getContact, removeContact, replaceContact

Inherited from pisiinterfaces.AbstractSynchronizationModule: addEntry, allEntries, 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 (contacts.AbstractContactSynchronizationModule.__init__) is called. Local variables are initialized.

Overrides: pisiinterfaces.AbstractSynchronizationModule.__init__

load(self)

source code 

Loads all attributes for all contact entries from the OPIMD backend

For each entry a new contacts.contacts.Contact instance is created and stored in the instance dictionary contacts.AbstractContactSynchronizationModule._allContacts.

saveModifications(self)

source code 

Save whatever changes have come by

The history of actions for this data source is iterated. For each item in there the corresponding action is carried out on the item in question. This function is just a dispatcher to one of the three functions _saveOperationAdd, _saveOperationDelete or _saveOperationModify.