4Suite™ API Documentation

# ► Module Ft.Server.Server.Drivers.FtssDriver

4Suite repository driver
Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: DataStoreContainer, FtssDriver |  |  |  | Functions: RecurPrint |  |  |  | Fields: DEFAULT_SESSION_TIME_TO_LIVE, DELETE_CONTAINER_CHILD_XUPDATE, FTSERVER_NAMESPACE, NEW_CONTAINER_CHILD_XUPDATE, OBJECT_TYPE_LITERAL, OBJECT_TYPE_RESOURCE, OBJECT_TYPE_UNKNOWN, RESERVED_NAMESPACE, UPDATE_ACL, UPDATE_LAST_MODIFIED, UPDATE_LAST_MODIFIED_AND_SIZE, UPDATE_SIZE, XLINK_NAMESPACE, XSL_NAMESPACE

## Classes

class DataStoreContainer
Repository XML Container object. createContainer/getContent/setContent/_getChildren are overidden to use low level api's to implement containment. Should catch Exceptions more ferverently.
NOTE
self._driver is the FtssDriver instance
self._driver._driver is the Data store driver instance

### Methods

childReferenceXML(self, path)
Returns an XML representation of the specified container (path is a PathImp) Uses fetchChildren (implemented by the data store) to retrieve the names of the children and generates a repository container XML document.
createContainer(self, path, createParents=0, docDef=None, actualContent=None)
Creates the specified container, if createParents is true then all its parents along the path are created (if they dont exist). If actualContent is given NOT_SUPPORTED Exception is raised Needs to mimick (mostly) and override FtssDriver.createResource in order to call _createContainer
deleteContainer(self, path)

class FtssDriver(Ft.Server.Server.Drivers.ResourceManager.ResourceManager, Ft.Server.Server.Drivers.ACLManager.ACLManager, Ft.Server.Server.Drivers.MetadataManager.MetadataManager, Ft.Server.Server.Drivers.Util.FtssDriverUtility, Ft.Server.Server.Drivers.SessionManager.SessionManager)
The FtssDriver wraps the lowest-level repository database driver, providing functions commonly used by higher-level APIs.

### Methods

__init__(self, logger, driverMod, properties)
checkLogin(self, userName, password)
commit(self)
destroy(self)
Another very special case that will destroy a '/'. It cannot be called if they are logged in
exists(self)
A very special-case function. This can be called without being logged in
getContext(self, path, nss=None)
getModel(self, path)
getSystemContainerPath(self)
getSystemModel(self)
getType(self, path)
Get the resource type from the metadata. path is a Path object
initialize(self)
Another very special case that will create a new '/'. It cannot be called if they are logged in
login(self, userName, password, verify=0)
newContainerXml(self, path, acl, owner, docDef, content=None)
open(self, href)
rollback(self)
setTempFileDelete(self, flag)

### Methods inherited from class Ft.Server.Server.Drivers.ResourceManager.ResourceManager

createResource, deleteResource, fetchResource, fetchResourceCache, hasResource, setResourceCache, updateResourceContent, verifyDeleteResource, xupdateContent

### Methods inherited from class Ft.Server.Server.Drivers.ACLManager.ACLManager

defaultAcl, getAcl, getAclIdent, getAclIdentifiers, setAcl, verifyAcl

### Methods inherited from class Ft.Server.Server.Drivers.MetadataManager.MetadataManager

deleteMetaData, setMetaData, updateMetaData, updateResourceMetadata, xupdateMetaData

### Methods inherited from class Ft.Server.Server.Drivers.Util.FtssDriverUtility

aclToXml, generateUserDocDefStmts, generateUserXPathDocDefStmts, generateUserXsltDocDefStmts

### Methods inherited from class Ft.Server.Server.Drivers.SessionManager.SessionManager

createSession, deleteSessionData, getSessionData, getSessionExpiration, invalidateSession, retrieveSession, setSessionData

### Fields

exprs = []
mode = 2
o = '/ftss:MetaData/ftss:Reference'
p = '"http://schemas.4suite.org/4ss#urireferencefile.location"'
s = '$uri'
t = 'R'

## Functions

RecurPrint(obj, done=[])

## Fields

DEFAULT_SESSION_TIME_TO_LIVE = 900
DELETE_CONTAINER_CHILD_XUPDATE = <Document at 0x49025eec: 1 children>
The Document interface represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
FTSERVER_NAMESPACE = 'http://xmlns.4suite.org/reserved'
NEW_CONTAINER_CHILD_XUPDATE = <Document at 0x49025cec: 1 children>
The Document interface represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
OBJECT_TYPE_LITERAL = 'L'
OBJECT_TYPE_RESOURCE = 'R'
OBJECT_TYPE_UNKNOWN = '?'
RESERVED_NAMESPACE = 'http://xmlns.4suite.org/reserved'
UPDATE_ACL = '<xupdate:modifications\n version="1.0"\n xmlns:x...ta">%s</xupdate:append>\n</xupdate:modifications>\n'
UPDATE_LAST_MODIFIED = '<xupdate:modifications\n version="1.0"\n xmlns:x...te">%s</xupdate:update>\n</xupdate:modifications>\n'
UPDATE_LAST_MODIFIED_AND_SIZE = <Document at 0x49025eac: 1 children>
The Document interface represents the entire XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.
UPDATE_SIZE = '<xupdate:modifications\n version="1.0"\n xmlns:x...ze">%s</xupdate:update>\n</xupdate:modifications>\n'
XLINK_NAMESPACE = u'http://www.w3.org/1999/xlink'
XSL_NAMESPACE = u'http://www.w3.org/1999/XSL/Transform'