Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ATContentTypes.adapters.archive.NonFolderishArchiver Class Reference

List of all members.

Public Member Functions

def __init__
def getRawArchive
def createArchive

Public Attributes

 context

Detailed Description

store your files in a zip file

Definition at line 50 of file archive.py.


Constructor & Destructor Documentation

Definition at line 55 of file archive.py.

00055 
00056     def __init__(self, context):
00057         self.context = context


Member Function Documentation

def ATContentTypes.adapters.archive.NonFolderishArchiver.createArchive (   self,
  path,
  accumulator,
  kwargs 
)
get the zip file object

Definition at line 64 of file archive.py.

00064 
00065     def createArchive(self, path, accumulator, **kwargs):
00066         """
00067         get the zip file object
00068         """
00069         dataExtractor = IDataExtractor(self.context)
00070         if dataExtractor and IArchivable.providedBy(self.context):
00071             data = dataExtractor.getData(**kwargs)
00072             if path:
00073               filepath = '%s/%s' % (path, self.context.getId())
00074             else:
00075               filepath = self.context.getId()
00076             accumulator.setFile(filepath,data)
00077 

Here is the caller graph for this function:

def ATContentTypes.adapters.archive.NonFolderishArchiver.getRawArchive (   self,
  accumulator = None,
  kwargs 
)

Definition at line 58 of file archive.py.

00058 
00059     def getRawArchive(self, accumulator=None, **kwargs):
00060         if(not accumulator):
00061             accumulator = ZipAccumulator(self.context)
00062         self.createArchive(None, accumulator, **kwargs)
00063         return accumulator.getRaw()

Here is the call graph for this function:


Member Data Documentation

Definition at line 56 of file archive.py.


The documentation for this class was generated from the following file: