~fusion-developers/entropy-store/818855-limit-upload-scheduler

« back to all changes in this revision

Viewing changes to entropy/ientropy.py

  • Committer: Tristan Seligmann
  • Date: 2009-05-30 23:07:17 UTC
  • Revision ID: mithrandi@mithrandi.za.net-20090530230717-y8ujqfw3rjj957i5
Mix interfaces up; add IContentObject interface and make IContentStore asynchronous.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from zope.interface import Interface
2
 
 
3
 
class IContentStore(Interface):
4
 
    """
5
 
    Interface for storing and retrieving immutable content objects.
6
 
    """
7
 
    def storeObject(content, contentType, metadata={}):
8
 
        """
9
 
        Store an object.
10
 
 
11
 
        @param content: the data to store.
12
 
        @type content: C{str}
13
 
        @param contentType: the MIME type of the content.
14
 
        @type contentType: C{unicode}
15
 
        @param metadata: a dictionary of metadata entries.
16
 
        @type metadata: C{dict} of C{unicode}:C{unicode}
17
 
        @returns: the object identifier.
18
 
        @rtype: C{unicode}
19
 
        """
20
 
 
21
 
    def getObject(objectID):
22
 
        """
23
 
        Retrieve an object.
24
 
 
25
 
        @param objectId: the object identifier.
26
 
        @type objectId: C{unicode}
27
 
        """