Package g4ds :: Module servicerepository_db :: Class ServDB
[show private | hide private]
[frames | no frames]

Class ServDB


Handles all requests form the services repository module for backend connectivity with database.
Method Summary
  __init__(self)
Initialises the database manager for services.
  addService(self, service)
Adds one service to the services table in the database.
  addServiceAuthority(self, serviceid, memberid)
Adds an entry into the table for the relation between services and members as authorities.
  addServiceCommunity(self, serviceid, communityid)
Adds an entry into the table for the relation between services and communities.
  addServiceMember(self, serviceid, memberid)
Adds an entry into the table for the relation between services and members.
  getAuthoritiesForService(self, serviceid)
Fetches a list of ids of all members being authorities for the given service.
  getCommunitiesForService(self, serviceid)
Fetches a list of ids of all communities subscribed to the given service.
  getMembersForService(self, serviceid)
Fetches a list of ids of all members subscribed to the given service.
  getServices(self)
Returns a list of all services in the database.
  shutdown(self)
Closes open database connections.
  updateService(self, service, dropAuthorityRelations, dropMemberRelations, dropCommunityRelations)
Upadtes the database content with the given service description.

Method Details

__init__(self)
(Constructor)

Initialises the database manager for services.

The database connection is established using the appropriate settings in the configuations file / module config.py.

Please run shutdown before you shutdown the application in order to clear the database connections.

addService(self, service)

Adds one service to the services table in the database.

addServiceAuthority(self, serviceid, memberid)

Adds an entry into the table for the relation between services and members as authorities.

addServiceCommunity(self, serviceid, communityid)

Adds an entry into the table for the relation between services and communities.

addServiceMember(self, serviceid, memberid)

Adds an entry into the table for the relation between services and members.

getAuthoritiesForService(self, serviceid)

Fetches a list of ids of all members being authorities for the given service.

getCommunitiesForService(self, serviceid)

Fetches a list of ids of all communities subscribed to the given service.

getMembersForService(self, serviceid)

Fetches a list of ids of all members subscribed to the given service.

getServices(self)

Returns a list of all services in the database.

shutdown(self)

Closes open database connections.

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

Upadtes the database content with the given service description.

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