Package amplee :: Package storage :: Module storezodb :: Class ZODBStorage
[hide private]
[frames] | no frames]

Class ZODBStorage

source code

object --+
         |
        ZODBStorage

Instance Methods [hide private]
 
__init__(self, db, name)
ZODB Storage for amplee.
source code
 
create_container(self, collection_name)
Creates and returns a new new node named 'collection_name'
source code
 
shutdown(self)
Shutdown the ZODB storage.
source code
 
info(self, collection_name, resource_name=None)
Returns a StorageResourceInfo instance
source code
 
get_content(self, info)
Returns the content as a string of the resource found at 'info.key'.
source code
 
get_meta_data(self, info)
Returns the content as a string of the resource found at 'info.key'.
source code
 
put_content(self, info, content, **kwargs)
Set the content at 'info' of the resource.
source code
 
put_meta_data(self, info, content, **kwargs)
Set the content at 'info' of the resource.
source code
 
remove_content(self, info)
Remove the resource at 'info.key'
source code
 
remove_meta_data(self, info)
Remove the resource at 'info.key'
source code
 
persist(self, *args, **kwargs)
Does nothing in the ZODB storage
source code
 
exists(self, info)
Returns True if the resource at 'info.key' exists.
source code
 
ls(self, collection_name, ext=None)
List resources with the provided extension in a collection.
source code
 
ils(self, collection_name, ext=None)
Yields resources with the provided extension in a collection.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, db, name)
(Constructor)

source code 

ZODB Storage for amplee.

Keyword argument db -- a ZODB database (FileStorage for instance) name -- name of the top level node for this storage
Overrides: object.__init__

shutdown(self)

source code 
Shutdown the ZODB storage. Does nothing effectively.

get_content(self, info)

source code 

Returns the content as a string of the resource found at 'info.key'. If no resource could be found, amplee.error.UnknownResource is raised.

Keyword arguments info -- as returned by info()

get_meta_data(self, info)

source code 

Returns the content as a string of the resource found at 'info.key'. If no resource could be found, amplee.error.UnknownResource is raised.

Keyword arguments info -- Path to the resource as returned by info()

put_content(self, info, content, **kwargs)

source code 

Set the content at 'info' of the resource.

Keyword arguments info -- as returned by info() content -- data as a string or a file object which MUST return teh full content as a byte string on read()

put_meta_data(self, info, content, **kwargs)

source code 

Set the content at 'info' of the resource.

Keyword arguments info -- as returned by info() content -- data as a string or a file object which MUST return teh full content as a byte string on read()

remove_content(self, info)

source code 

Remove the resource at 'info.key'

Keyword arguments info -- as returned by info()

remove_meta_data(self, info)

source code 

Remove the resource at 'info.key'

Keyword arguments info -- as returned by info()

exists(self, info)

source code 

Returns True if the resource at 'info.key' exists. False otherwise.

Keyword arguments info -- as returned by info()

ls(self, collection_name, ext=None)

source code 

List resources with the provided extension in a collection.

Keyword arguments collection_name -- name of the node in the ZODB database containing all the members of a collection. Created if it does not exists.

ext -- extension of resources to return

ils(self, collection_name, ext=None)

source code 

Yields resources with the provided extension in a collection.

Keyword arguments collection_name -- name of the node in the ZODB database containing all the members of a collection. Created if it does not exists.

ext -- extension of resources to return