Package g4ds :: Module communitymanager :: Class MemberManager
[show private | hide private]
[frames | no frames]

Class MemberManager


Managing information about members of communities

Connected to a database. All the data is loaded into the memory at startup time. Changes are written through directly.
Method Summary
  __init__(self, loadFromDatabase)
Initialises the member manager.
  __str__(self)
Some basic information about the object
  addMember(self, member, persistent, storeCommunityRelations)
Adds a member instance to the dictionary.
Member getLocalMember(self)
Returns the member instance for the local node.
Member getMember(self, memberId)
Get the member with the given ID from the repository.
  getMemberIds(self)
Provides a list with IDs of all members stored in the repository.
Member updateMember(self, member, updateCommunityRelations)
Updates the member information for the object in the member manager with the same member id.

Method Details

__init__(self, loadFromDatabase=0)
(Constructor)

Initialises the member manager.

__str__(self)
(Informal representation operator)

Some basic information about the object

addMember(self, member, persistent=1, storeCommunityRelations=0)

Adds a member instance to the dictionary.
Parameters:
member - Member to be added
           (type=Member)
persistent - Indicates, whether the member shall be written through to the database
           (type=Boolean)
storeCommunityRelations - When persistent is true, shall the relations be saved in the db too?
           (type=Boolean)

getLocalMember(self)

Returns the member instance for the local node.
Returns:
Member with the ID as provided in the config file
           (type=Member)

getMember(self, memberId)

Get the member with the given ID from the repository.
Parameters:
memberId - ID for the member to return
           (type=String)
Returns:
Member with the given ID
           (type=Member)

getMemberIds(self)

Provides a list with IDs of all members stored in the repository.

return: List of IDs of all known members. rtype: List of String

updateMember(self, member, updateCommunityRelations)

Updates the member information for the object in the member manager with the same member id.

If no member with the given id is in the manager, a new member will be created. All changes are written through to the database if connected.
Parameters:
member - Reference to the new or updated member instance
           (type=Member)
Returns:
Reference to the member object stored in the manager
           (type=Member)

Generated by Epydoc 2.0 on Sat Oct 22 22:52:47 2005 http://epydoc.sf.net