Package core :: Package controllers :: Module sessionManager :: Class sessionManager
[hide private]
[frames] | no frames]

Class sessionManager



This class manages a session

Pickle _sessionData on every call to save. unPickle _sessionData when initing with a filename as paremeter to __init__.


Author: Andres Riancho ( andres.riancho@gmail.com )

Instance Methods [hide private]
  __init__(self)
  saveSession(self, sessionName='defaultSession')
  loadSession(self, sessionName)
  setSessionDir(self, sessionDirectory)
  save(self, variable, value)
Saves the options to a file.
  getData(self, variable)
  _loadCf(self)
  _loadKb(self)
  _loadSession(self)
  _load(self, fileName)
Loads an object from the fileName.
  _saveKbData(self)
  _saveCfData(self)
  _saveSessionData(self)
  _saveData(self, data, fileName)
  _makePickableKB(self, data)
Some plugins save data to the kb that cant be pickled (for example, error404page saves a instance method).
  _makePickableData(self, data)
Some plugins save data to the kb that cant be pickled (for example, error404page saves a instance method).

Method Details [hide private]

__init__(self)
(Constructor)

 
None

saveSession(self, sessionName='defaultSession')

 
None

loadSession(self, sessionName)

 
None

setSessionDir(self, sessionDirectory)

 
None

save(self, variable, value)

 
Saves the options to a file.
Parameters:
  • variable - The variable that we want to save data to
  • value - The value of that variable

getData(self, variable)

 
None

_loadCf(self)

 
None

_loadKb(self)

 
None

_loadSession(self)

 
None

_load(self, fileName)

 
Loads an object from the fileName.
Parameters:
  • fileName - The filename where the options are read.
Returns:
An object instance.

_saveKbData(self)

 
None

_saveCfData(self)

 
None

_saveSessionData(self)

 
None

_saveData(self, data, fileName)

 
None

_makePickableKB(self, data)

 
Some plugins save data to the kb that cant be pickled (for example, error404page saves a instance method). So i remove the data from the kb AND also remove the entry from the self._sessionData that says : "error404Page" was already runned, dont run again.

_makePickableData(self, data)

 
Some plugins save data to the kb that cant be pickled (for example, error404page saves a instance method). So i remove the data from the kb AND also remove the entry from the self._sessionData that says : "error404Page" was already runned, dont run again.