Back to index

plone3  3.1.7
interfaces.py
Go to the documentation of this file.
00001 
00002 from zope.interface import Interface
00003 from zope.schema import Bytes, TextLine, Float
00004 
00005 class IContextFile(Interface):
00006 
00007     def getLastMod(self):
00008         'Returns last modification time of the file'
00009 
00010     def getContents():
00011         'Reads the data and content type of the file'
00012 
00013 class ICachedResource(Interface):
00014     
00015      data = Bytes(title = u'The content data of the file')
00016 
00017      content_type = TextLine(title = u'The mime content type of the file')
00018 
00019      lmt = Float(title = u'Last modification timestamp')
00020      
00021      lmh = Float(title = u'Last modification in human readable form')
00022 
00023      def purgeData(self):
00024          'Purges the cached data'
00025 
00026 class IConcatResourceAddon(Interface):
00027     '''Utility to register addons
00028 
00029     This can be used to dynamically extend components for a given resource.
00030     We don't provide implementation for this here, but other
00031     components can implement this to provide dynamic add-ons.
00032 
00033     The name of the utility should be the name of the resource.
00034     '''
00035 
00036     def getAddonFiles(request):
00037         '''Returns a list of addon files.
00038         This will be concatenated to the end of the static list.
00039         '''
00040     
00041