4Suite API Documentation

Module Ft.Server.Server.Drivers.Psyco

Classes:
Functions:
Globals:

Classes

class PsycoDriver
Store information in a Postgres Database using PsycoPG

Methods

__init__(self, dbName, host, port, user, passwd)
commit(self)
Make it so!
createFile(self, path, typ, content)
When creating a resource, store the content
deleteFile(self, path, typ)
Delete an object
fetchFile(self, path, typ)
getSystemModel(self)
getUserModel(self)
hasFile(self, path, typ)
See if we have any meta information about this resource
maintain(self)
Perform any maintenance on the db
rollback(self)
Undo it
updateFile(self, path, typ, content)
Update only the content about this resource

Functions

Begin(**properties)
Begin a new transaction. Every driver must support this interface. The properties keyword arguments are passed from the config file (or where ever) to the driver. The Begin file is responsible for doing what ever is needed to validate these arguements
BuildConnectString(dbname, host, port, user, passwd)
DbExists(properties)
Destroy(properties, tryOnly=0)
Completly dismantle the repo
Exists(properties)
See if this repo exists. The return value for this is three state. 1. Everything is present 0. Some things are there -1 Nothing is there.
Initialize(properties)
Initialize a new copy of the repo. This is a prerequiste to a full 4ss_manager init. The adapter will take care of calling our other interfaces (createContainer, createUser, etc) with all of the information about the rest of the init stuff to do
InitializeModule()
Post-import hook to initialize module's runtime variables that are not required at import time, but will be needed before the module-level functions are called.
Maintain(properties)
Perform any maintenance on the db

Globals

BLOB_CHUNK_LENGTH = 100000
NAME = 'Psyco'
SYSTEM_MODEL_NAME = 'system'
USER_MODEL_NAME = 'user'