Package g4ds :: Module servicerepository :: Class ServiceManager
[show private | hide private]
[frames | no frames]

Class ServiceManager


Responsible for maintaining information about Services and relations with them

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 Service Manager
  __str__(self)
Some basic information about the object
  addService(self, service, persistent)
Adds a community instance to the repository
Service getService(self, serviceId)
Getter
List of String getServiceIds(self)
GETTER
  registerAuthority(self, serviceid, memberid)
Passes the request to the database backend.
  registerCommunitySubscription(self, serviceid, communityid)
Passes the request to the database backend.
  registerMemberSubscription(self, serviceid, memberid)
Passes the request to the database backend.
  updateService(self, service, dropAuthorityRelations, dropMemberRelations, dropCommunityRelations)
Updates the manager with the given service information.

Method Details

__init__(self, loadFromDatabase=0)
(Constructor)

Initialises the Service Manager

Instanstiates local variables. Loads all the stuff from the database.
Parameters:
loadFromDatabase - Indicates, whether the manager shall be initialised from the database backend
           (type=Boolean)

__str__(self)
(Informal representation operator)

Some basic information about the object

addService(self, service, persistent=1)

Adds a community instance to the repository
Parameters:
service - Service to be inserted
           (type=Service)
persistent - Indicates, whether the service shall be written through to the database
           (type=Boolean)

getService(self, serviceId)

Getter
Parameters:
serviceId - ID of the service to return
           (type=String)
Returns:
The service with the given id from the service repository.
           (type=Service)

getServiceIds(self)

GETTER
Returns:
The list of ids off all services
           (type=List of String)

registerAuthority(self, serviceid, memberid)

Passes the request to the database backend.

registerCommunitySubscription(self, serviceid, communityid)

Passes the request to the database backend.

registerMemberSubscription(self, serviceid, memberid)

Passes the request to the database backend.

updateService(self, service, dropAuthorityRelations=1, dropMemberRelations=0, dropCommunityRelations=0)

Updates the manager with the given service information.

Writes information through to the database if connected.

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