qm :: user :: XmlDatabase :: Class XmlDatabase
[hide private]
[frames] | no frames]

Class XmlDatabase
source code

An XML user database.

An object of this class behaves as a read-only map from user IDs to 'User' objects.

Instance Methods [hide private]
  __init__(self, database_path)
Read in the XML user database.
  GetDefaultUserId(self)
Return the ID of the default user, or 'None'.
  GetGroupIds(self)
Return the IDs of user groups.
  GetGroup(self, group_id)
Return the group with ID 'group_id'.
  Write(self)
Write out the user database.
  __getitem__(self, user_id)
  get(self, user_id, default=None)
  keys(self)

Method Details [hide private]

__init__(self, database_path)
(Constructor)

source code 
Read in the XML user database.

GetDefaultUserId(self)

source code 
Return the ID of the default user, or 'None'.

GetGroupIds(self)

source code 
Return the IDs of user groups.

GetGroup(self, group_id)

source code 
Return the group with ID 'group_id'.

Write(self)

source code 
Write out the user database.

__getitem__(self, user_id)
(Indexing operator)

source code 

get(self, user_id, default=None)

source code 

keys(self)

source code