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

Class AlgorithmManager


Maintains a list of algorithm suitable for credentials.
Method Summary
  __init__(self, loadFromDatabase)
Initialises the manager with the subjacent database.
  __str__(self)
Some basic information about the object
  addAlgorithm(self, algorithm, persistent)
Add one algorithm to the manager.
  getAlgorithm(self, algorithmId)
Returns the algorithm instance for the given algoritm id.
  getAlgorithmByName(self, algName)
Returns the algorithm instance with the name as given.
  getAlgorithmByNameAndInsert(self, algname)
Returns the algorithm with given algorithm name.
List of Algorithm getAlgorithms(self)
Returns a list of all saved algorithms.

Instance Variable Summary
Dict (String | Algorithm) _algorithms: Dictionary, maintaining the algorithms - 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

addAlgorithm(self, algorithm, persistent=1)

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

getAlgorithm(self, algorithmId)

Returns the algorithm instance for the given algoritm id.

getAlgorithmByName(self, algName)

Returns the algorithm instance with the name as given.

getAlgorithmByNameAndInsert(self, algname)

Returns the algorithm with given algorithm name.

If the algorithm is not yet in the manager it will be created.

getAlgorithms(self)

Returns a list of all saved algorithms.
Returns:
List of all algorithms
           (type=List of Algorithm)

Instance Variable Details

_algorithms

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

_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