Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Private Member Functions
GenericSetup.content.DAVAwareFileAdapter Class Reference

List of all members.

Public Member Functions

def __init__
def export
def listExportableItems
def import_

Public Attributes

 context

Private Member Functions

def _getFileName

Detailed Description

Exporter/importer for content who handle their own FTP / DAV PUTs.

Definition at line 372 of file content.py.


Constructor & Destructor Documentation

Definition at line 377 of file content.py.

00377 
00378     def __init__(self, context):
00379         self.context = context


Member Function Documentation

Return the name under which our file data is stored.

Definition at line 380 of file content.py.

00380 
00381     def _getFileName(self):
00382         """ Return the name under which our file data is stored.
00383         """
00384         return '%s' % self.context.getId()

Here is the caller graph for this function:

def GenericSetup.content.DAVAwareFileAdapter.export (   self,
  export_context,
  subdir,
  root = False 
)
See IFilesystemExporter.

Definition at line 385 of file content.py.

00385 
00386     def export(self, export_context, subdir, root=False):
00387         """ See IFilesystemExporter.
00388         """
00389         export_context.writeDataFile(self._getFileName(),
00390                                      self.context.manage_FTPget(),
00391                                      'text/plain',
00392                                      subdir,
00393                                     )

Here is the call graph for this function:

def GenericSetup.content.DAVAwareFileAdapter.import_ (   self,
  import_context,
  subdir,
  root = False 
)
See IFilesystemImporter.

Definition at line 399 of file content.py.

00399 
00400     def import_(self, import_context, subdir, root=False):
00401         """ See IFilesystemImporter.
00402         """
00403         cid = self.context.getId()
00404         data = import_context.readDataFile(self._getFileName(), subdir)
00405         if data is None:
00406             logger = import_context.getLogger('SGAIFA')
00407             logger.info('no .ini file for %s/%s' % (subdir, cid))
00408         else:
00409             request = FauxDAVRequest(BODY=data, BODYFILE=StringIO(data))
00410             response = FauxDAVResponse()
00411             self.context.PUT(request, response)

Here is the call graph for this function:

See IFilesystemExporter.

Definition at line 394 of file content.py.

00394 
00395     def listExportableItems(self):
00396         """ See IFilesystemExporter.
00397         """
00398         return ()


Member Data Documentation

Definition at line 378 of file content.py.


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