4Suite™ API Documentation

# ► Module Ft.Server.Server.Drivers.ResourceManager

Repo resource operations for the driver
Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: ResourceManager |  |  |  | Fields: UPDATE_ACL, UPDATE_LAST_MODIFIED_AND_SIZE, g_rdfResourceTypes, g_resourceTypeFromRdf

## Classes

class ResourceManager

### Methods

createResource(self, path, metadata, content)
Create a new resource. This function: - modifies the parent container - creates the metadata / content for the resource - set's up the system metadata (via associated system doc defs)
deleteResource(self, path)
Delete the resource (clear its cache, delete all of its data-store components, remove from its parent, and delete its system metadata)
fetchResource(self, path)
Fetch the content (caching the results)
fetchResourceCache(self, path)
Un Pickle and return the cache
hasResource(self, path)
setResourceCache(self, path, cache)
Pickle and store the cache
updateResourceContent(self, path, content)
Update the specified resource with the given content (updating the last modified time and size)
verifyDeleteResource(self, path)
Delete the resource
xupdateContent(self, path, xu)
Apply XUpdate to the content and store it (updatng the size and last modified system metadata)

## Fields

UPDATE_ACL = '<xupdate:modifications\n version="1.0"\n xmlns:x...ta">%s</xupdate:append>\n</xupdate:modifications>\n'
UPDATE_LAST_MODIFIED_AND_SIZE = <Document at 0x49028eac: 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.
g_rdfResourceTypes = {1: 'http://schemas.4suite.org/4ss#container', 2: 'http://schemas.4suite.org/4ss#alias', 3: 'http://schemas.4suite.org/4ss#rawfile', 4: 'http://schemas.4suite.org/4ss#xmldocument', 5: 'http://schemas.4suite.org/4ss#xsltdocument', 6: 'http://schemas.4suite.org/4ss#schematrondocument', 7: 'http://schemas.4suite.org/4ss#user', 8: 'http://schemas.4suite.org/4ss#group', 9: 'http://schemas.4suite.org/4ss#xpathdocumentdefinition', 11: 'http://schemas.4suite.org/4ss#xsltdocumentdefinition', ...}
g_resourceTypeFromRdf = {'http://schemas.4suite.org/4ss#alias': 2, 'http://schemas.4suite.org/4ss#command': 14, 'http://schemas.4suite.org/4ss#container': 1, 'http://schemas.4suite.org/4ss#documentdefinition': 13, 'http://schemas.4suite.org/4ss#group': 8, 'http://schemas.4suite.org/4ss#meta_data': 16, 'http://schemas.4suite.org/4ss#rawfile': 3, 'http://schemas.4suite.org/4ss#rdfdocument': 12, 'http://schemas.4suite.org/4ss#schematrondocument': 6, 'http://schemas.4suite.org/4ss#server': 15, ...}