Package g4ds :: Module securitymanager :: Class CredentialManager
[show private | hide private]
[frames | no frames]

Class CredentialManager


Maintains a list of credentials.
Method Summary
  __init__(self, loadFromDatabase)
Initialises the manager with the subjacent database.
  __str__(self)
Some basic information about the object
  addCredential(self, credential, persistent)
Add one credential to the manager.
  getCredential(self, credentialId)
Returns the credential instance for the given credential id.
List of Credential getCredentials(self)
Returns a list of all saved credentials.
List of Credential getCredentialsForMember(self, memberid)
Returns a list of credentials, whose member is the one with the id given.
  removeCredential(self, credentialid)
Removes the credential with the given id from the manager (and the database if connected).
  removeCredentialsForMember(self, memberid)
Removes all credentials from the manager (and database) for the member with the given id.

Instance Variable Summary
Dict (String | Credential) _credentials: Dictionary, maintaining the credentials - accessable by its id
Boolean _dbconnected: Indicates, whether the manager is connected to a database; hence whether the changes shall be written through
securitymanager_db.SecDB _sec_db: Security Database Connector

Method Details

__init__(self, loadFromDatabase=1)
(Constructor)

Initialises the manager with the subjacent 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

addCredential(self, credential, persistent=1)

Add one credential to the manager.
Parameters:
credential - Credential to be added
           (type=Credential)
persistent - Indicates, whether the credential shall be written through to the database
           (type=Boolean)

getCredential(self, credentialId)

Returns the credential instance for the given credential id.

getCredentials(self)

Returns a list of all saved credentials.
Returns:
List of all credentials
           (type=List of Credential)

getCredentialsForMember(self, memberid)

Returns a list of credentials, whose member is the one with the id given.
Returns:
List of credentials
           (type=List of Credential)

removeCredential(self, credentialid)

Removes the credential with the given id from the manager (and the database if connected).

removeCredentialsForMember(self, memberid)

Removes all credentials from the manager (and database) for the member with the given id.

Instance Variable Details

_credentials

Dictionary, maintaining the credentials - accessable by its id
Type:
Dict (String | Credential)

_dbconnected

Indicates, whether the manager is connected to a database; hence whether the changes shall be written through
Type:
Boolean

_sec_db

Security Database Connector
Type:
securitymanager_db.SecDB

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